/* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ // Tests that the eyedropper command works const TESTCASE_URI = TEST_BASE + "color-block.html"; const DIV_COLOR = "#0000FF"; function test() { return Task.spawn(spawnTest).then(finish, helpers.handleError); } function spawnTest() { let options = yield helpers.openTab(TESTCASE_URI); yield helpers.openToolbar(options); yield helpers.audit(options, [ { setup: "eyedropper", check: { input: "eyedropper" }, exec: { output: "" } }, ]); yield inspectAndWaitForCopy(); yield helpers.closeToolbar(options); yield helpers.closeTab(options); } function inspectAndWaitForCopy() { return waitForClipboard(() => { inspectPage(); // setup: inspect the page }, DIV_COLOR); } function inspectPage() { let target = document.documentElement; let win = window; // get location of the