From a6b51dd144e62490ac547c87aa34edd40b3df4df Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 20 Jul 2016 14:47:24 +0200 Subject: [PATCH] Bug 1262439 - 4 - Use the new eye-dropper highlighter in the color-picker tooltip; r=bgrins The color-picker tooltip now uses the new eye-dropper highlighter, by using the pickColorFromPage inspector method instead of the XUL-based eye-dropper tool. Telemetry hasn't yet been re-implemented in the new eye-dropper highlighter so the telemetry-related test code has been removed for now. This will be added again in a later commit. MozReview-Commit-ID: enSzSKHac4 --HG-- extra : rebase_source : dd5a54d149ac1872be8580660c70b8a02da9db66 --- .../rules/test/browser_rules_eyedropper.js | 164 +++++------------- .../shared/style-inspector-overlays.js | 2 +- devtools/client/shared/widgets/Tooltip.js | 48 +++-- 3 files changed, 69 insertions(+), 145 deletions(-) diff --git a/devtools/client/inspector/rules/test/browser_rules_eyedropper.js b/devtools/client/inspector/rules/test/browser_rules_eyedropper.js index 9a1f5e5bc511..65833898fdd9 100644 --- a/devtools/client/inspector/rules/test/browser_rules_eyedropper.js +++ b/devtools/client/inspector/rules/test/browser_rules_eyedropper.js @@ -1,19 +1,10 @@ /* vim: set ts=2 et sw=2 tw=80: */ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ - "use strict"; -// So we can test collecting telemetry on the eyedropper -var oldCanRecord = Services.telemetry.canRecordExtended; -Services.telemetry.canRecordExtended = true; -registerCleanupFunction(function () { - Services.telemetry.canRecordExtended = oldCanRecord; -}); -const EXPECTED_TELEMETRY = { - "DEVTOOLS_PICKER_EYEDROPPER_OPENED_COUNT": 2, - "DEVTOOLS_PICKER_EYEDROPPER_OPENED_PER_USER_FLAG": 1 -}; +// Test opening the eyedropper from the color picker. Pressing escape to close it, and +// clicking the page to select a color. const TEST_URI = `