From cd93f441eb2f88f6f3032d0dff098a69a2987386 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Wed, 7 Oct 2015 13:36:26 +0200 Subject: [PATCH] Backed out changeset c6b267589d0d (bug 1202902) for Mulet Reftest, W3C Platform Test and other failures. r=backout a=backout on a CLOSED TREE --- accessible/tests/mochitest/relations.js | 40 +++++------ .../source/test/fixtures/addon/bootstrap.js | 2 +- addon-sdk/source/test/test-content-script.js | 2 +- browser/base/content/browser.js | 2 - .../test/general/healthreport_pingData.js | 2 +- browser/base/content/urlbarBindings.xml | 18 ++--- .../customizableui/content/panelUI.js | 2 - ...browser_1096763_seen_widgets_post_reset.js | 7 +- .../components/downloads/content/downloads.js | 14 +--- .../components/downloads/content/indicator.js | 5 -- .../loop/modules/LoopRoomsCache.jsm | 1 - .../loop/modules/MozLoopService.jsm | 8 --- .../sessionstore/test/browser_privatetabs.js | 4 ++ browser/experiments/Experiments.jsm | 1 - browser/modules/Windows8WindowFrameColor.jsm | 2 +- .../client/canvasdebugger/canvasdebugger.js | 1 - .../client/debugger/debugger-controller.js | 3 - devtools/client/debugger/debugger-view.js | 13 ---- .../browser_dbg_break-on-next-console.js | 6 +- .../mochitest/browser_dbg_break-on-next.js | 20 ++---- .../browser_dbg_pause-exceptions-01.js | 12 ++-- .../browser_dbg_pause-exceptions-02.js | 8 +-- .../browser_dbg_variables-view-06.js | 2 +- .../browser_dbg_variables-view-filter-01.js | 24 ++----- .../browser_dbg_variables-view-filter-02.js | 20 +----- .../browser_dbg_variables-view-filter-03.js | 20 +----- .../browser_dbg_variables-view-filter-04.js | 69 ++++++++----------- .../browser_dbg_variables-view-filter-05.js | 44 ++++-------- ..._dbg_variables-view-frame-parameters-01.js | 14 +--- ..._dbg_variables-view-frame-parameters-03.js | 8 +-- .../browser_dbg_variables-view-override-01.js | 11 +-- .../browser_dbg_variables-view-popup-16.js | 2 +- .../browser_dbg_variables-view-reexpand-01.js | 17 +---- .../browser_dbg_variables-view-reexpand-02.js | 17 +---- .../browser_dbg_variables-view-webidl.js | 4 +- .../test/mochitest/doc_function-search.html | 6 +- devtools/client/debugger/utils.js | 4 +- devtools/client/inspector/inspector-panel.js | 4 +- .../markupview/test/actor_events_form.js | 4 +- .../netmonitor/netmonitor-controller.js | 4 -- .../performance/performance-controller.js | 5 -- devtools/client/performance/test/head.js | 5 +- devtools/client/performance/views/overview.js | 2 +- devtools/client/responsivedesign/test/head.js | 2 +- devtools/client/scratchpad/scratchpad.js | 7 -- .../test/browser_scratchpad_files.js | 4 ++ .../test/browser_scratchpad_modeline.js | 7 ++ .../test/browser_scratchpad_recent_files.js | 6 ++ .../test/browser_scratchpad_reset_undo.js | 6 ++ .../browser_scratchpad_revert_to_saved.js | 6 ++ devtools/client/shadereditor/shadereditor.js | 1 - devtools/client/shared/test/test-actor.js | 4 +- devtools/client/shared/widgets/TableWidget.js | 5 -- devtools/client/webaudioeditor/includes.js | 1 - .../client/webaudioeditor/views/context.js | 5 -- ...-properties-with-non-alphanumeric-names.js | 6 +- devtools/client/webide/content/webide.js | 10 --- .../server/tests/mochitest/hello-actor.js | 2 +- .../tests/mochitest/test_registerActor.html | 2 +- devtools/server/tests/unit/hello-actor.js | 2 +- .../tests/unit/test_framebindings-02.js | 3 +- .../tests/unit/test_framebindings-05.js | 3 +- devtools/shared/apps/Devices.jsm | 5 -- .../test/test_commands_registration.html | 1 + .../shared/webconsole/test/test_jsterm.html | 1 + devtools/shared/worker-loader.js | 2 +- ..._anonymousContent_append_after_reflow.html | 2 +- .../test/test_anonymousContent_style_csp.html | 2 +- dom/devicestorage/test/test_fs_remove.html | 2 +- dom/html/test/test_checked.html | 16 ++--- dom/ipc/preload.js | 4 +- dom/mobilemessage/gonk/WspPduHelper.jsm | 12 ---- dom/plugins/test/unit/test_bug455213.js | 2 + dom/plugins/test/unit/test_bug813245.js | 2 + .../test/unit/test_nice_plugin_name.js | 3 + .../test/unit/test_persist_in_prefs.js | 2 + dom/telephony/gonk/TelephonyService.js | 6 -- dom/tests/mochitest/chrome/489127.html | 2 +- .../mochitest/chrome/queryCaretRectUnix.html | 4 +- .../mochitest/chrome/queryCaretRectWin.html | 4 +- dom/tests/mochitest/chrome/selectAtPoint.html | 4 +- js/xpconnect/loader/XPCOMUtils.jsm | 11 --- .../tests/unit/test_writeToGlobalPrototype.js | 2 +- .../chrome/test_session_form_data.html | 6 +- testing/marionette/driver.js | 10 +-- testing/marionette/listener.js | 4 +- testing/marionette/server.js | 2 +- testing/mochitest/b2g_start_script.js | 6 +- .../mochitest/tests/SimpleTest/EventUtils.js | 12 ---- .../components/TalosPowersService.js | 2 +- toolkit/components/places/UnifiedComplete.js | 16 ++--- .../places/tests/unit/test_null_interfaces.js | 2 + .../thumbnails/BackgroundPageThumbs.jsm | 30 +++----- .../test/browser_thumbnails_expiration.js | 3 +- toolkit/content/contentAreaUtils.js | 5 -- toolkit/content/widgets/autocomplete.xml | 8 +-- toolkit/content/widgets/tabbox.xml | 8 +-- toolkit/modules/WindowsRegistry.jsm | 2 +- .../extensions/internal/GMPProvider.jsm | 1 - .../extensions/internal/XPIProvider.jsm | 1 - 100 files changed, 246 insertions(+), 502 deletions(-) diff --git a/accessible/tests/mochitest/relations.js b/accessible/tests/mochitest/relations.js index 2f46c8d043c..f34786df5a9 100644 --- a/accessible/tests/mochitest/relations.js +++ b/accessible/tests/mochitest/relations.js @@ -1,26 +1,26 @@ //////////////////////////////////////////////////////////////////////////////// // Constants -var RELATION_CONTROLLED_BY = nsIAccessibleRelation.RELATION_CONTROLLED_BY; -var RELATION_CONTROLLER_FOR = nsIAccessibleRelation.RELATION_CONTROLLER_FOR; -var RELATION_DEFAULT_BUTTON = nsIAccessibleRelation.RELATION_DEFAULT_BUTTON; -var RELATION_DESCRIBED_BY = nsIAccessibleRelation.RELATION_DESCRIBED_BY; -var RELATION_DESCRIPTION_FOR = nsIAccessibleRelation.RELATION_DESCRIPTION_FOR; -var RELATION_EMBEDDED_BY = nsIAccessibleRelation.RELATION_EMBEDDED_BY; -var RELATION_EMBEDS = nsIAccessibleRelation.RELATION_EMBEDS; -var RELATION_FLOWS_FROM = nsIAccessibleRelation.RELATION_FLOWS_FROM; -var RELATION_FLOWS_TO = nsIAccessibleRelation.RELATION_FLOWS_TO; -var RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR; -var RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY; -var RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF; -var RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF; -var RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF; -var RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF; -var RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR; -var RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF; -var RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT; -var RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE; -var RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION; +const RELATION_CONTROLLED_BY = nsIAccessibleRelation.RELATION_CONTROLLED_BY; +const RELATION_CONTROLLER_FOR = nsIAccessibleRelation.RELATION_CONTROLLER_FOR; +const RELATION_DEFAULT_BUTTON = nsIAccessibleRelation.RELATION_DEFAULT_BUTTON; +const RELATION_DESCRIBED_BY = nsIAccessibleRelation.RELATION_DESCRIBED_BY; +const RELATION_DESCRIPTION_FOR = nsIAccessibleRelation.RELATION_DESCRIPTION_FOR; +const RELATION_EMBEDDED_BY = nsIAccessibleRelation.RELATION_EMBEDDED_BY; +const RELATION_EMBEDS = nsIAccessibleRelation.RELATION_EMBEDS; +const RELATION_FLOWS_FROM = nsIAccessibleRelation.RELATION_FLOWS_FROM; +const RELATION_FLOWS_TO = nsIAccessibleRelation.RELATION_FLOWS_TO; +const RELATION_LABEL_FOR = nsIAccessibleRelation.RELATION_LABEL_FOR; +const RELATION_LABELLED_BY = nsIAccessibleRelation.RELATION_LABELLED_BY; +const RELATION_MEMBER_OF = nsIAccessibleRelation.RELATION_MEMBER_OF; +const RELATION_NODE_CHILD_OF = nsIAccessibleRelation.RELATION_NODE_CHILD_OF; +const RELATION_NODE_PARENT_OF = nsIAccessibleRelation.RELATION_NODE_PARENT_OF; +const RELATION_PARENT_WINDOW_OF = nsIAccessibleRelation.RELATION_PARENT_WINDOW_OF; +const RELATION_POPUP_FOR = nsIAccessibleRelation.RELATION_POPUP_FOR; +const RELATION_SUBWINDOW_OF = nsIAccessibleRelation.RELATION_SUBWINDOW_OF; +const RELATION_CONTAINING_DOCUMENT = nsIAccessibleRelation.RELATION_CONTAINING_DOCUMENT; +const RELATION_CONTAINING_TAB_PANE = nsIAccessibleRelation.RELATION_CONTAINING_TAB_PANE; +const RELATION_CONTAINING_APPLICATION = nsIAccessibleRelation.RELATION_CONTAINING_APPLICATION; //////////////////////////////////////////////////////////////////////////////// // General diff --git a/addon-sdk/source/test/fixtures/addon/bootstrap.js b/addon-sdk/source/test/fixtures/addon/bootstrap.js index 9134b4d9286..98892741826 100644 --- a/addon-sdk/source/test/fixtures/addon/bootstrap.js +++ b/addon-sdk/source/test/fixtures/addon/bootstrap.js @@ -6,4 +6,4 @@ const { utils: Cu } = Components; const {require} = Cu.import(`${ROOT}/toolkit/require.js`, {}); const {Bootstrap} = require(`${ROOT}/sdk/addon/bootstrap.js`); -var {startup, shutdown, install, uninstall} = new Bootstrap(); +const {startup, shutdown, install, uninstall} = new Bootstrap(); diff --git a/addon-sdk/source/test/test-content-script.js b/addon-sdk/source/test/test-content-script.js index ecb7338941d..295a4cad505 100644 --- a/addon-sdk/source/test/test-content-script.js +++ b/addon-sdk/source/test/test-content-script.js @@ -727,7 +727,7 @@ exports["test requestAnimationFrame"] = createProxyTest("", function (helper) { exports["testGlobalScope"] = createProxyTest("", function (helper) { helper.createWorker( - 'var toplevelScope = true;' + + 'let toplevelScope = true;' + 'assert(window.toplevelScope, "variables in toplevel scope are set to `window` object");' + 'assert(this.toplevelScope, "variables in toplevel scope are set to `this` object");' + 'done();' diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 2a1a574dec2..c3e933b338e 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -3722,8 +3722,6 @@ const BrowserSearch = { } }; -XPCOMUtils.defineConstant(this, "BrowserSearch", BrowserSearch); - function FillHistoryMenu(aParent) { // Lazily add the hover listeners on first showing and never remove them if (!aParent.hasStatusListener) { diff --git a/browser/base/content/test/general/healthreport_pingData.js b/browser/base/content/test/general/healthreport_pingData.js index 1737baba13e..e880c31538a 100644 --- a/browser/base/content/test/general/healthreport_pingData.js +++ b/browser/base/content/test/general/healthreport_pingData.js @@ -1,4 +1,4 @@ -var TEST_PINGS = [ +const TEST_PINGS = [ { type: "test-telemetryArchive-1", payload: { foo: "bar" }, diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index a2cd28e10bc..8c83f49aa11 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -1594,11 +1594,9 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. document.getElementById("addon-progress-notification-progresstext"); - { - let utils = {}; - Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils); - utils.DownloadUtils; - } + let utils = {}; + Components.utils.import("resource://gre/modules/DownloadUtils.jsm", utils); + utils.DownloadUtils; @@ -2678,13 +2676,11 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. ]]> document.getAnonymousElementByAttribute(this, "anonid", "promo-message"); diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index b03a44aca7a..d8722b2734d 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -510,8 +510,6 @@ const PanelUI = { }, }; -XPCOMUtils.defineConstant(this, "PanelUI", PanelUI); - /** * Gets the currently selected locale for display. * @return the selected locale or "en-US" if none is selected diff --git a/browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js b/browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js index b707ca10e3c..7f4e0e28d32 100644 --- a/browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js +++ b/browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js @@ -9,18 +9,17 @@ add_task(function*() { defaultArea: CustomizableUI.AREA_NAVBAR }); - const kPrefCustomizationState = "browser.uiCustomization.state"; let bsPass = Cu.import("resource:///modules/CustomizableUI.jsm", {}); ok(bsPass.gSeenWidgets.has(BUTTONID), "Widget should be seen after createWidget is called."); CustomizableUI.reset(); ok(bsPass.gSeenWidgets.has(BUTTONID), "Widget should still be seen after reset."); - ok(!Services.prefs.prefHasUserValue(kPrefCustomizationState), "Pref shouldn't be set right now, because that'd break undo."); + ok(!Services.prefs.prefHasUserValue(bsPass.kPrefCustomizationState), "Pref shouldn't be set right now, because that'd break undo."); CustomizableUI.addWidgetToArea(BUTTONID, CustomizableUI.AREA_NAVBAR); gCustomizeMode.removeFromArea(document.getElementById(BUTTONID)); - let hasUserValue = Services.prefs.prefHasUserValue(kPrefCustomizationState); + let hasUserValue = Services.prefs.prefHasUserValue(bsPass.kPrefCustomizationState); ok(hasUserValue, "Pref should be set right now."); if (hasUserValue) { - let seenArray = JSON.parse(Services.prefs.getCharPref(kPrefCustomizationState)).seen; + let seenArray = JSON.parse(Services.prefs.getCharPref(bsPass.kPrefCustomizationState)).seen; isnot(seenArray.indexOf(BUTTONID), -1, "Widget should be in saved 'seen' list."); } }); diff --git a/browser/components/downloads/content/downloads.js b/browser/components/downloads/content/downloads.js index de17c5d760b..276bdda3ded 100644 --- a/browser/components/downloads/content/downloads.js +++ b/browser/components/downloads/content/downloads.js @@ -580,8 +580,6 @@ const DownloadsPanel = { }, }; -XPCOMUtils.defineConstant(this, "DownloadsPanel", DownloadsPanel); - //////////////////////////////////////////////////////////////////////////////// //// DownloadsOverlayLoader @@ -660,8 +658,6 @@ const DownloadsOverlayLoader = { }, }; -XPCOMUtils.defineConstant(this, "DownloadsOverlayLoader", DownloadsOverlayLoader); - //////////////////////////////////////////////////////////////////////////////// //// DownloadsView @@ -1008,8 +1004,6 @@ const DownloadsView = { }, } -XPCOMUtils.defineConstant(this, "DownloadsView", DownloadsView); - //////////////////////////////////////////////////////////////////////////////// //// DownloadsViewItem @@ -1148,8 +1142,6 @@ const DownloadsViewController = { } }; -XPCOMUtils.defineConstant(this, "DownloadsViewController", DownloadsViewController); - //////////////////////////////////////////////////////////////////////////////// //// DownloadsViewItemController @@ -1496,9 +1488,7 @@ const DownloadsSummary = { delete this._detailsNode; return this._detailsNode = node; } -}; - -XPCOMUtils.defineConstant(this, "DownloadsSummary", DownloadsSummary); +} //////////////////////////////////////////////////////////////////////////////// //// DownloadsFooter @@ -1552,5 +1542,3 @@ const DownloadsFooter = { return this._footerNode = node; } }; - -XPCOMUtils.defineConstant(this, "DownloadsFooter", DownloadsFooter); diff --git a/browser/components/downloads/content/indicator.js b/browser/components/downloads/content/indicator.js index b4df74c6067..9261c499738 100644 --- a/browser/components/downloads/content/indicator.js +++ b/browser/components/downloads/content/indicator.js @@ -577,8 +577,3 @@ const DownloadsIndicatorView = { }, }; -Object.defineProperty(this, "DownloadsIndicatorView", { - value: DownloadsIndicatorView, - enumerable: true, - writable: false -}); diff --git a/browser/components/loop/modules/LoopRoomsCache.jsm b/browser/components/loop/modules/LoopRoomsCache.jsm index 16e37dd256b..c1915723c75 100644 --- a/browser/components/loop/modules/LoopRoomsCache.jsm +++ b/browser/components/loop/modules/LoopRoomsCache.jsm @@ -17,7 +17,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm this.EXPORTED_SYMBOLS = ["LoopRoomsCache"]; const LOOP_ROOMS_CACHE_FILENAME = "loopRoomsCache.json"; -XPCOMUtils.defineConstant(this, "LOOP_ROOMS_CACHE_FILENAME", LOOP_ROOMS_CACHE_FILENAME); /** * RoomsCache is a cache for saving simple rooms data to the disk in case we diff --git a/browser/components/loop/modules/MozLoopService.jsm b/browser/components/loop/modules/MozLoopService.jsm index 7de2d97d5ff..ef63a91e2c4 100644 --- a/browser/components/loop/modules/MozLoopService.jsm +++ b/browser/components/loop/modules/MozLoopService.jsm @@ -112,14 +112,6 @@ this.EXPORTED_SYMBOLS = ["MozLoopService", "LOOP_SESSION_TYPE", "TWO_WAY_MEDIA_CONN_LENGTH", "SHARING_STATE_CHANGE", "SHARING_ROOM_URL", "ROOM_CREATE", "ROOM_DELETE", "ROOM_CONTEXT_ADD"]; -XPCOMUtils.defineConstant(this, "LOOP_SESSION_TYPE", LOOP_SESSION_TYPE); -XPCOMUtils.defineConstant(this, "TWO_WAY_MEDIA_CONN_LENGTH", TWO_WAY_MEDIA_CONN_LENGTH); -XPCOMUtils.defineConstant(this, "SHARING_STATE_CHANGE", SHARING_STATE_CHANGE); -XPCOMUtils.defineConstant(this, "SHARING_ROOM_URL", SHARING_ROOM_URL); -XPCOMUtils.defineConstant(this, "ROOM_CREATE", ROOM_CREATE); -XPCOMUtils.defineConstant(this, "ROOM_DELETE", ROOM_DELETE); -XPCOMUtils.defineConstant(this, "ROOM_CONTEXT_ADD", ROOM_CONTEXT_ADD); - XPCOMUtils.defineLazyModuleGetter(this, "injectLoopAPI", "resource:///modules/loop/MozLoopAPI.jsm"); diff --git a/browser/components/sessionstore/test/browser_privatetabs.js b/browser/components/sessionstore/test/browser_privatetabs.js index 7b296bbbf05..12d8a7bfe89 100644 --- a/browser/components/sessionstore/test/browser_privatetabs.js +++ b/browser/components/sessionstore/test/browser_privatetabs.js @@ -1,6 +1,10 @@ /* Any copyright is dedicated to the Public Domain. * http://creativecommons.org/publicdomain/zero/1.0/ */ +var Imports = {}; +Cu.import("resource:///modules/sessionstore/SessionSaver.jsm", Imports); +var {SessionSaver} = Imports; + add_task(function cleanup() { info("Forgetting closed tabs"); while (ss.getClosedTabCount(window)) { diff --git a/browser/experiments/Experiments.jsm b/browser/experiments/Experiments.jsm index 739ed5bb8fc..f91ab377884 100644 --- a/browser/experiments/Experiments.jsm +++ b/browser/experiments/Experiments.jsm @@ -94,7 +94,6 @@ const TELEMETRY_LOG = { RECHECK: "RECHECK", }, }; -XPCOMUtils.defineConstant(this, "TELEMETRY_LOG", TELEMETRY_LOG); const gPrefs = new Preferences(PREF_BRANCH); const gPrefsTelemetry = new Preferences(PREF_BRANCH_TELEMETRY); diff --git a/browser/modules/Windows8WindowFrameColor.jsm b/browser/modules/Windows8WindowFrameColor.jsm index 429d970ca95..cb52ad62696 100644 --- a/browser/modules/Windows8WindowFrameColor.jsm +++ b/browser/modules/Windows8WindowFrameColor.jsm @@ -11,7 +11,7 @@ Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); var Registry = Cu.import("resource://gre/modules/WindowsRegistry.jsm").WindowsRegistry; -var Windows8WindowFrameColor = { +const Windows8WindowFrameColor = { _windowFrameColor: null, get: function() { diff --git a/devtools/client/canvasdebugger/canvasdebugger.js b/devtools/client/canvasdebugger/canvasdebugger.js index c39bd04dc21..11d5835034e 100644 --- a/devtools/client/canvasdebugger/canvasdebugger.js +++ b/devtools/client/canvasdebugger/canvasdebugger.js @@ -77,7 +77,6 @@ const EVENTS = { SOURCE_SHOWN_IN_JS_DEBUGGER: "CanvasDebugger:SourceShownInJsDebugger", SOURCE_NOT_FOUND_IN_JS_DEBUGGER: "CanvasDebugger:SourceNotFoundInJsDebugger" }; -XPCOMUtils.defineConstant(this, "EVENTS", EVENTS); const HTML_NS = "http://www.w3.org/1999/xhtml"; const STRINGS_URI = "chrome://browser/locale/devtools/canvasdebugger.properties"; diff --git a/devtools/client/debugger/debugger-controller.js b/devtools/client/debugger/debugger-controller.js index 6fc0137b6ff..cd1fee18e07 100644 --- a/devtools/client/debugger/debugger-controller.js +++ b/devtools/client/debugger/debugger-controller.js @@ -104,7 +104,6 @@ Cu.import("resource:///modules/devtools/client/shared/widgets/ViewHelpers.jsm"); Cu.import("resource:///modules/devtools/client/shared/browser-loader.js"); const require = BrowserLoader("resource:///modules/devtools/client/debugger/", this).require; -XPCOMUtils.defineConstant(this, "require", require); const {TargetFactory} = require("devtools/client/framework/target"); const {Toolbox} = require("devtools/client/framework/toolbox"); @@ -115,8 +114,6 @@ const DebuggerEditor = require("devtools/client/sourceeditor/debugger"); const {Tooltip} = require("devtools/client/shared/widgets/Tooltip"); const FastListWidget = require("devtools/client/shared/widgets/FastListWidget"); -XPCOMUtils.defineConstant(this, "EVENTS", EVENTS); - XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); diff --git a/devtools/client/debugger/debugger-view.js b/devtools/client/debugger/debugger-view.js index 47afbe9c9e0..1dcf5d5aaa8 100644 --- a/devtools/client/debugger/debugger-view.js +++ b/devtools/client/debugger/debugger-view.js @@ -49,19 +49,6 @@ const services = { const EventListenersView = require('./content/views/event-listeners-view'); const actions = require('./content/actions/event-listeners'); -Object.defineProperties(this, { - "store": { - value: store, - enumerable: true, - writable: false - }, - "services": { - value: services, - enumerable: true, - writable: false - } -}); - /** * Object defining the debugger view components. */ diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js index 4fe42eb6438..ff259780cc2 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next-console.js @@ -40,13 +40,11 @@ function test() { let updatedFrame = yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES); let variables = gDebugger.DebuggerView.Variables; - is(variables._store.length, 3, "Correct number of scopes available"); + is(variables._store.length, 2, "Correct number of scopes available"); is(variables.getScopeAtIndex(0).name, "With scope [Object]", "Paused with correct scope (0)"); - is(variables.getScopeAtIndex(1).name, "Block scope", + is(variables.getScopeAtIndex(1).name, "Global scope [Window]", "Paused with correct scope (1)"); - is(variables.getScopeAtIndex(2).name, "Global scope [Window]", - "Paused with correct scope (2)"); let onceResumed = gTarget.once("thread-resumed"); EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js index edded224faa..af7064ee8c6 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_break-on-next.js @@ -49,15 +49,13 @@ function test() { let updatedFrame = yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES); let variables = gDebugger.DebuggerView.Variables; - is(variables._store.length, 4, "Correct number of scopes available"); + is(variables._store.length, 3, "Correct number of scopes available"); is(variables.getScopeAtIndex(0).name, "Function scope [interval<]", "Paused with correct scope (0)"); is(variables.getScopeAtIndex(1).name, "Block scope", "Paused with correct scope (1)"); - is(variables.getScopeAtIndex(2).name, "Block scope", + is(variables.getScopeAtIndex(2).name, "Global scope [Window]", "Paused with correct scope (2)"); - is(variables.getScopeAtIndex(3).name, "Global scope [Window]", - "Paused with correct scope (3)"); yield evalInTab(gTab, "clearInterval(interval)"); let onceResumed = gTarget.once("thread-resumed"); @@ -78,21 +76,15 @@ function test() { let updatedFrame = yield waitForDebuggerEvents(gPanel, gDebugger.EVENTS.FETCHED_SCOPES); let variables = gDebugger.DebuggerView.Variables; - is(variables._store.length, 6, "Correct number of scopes available"); + is(variables._store.length, 4, "Correct number of scopes available"); is(variables.getScopeAtIndex(0).name, "Function scope [onclick]", "Paused with correct scope (0)"); - // Non-syntactic lexical scope introduced by non-syntactic scope chain. - is(variables.getScopeAtIndex(1).name, "Block scope", + is(variables.getScopeAtIndex(1).name, "With scope [HTMLButtonElement]", "Paused with correct scope (1)"); - is(variables.getScopeAtIndex(2).name, "With scope [HTMLButtonElement]", + is(variables.getScopeAtIndex(2).name, "With scope [HTMLDocument]", "Paused with correct scope (2)"); - is(variables.getScopeAtIndex(3).name, "With scope [HTMLDocument]", + is(variables.getScopeAtIndex(3).name, "Global scope [Window]", "Paused with correct scope (3)"); - // Global lexical scope. - is(variables.getScopeAtIndex(4).name, "Block scope", - "Paused with correct scope (4)"); - is(variables.getScopeAtIndex(5).name, "Global scope [Window]", - "Paused with correct scope (5)"); let onceResumed = gTarget.once("thread-resumed"); EventUtils.sendMouseEvent({ type: "mousedown" }, gResumeButton, gDebugger); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js b/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js index bb0775590ea..edfb63dc161 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-01.js @@ -53,8 +53,8 @@ function testPauseOnExceptionsDisabled() { is(gFrames.itemCount, 1, "Should have one frame."); - is(gVariables._store.length, 4, - "Should have four scopes."); + is(gVariables._store.length, 3, + "Should have three scopes."); is(innerNodes[0].querySelector(".name").getAttribute("value"), "this", "Should have the right property name for 'this'."); @@ -96,8 +96,8 @@ function testPauseOnExceptionsEnabled() { is(gFrames.itemCount, 1, "Should have one frame."); - is(gVariables._store.length, 4, - "Should have four scopes."); + is(gVariables._store.length, 3, + "Should have three scopes."); is(innerNodes[0].querySelector(".name").getAttribute("value"), "", "Should have the right property name for ."); @@ -117,8 +117,8 @@ function testPauseOnExceptionsEnabled() { is(gFrames.itemCount, 1, "Should have one frame."); - is(gVariables._store.length, 4, - "Should have four scopes."); + is(gVariables._store.length, 3, + "Should have three scopes."); is(innerNodes[0].querySelector(".name").getAttribute("value"), "this", "Should have the right property name for 'this'."); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js b/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js index 547e86b5c27..f44f6c3ddb4 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_pause-exceptions-02.js @@ -52,8 +52,8 @@ function testPauseOnExceptionsAfterReload() { is(gFrames.itemCount, 1, "Should have one frame."); - is(gVariables._store.length, 4, - "Should have four scopes."); + is(gVariables._store.length, 3, + "Should have three scopes."); is(innerNodes[0].querySelector(".name").getAttribute("value"), "", "Should have the right property name for ."); @@ -73,8 +73,8 @@ function testPauseOnExceptionsAfterReload() { is(gFrames.itemCount, 1, "Should have one frame."); - is(gVariables._store.length, 4, - "Should have four scopes."); + is(gVariables._store.length, 3, + "Should have three scopes."); is(innerNodes[0].querySelector(".name").getAttribute("value"), "this", "Should have the right property name for 'this'."); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js index f02a03ff386..fa6901d081b 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-06.js @@ -7,7 +7,7 @@ const TAB_URL = EXAMPLE_URL + "doc_promise.html"; -var test = Task.async(function* () { +const test = Task.async(function* () { const [tab,, panel] = yield initDebugger(TAB_URL); yield ensureSourceIs(panel, "doc_promise.html", true); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-01.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-01.js index cc864c9a04a..b3f1bd49ab9 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-01.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-01.js @@ -44,8 +44,7 @@ function testVariablesAndPropertiesFiltering() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let protoVar = localScope.get("__proto__"); let constrVar = protoVar.get("constructor"); let proto2Var = constrVar.get("__proto__"); @@ -58,8 +57,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should be expanded."); is(functionScope.expanded, true, "The functionScope should be expanded."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope should be expanded."); is(globalScope.expanded, true, "The globalScope should be expanded."); @@ -78,8 +75,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 variables displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be 0 variables displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, - "There should be 0 variables displayed in the global lexical scope."); is(globalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be 0 variables displayed in the global scope."); @@ -87,8 +82,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 properties displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, - "There should be 0 properties displayed in the global lexical scope."); is(globalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the global scope."); @@ -113,7 +106,6 @@ function testVariablesAndPropertiesFiltering() { localScope.collapse(); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); protoVar.collapse(); constrVar.collapse(); @@ -126,8 +118,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should not be expanded."); is(functionScope.expanded, false, "The functionScope should not be expanded."); - is(globalLexicalScope.expanded, false, - "The globalLexicalScope should not be expanded."); is(globalScope.expanded, false, "The globalScope should not be expanded."); @@ -155,17 +145,14 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); is(withScope.expanded, false, "The withScope should not be expanded yet."); is(functionScope.expanded, false, - "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalLexicalScope should not be expanded yet."); + "The functionScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -177,9 +164,7 @@ function prepareVariablesAndProperties() { is(withScope.expanded, true, "The withScope should now be expanded."); is(functionScope.expanded, true, - "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope should be expanded."); + "The functionScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); @@ -221,7 +206,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-02.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-02.js index 80c9095327b..240147089a1 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-02.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-02.js @@ -44,8 +44,7 @@ function testVariablesAndPropertiesFiltering() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let protoVar = localScope.get("__proto__"); let constrVar = protoVar.get("constructor"); let proto2Var = constrVar.get("__proto__"); @@ -58,8 +57,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should be expanded."); is(functionScope.expanded, true, "The functionScope should be expanded."); - is(globalLexicalScope.expanded, true, - "The globalScope should be expanded."); is(globalScope.expanded, true, "The globalScope should be expanded."); @@ -78,8 +75,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 variables displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be 0 variables displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, - "There should be no variables displayed in the global lexical scope."); is(globalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be no variables displayed in the global scope."); @@ -89,8 +84,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 properties displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, - "There should be 0 properties displayed in the global lexical scope."); is(globalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the global scope."); @@ -120,7 +113,6 @@ function testVariablesAndPropertiesFiltering() { localScope.collapse(); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); protoVar.collapse(); constrVar.collapse(); @@ -133,8 +125,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should not be expanded."); is(functionScope.expanded, false, "The functionScope should not be expanded."); - is(globalLexicalScope.expanded, false, - "The globalScope should not be expanded."); is(globalScope.expanded, false, "The globalScope should not be expanded."); @@ -163,8 +153,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -172,8 +161,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -186,8 +173,6 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); @@ -229,7 +214,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-03.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-03.js index a444b7e60a7..88f5ff8cb99 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-03.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-03.js @@ -43,8 +43,7 @@ function testVariablesAndPropertiesFiltering() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); function testFiltered() { is(localScope.expanded, true, @@ -53,8 +52,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should be expanded."); is(functionScope.expanded, true, "The functionScope should be expanded."); - is(globalLexicalScope.expanded, true, - "The globalScope should be expanded."); is(globalScope.expanded, true, "The globalScope should be expanded."); @@ -64,8 +61,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 variables displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be 0 variables displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, - "There should be 0 variables displayed in the global scope."); is(globalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length, 0, "There should be 0 variables displayed in the global scope."); @@ -75,8 +70,6 @@ function testVariablesAndPropertiesFiltering() { "There should be 0 properties displayed in the with scope."); is(functionScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the function scope."); - is(globalLexicalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, - "There should be 0 properties displayed in the global scope."); is(globalScope.target.querySelectorAll(".variables-view-property:not([unmatched])").length, 0, "There should be 0 properties displayed in the global scope."); } @@ -93,7 +86,6 @@ function testVariablesAndPropertiesFiltering() { localScope.collapse(); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); is(localScope.expanded, false, @@ -102,8 +94,6 @@ function testVariablesAndPropertiesFiltering() { "The withScope should not be expanded."); is(functionScope.expanded, false, "The functionScope should not be expanded."); - is(globalLexicalScope.expanded, false, - "The globalScope should not be expanded."); is(globalScope.expanded, false, "The globalScope should not be expanded."); @@ -125,8 +115,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -134,8 +123,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -148,8 +135,6 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); @@ -158,7 +143,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-04.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-04.js index ed69dbc6f83..1eb4748efba 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-04.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-04.js @@ -44,110 +44,108 @@ function testVariablesAndPropertiesFiltering() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let step = 0; let tests = [ function() { - assertExpansion([true, false, false, false, false]); + assertExpansion([true, false, false, false]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, false, false, false, false]); + assertExpansion([true, false, false, false]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, false, false, false, false]); + assertExpansion([true, false, false, false]); gEditor.focus(); }, function() { - assertExpansion([true, false, false, false, false]); + assertExpansion([true, false, false, false]); typeText(gSearchBox, "*"); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); gEditor.focus(); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); backspaceText(gSearchBox, 1); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); gEditor.focus(); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); localScope.collapse(); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); }, function() { - assertExpansion([false, false, false, false, false]); + assertExpansion([false, false, false, false]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([false, false, false, false, false]); + assertExpansion([false, false, false, false]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([false, false, false, false, false]); + assertExpansion([false, false, false, false]); gEditor.focus(); }, function() { - assertExpansion([false, false, false, false, false]); + assertExpansion([false, false, false, false]); clearText(gSearchBox); typeText(gSearchBox, "*"); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); gEditor.focus(); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); backspaceText(gSearchBox, 1); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); EventUtils.sendKey("RETURN", gDebugger); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); gEditor.focus(); }, function() { - assertExpansion([true, true, true, true, true]); + assertExpansion([true, true, true, true]); } ]; @@ -164,12 +162,8 @@ function testVariablesAndPropertiesFiltering() { "The functionScope should " + (aFlags[2] ? "" : "not ") + "be expanded at this point (" + step + ")."); - is(globalLexicalScope.expanded, aFlags[3], - "The globalLexicalScope should " + (aFlags[3] ? "" : "not ") + - "be expanded at this point (" + step + ")."); - - is(globalScope.expanded, aFlags[4], - "The globalScope should " + (aFlags[4] ? "" : "not ") + + is(globalScope.expanded, aFlags[3], + "The globalScope should " + (aFlags[3] ? "" : "not ") + "be expanded at this point (" + step + ")."); step++; @@ -184,8 +178,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -193,8 +186,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalLexicalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -207,14 +198,11 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); deferred.resolve(); @@ -222,7 +210,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-05.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-05.js index b1ee7d217b3..8d24fb300ac 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-05.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-filter-05.js @@ -43,18 +43,17 @@ function testVariablesAndPropertiesFiltering() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let step = 0; let tests = [ function() { - assertScopeExpansion([true, false, false, false, false]); + assertScopeExpansion([true, false, false, false]); typeText(gSearchBox, "*arguments"); }, function() { - assertScopeExpansion([true, true, true, true, true]); - assertVariablesCountAtLeast([0, 0, 1, 0, 0]); + assertScopeExpansion([true, true, true, true]); + assertVariablesCountAtLeast([0, 0, 1, 0]); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched]) > .title > .name")[0].getAttribute("value"), "arguments", "The arguments pseudoarray should be visible."); @@ -64,8 +63,8 @@ function testVariablesAndPropertiesFiltering() { backspaceText(gSearchBox, 6); }, function() { - assertScopeExpansion([true, true, true, true, true]); - assertVariablesCountAtLeast([0, 0, 1, 0, 1]); + assertScopeExpansion([true, true, true, true]); + assertVariablesCountAtLeast([0, 0, 1, 1]); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched]) > .title > .name")[0].getAttribute("value"), "arguments", "The arguments pseudoarray should be visible."); @@ -80,8 +79,8 @@ function testVariablesAndPropertiesFiltering() { backspaceText(gSearchBox, 2); }, function() { - assertScopeExpansion([true, true, true, true, true]); - assertVariablesCountAtLeast([0, 1, 3, 0, 1]); + assertScopeExpansion([true, true, true, true]); + assertVariablesCountAtLeast([0, 1, 3, 1]); is(functionScope.target.querySelectorAll(".variables-view-variable:not([unmatched]) > .title > .name")[0].getAttribute("value"), "aNumber", "The aNumber param should be visible."); @@ -101,8 +100,8 @@ function testVariablesAndPropertiesFiltering() { backspaceText(gSearchBox, 1); }, function() { - assertScopeExpansion([true, true, true, true, true]); - assertVariablesCountAtLeast([4, 1, 3, 0, 1]); + assertScopeExpansion([true, true, true, true]); + assertVariablesCountAtLeast([4, 1, 3, 1]); is(localScope.target.querySelectorAll(".variables-view-variable:not([unmatched]) > .title > .name")[0].getAttribute("value"), "this", "The this reference should be visible."); @@ -154,12 +153,8 @@ function testVariablesAndPropertiesFiltering() { "The functionScope should " + (aFlags[2] ? "" : "not ") + "be expanded at this point (" + step + ")."); - is(globalLexicalScope.expanded, aFlags[3], - "The globalLexicalScope should " + (aFlags[3] ? "" : "not ") + - "be expanded at this point (" + step + ")."); - - is(globalScope.expanded, aFlags[4], - "The globalScope should " + (aFlags[4] ? "" : "not ") + + is(globalScope.expanded, aFlags[3], + "The globalScope should " + (aFlags[3] ? "" : "not ") + "be expanded at this point (" + step + ")."); } @@ -176,12 +171,8 @@ function testVariablesAndPropertiesFiltering() { "There should be " + aCounts[2] + " variable displayed in the function scope (" + step + ")."); - ok(globalLexicalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length >= aCounts[3], + ok(globalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length >= aCounts[3], "There should be " + aCounts[3] + - " variable displayed in the global scope (" + step + ")."); - - ok(globalScope.target.querySelectorAll(".variables-view-variable:not([unmatched])").length >= aCounts[4], - "There should be " + aCounts[4] + " variable displayed in the global scope (" + step + ")."); step++; @@ -196,8 +187,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -205,8 +195,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -219,14 +207,11 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); withScope.collapse(); functionScope.collapse(); - globalLexicalScope.collapse(); globalScope.collapse(); deferred.resolve(); @@ -234,7 +219,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-01.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-01.js index f175f933299..320ee4104d1 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-01.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-01.js @@ -35,35 +35,27 @@ function test() { function initialChecks() { let scopeNodes = gDebugger.document.querySelectorAll(".variables-view-scope"); - is(scopeNodes.length, 3, - "There should be 3 scopes available."); + is(scopeNodes.length, 2, + "There should be 2 scopes available."); ok(scopeNodes[0].querySelector(".name").getAttribute("value").includes("[test]"), "The local scope should be properly identified."); - ok(scopeNodes[1].querySelector(".name").getAttribute("value").includes("Block"), - "The global lexical scope should be properly identified."); - ok(scopeNodes[2].querySelector(".name").getAttribute("value").includes("[Window]"), + ok(scopeNodes[1].querySelector(".name").getAttribute("value").includes("[Window]"), "The global scope should be properly identified."); is(gVariables.getScopeAtIndex(0).target, scopeNodes[0], "getScopeAtIndex(0) didn't return the expected scope."); is(gVariables.getScopeAtIndex(1).target, scopeNodes[1], "getScopeAtIndex(1) didn't return the expected scope."); - is(gVariables.getScopeAtIndex(2).target, scopeNodes[2], - "getScopeAtIndex(2) didn't return the expected scope."); is(gVariables.getItemForNode(scopeNodes[0]).target, scopeNodes[0], "getItemForNode([0]) didn't return the expected scope."); is(gVariables.getItemForNode(scopeNodes[1]).target, scopeNodes[1], "getItemForNode([1]) didn't return the expected scope."); - is(gVariables.getItemForNode(scopeNodes[2]).target, scopeNodes[2], - "getItemForNode([2]) didn't return the expected scope."); is(gVariables.getItemForNode(scopeNodes[0]).expanded, true, "The local scope should be expanded by default."); is(gVariables.getItemForNode(scopeNodes[1]).expanded, false, - "The global lexical scope should not be collapsed by default."); - is(gVariables.getItemForNode(scopeNodes[2]).expanded, false, "The global scope should not be collapsed by default."); } diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-03.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-03.js index 2866c2ce190..7b076813876 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-03.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-frame-parameters-03.js @@ -38,7 +38,7 @@ function test() { function expandGlobalScope() { let deferred = promise.defer(); - let globalScope = gVariables.getScopeAtIndex(2); + let globalScope = gVariables.getScopeAtIndex(1); is(globalScope.expanded, false, "The global scope should not be expanded by default."); @@ -52,7 +52,7 @@ function expandGlobalScope() { } function testGlobalScope() { - let globalScope = gVariables.getScopeAtIndex(2); + let globalScope = gVariables.getScopeAtIndex(1); is(globalScope.expanded, true, "The global scope should now be expanded."); @@ -92,7 +92,7 @@ function testGlobalScope() { function expandWindowVariable() { let deferred = promise.defer(); - let windowVar = gVariables.getScopeAtIndex(2).get("window"); + let windowVar = gVariables.getScopeAtIndex(1).get("window"); is(windowVar.expanded, false, "The window variable should not be expanded by default."); @@ -106,7 +106,7 @@ function expandWindowVariable() { } function testWindowVariable() { - let windowVar = gVariables.getScopeAtIndex(2).get("window"); + let windowVar = gVariables.getScopeAtIndex(1).get("window"); is(windowVar.expanded, true, "The window variable should now be expanded."); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-override-01.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-override-01.js index 3b7c08977c8..84391a08fe8 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-override-01.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-override-01.js @@ -21,13 +21,11 @@ function test() { let firstScope = variables.getScopeAtIndex(0); let secondScope = variables.getScopeAtIndex(1); let thirdScope = variables.getScopeAtIndex(2); - let globalLexicalScope = variables.getScopeAtIndex(3); - let globalScope = variables.getScopeAtIndex(4); + let globalScope = variables.getScopeAtIndex(3); ok(firstScope, "The first scope is available."); ok(secondScope, "The second scope is available."); ok(thirdScope, "The third scope is available."); - ok(globalLexicalScope, "The global lexical scope is available."); ok(globalScope, "The global scope is available."); is(firstScope.name, "Function scope [secondNest]", @@ -36,8 +34,6 @@ function test() { "The second scope's name is correct."); is(thirdScope.name, "Function scope [test]", "The third scope's name is correct."); - is(globalLexicalScope.name, "Block scope", - "The global lexical scope's name is correct."); is(globalScope.name, "Global scope [Window]", "The global scope's name is correct."); @@ -47,8 +43,6 @@ function test() { "The second scope's expansion state is correct."); is(thirdScope.expanded, false, "The third scope's expansion state is correct."); - is(globalLexicalScope.expanded, false, - "The global lexical scope's expansion state is correct."); is(globalScope.expanded, false, "The global scope's expansion state is correct."); @@ -58,8 +52,6 @@ function test() { "The second scope should have no variables available yet."); is(thirdScope._store.size, 0, "The third scope should have no variables available yet."); - is(globalLexicalScope._store.size, 0, - "The global scope should have no variables available yet."); is(globalScope._store.size, 0, "The global scope should have no variables available yet."); @@ -108,7 +100,6 @@ function test() { fetched = waitForDebuggerEvents(panel, events.FETCHED_VARIABLES); secondScope.expand(); thirdScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); yield fetched; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-popup-16.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-popup-16.js index 676878d245c..4b4e0407e1e 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-popup-16.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-popup-16.js @@ -42,7 +42,7 @@ function test() { } function expandGlobalScope() { - let globalScope = variables.getScopeAtIndex(2); + let globalScope = variables.getScopeAtIndex(1); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-01.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-01.js index 70a638e85e5..5beab91342a 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-01.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-01.js @@ -74,8 +74,7 @@ function testVariablesExpand() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let thisVar = localScope.get("this"); let windowVar = thisVar.get("window"); @@ -86,8 +85,6 @@ function testVariablesExpand() { "The withScope arrow should still be expanded."); is(functionScope.target.querySelector(".arrow").hasAttribute("open"), true, "The functionScope arrow should still be expanded."); - is(globalLexicalScope.target.querySelector(".arrow").hasAttribute("open"), true, - "The globalLexicalScope arrow should still be expanded."); is(globalScope.target.querySelector(".arrow").hasAttribute("open"), true, "The globalScope arrow should still be expanded."); is(thisVar.target.querySelector(".arrow").hasAttribute("open"), true, @@ -101,8 +98,6 @@ function testVariablesExpand() { "The withScope enumerables should still be expanded."); is(functionScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, "The functionScope enumerables should still be expanded."); - is(globalLexicalScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, - "The globalLexicalScope enumerables should still be expanded."); is(globalScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, "The globalScope enumerables should still be expanded."); is(thisVar.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, @@ -116,8 +111,6 @@ function testVariablesExpand() { "The withScope expanded getter should return true."); is(functionScope.expanded, true, "The functionScope expanded getter should return true."); - is(globalLexicalScope.expanded, true, - "The globalScope expanded getter should return true."); is(globalScope.expanded, true, "The globalScope expanded getter should return true."); is(thisVar.expanded, true, @@ -132,8 +125,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -141,8 +133,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalLexicalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -155,8 +145,6 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); @@ -198,7 +186,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-02.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-02.js index 4da9046db63..67e0abe843c 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-02.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-reexpand-02.js @@ -75,8 +75,7 @@ function testVariablesExpand() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); let thisVar = localScope.get("this"); let windowVar = thisVar.get("window"); @@ -89,8 +88,6 @@ function testVariablesExpand() { "The withScope arrow should still be expanded."); is(functionScope.target.querySelector(".arrow").hasAttribute("open"), true, "The functionScope arrow should still be expanded."); - is(globalLexicalScope.target.querySelector(".arrow").hasAttribute("open"), true, - "The globalLexicalScope arrow should still be expanded."); is(globalScope.target.querySelector(".arrow").hasAttribute("open"), true, "The globalScope arrow should still be expanded."); is(thisVar.target.querySelector(".arrow").hasAttribute("open"), true, @@ -108,8 +105,6 @@ function testVariablesExpand() { "The withScope enumerables should still be expanded."); is(functionScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, "The functionScope enumerables should still be expanded."); - is(globalLexicalScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, - "The globalLexicalScope enumerables should still be expanded."); is(globalScope.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, "The globalScope enumerables should still be expanded."); is(thisVar.target.querySelector(".variables-view-element-details").hasAttribute("open"), true, @@ -127,8 +122,6 @@ function testVariablesExpand() { "The withScope expanded getter should return true."); is(functionScope.expanded, true, "The functionScope expanded getter should return true."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope expanded getter should return true."); is(globalScope.expanded, true, "The globalScope expanded getter should return true."); is(thisVar.expanded, true, @@ -147,8 +140,7 @@ function prepareVariablesAndProperties() { let localScope = gVariables.getScopeAtIndex(0); let withScope = gVariables.getScopeAtIndex(1); let functionScope = gVariables.getScopeAtIndex(2); - let globalLexicalScope = gVariables.getScopeAtIndex(3); - let globalScope = gVariables.getScopeAtIndex(4); + let globalScope = gVariables.getScopeAtIndex(3); is(localScope.expanded, true, "The localScope should be expanded."); @@ -156,8 +148,6 @@ function prepareVariablesAndProperties() { "The withScope should not be expanded yet."); is(functionScope.expanded, false, "The functionScope should not be expanded yet."); - is(globalLexicalScope.expanded, false, - "The globalLexicalScope should not be expanded yet."); is(globalScope.expanded, false, "The globalScope should not be expanded yet."); @@ -170,8 +160,6 @@ function prepareVariablesAndProperties() { "The withScope should now be expanded."); is(functionScope.expanded, true, "The functionScope should now be expanded."); - is(globalLexicalScope.expanded, true, - "The globalLexicalScope should now be expanded."); is(globalScope.expanded, true, "The globalScope should now be expanded."); @@ -213,7 +201,6 @@ function prepareVariablesAndProperties() { withScope.expand(); functionScope.expand(); - globalLexicalScope.expand(); globalScope.expand(); return deferred.promise; diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-webidl.js b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-webidl.js index f21c78e41c1..4988755bf1b 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-webidl.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_variables-view-webidl.js @@ -36,7 +36,7 @@ function test() { function expandGlobalScope() { let deferred = promise.defer(); - let globalScope = gVariables.getScopeAtIndex(2); + let globalScope = gVariables.getScopeAtIndex(1); is(globalScope.expanded, false, "The global scope should not be expanded by default."); @@ -51,7 +51,7 @@ function expandGlobalScope() { function performTest() { let deferred = promise.defer(); - let globalScope = gVariables.getScopeAtIndex(2); + let globalScope = gVariables.getScopeAtIndex(1); let buttonVar = globalScope.get("button"); let buttonAsProtoVar = globalScope.get("buttonAsProto"); diff --git a/devtools/client/debugger/test/mochitest/doc_function-search.html b/devtools/client/debugger/test/mochitest/doc_function-search.html index eb0e7eaeae9..711a873edb7 100644 --- a/devtools/client/debugger/test/mochitest/doc_function-search.html +++ b/devtools/client/debugger/test/mochitest/doc_function-search.html @@ -17,10 +17,10 @@