Web Inspector: change WebInspector.currentPanel getter/setter to functions.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 12:55:32 +0000 (12:55 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 12:55:32 +0000 (12:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68242

This is necessary for the panel switching performance tests.

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/front-end/Drawer.js:
(WebInspector.Drawer.prototype.show.animationFinished):
(WebInspector.Drawer.prototype.show):
(WebInspector.Drawer.prototype.hide):
(WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
(WebInspector.Drawer.prototype._animateDrawerHeight):
(WebInspector.Drawer.prototype._statusBarDragging):
* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype.switchToAndFocus):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showAnchorLocation):
* inspector/front-end/ScriptsPanel.js:
* inspector/front-end/SearchController.js:
(WebInspector.SearchController.prototype.updateSearchMatchesCount):
(WebInspector.SearchController.prototype.updateCurrentMatchIndex):
(WebInspector.SearchController.prototype.updateSearchLabel):
(WebInspector.SearchController.prototype.handleShortcut):
(WebInspector.SearchController.prototype._performSearch):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked):
(WebInspector.Toolbar.createPanelToolbarItem):
* inspector/front-end/inspector.js:
(WebInspector.currentPanel):
(WebInspector._updateFocusedNode):
(WebInspector.windowResize):
(WebInspector.documentKeyDown):
(WebInspector.documentCanCopy):
(WebInspector.documentCopy):
(WebInspector.showPanel):
(WebInspector.startUserInitiatedDebugging):
(WebInspector.inspect):
(WebInspector._showAnchorLocationInPanel):
(WebInspector._toolbarItemClicked):
(WebInspector.PanelHistory.prototype.goBack):
(WebInspector.PanelHistory.prototype.goForward):

Source/WebKit/chromium:

* src/js/Tests.js:
(.TestSuite.prototype.showPanel):

LayoutTests:

* http/tests/inspector/resource-tree/resource-tree-test.js:
(initialize_ResourceTreeTest.InspectorTest.dumpResourcesTree):
* inspector/debugger/debugger-expand-scope.html:
* inspector/debugger/debugger-proto-property.html:
* inspector/storage-panel-dom-storage.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95287 268f45cc-cd09-0410-ab3c-d52691b4dbfc

15 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/resource-tree/resource-tree-test.js
LayoutTests/inspector/debugger/debugger-expand-scope.html
LayoutTests/inspector/debugger/debugger-proto-property.html
LayoutTests/inspector/storage-panel-dom-storage.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/Drawer.js
Source/WebCore/inspector/front-end/ElementsPanel.js
Source/WebCore/inspector/front-end/ResourcesPanel.js
Source/WebCore/inspector/front-end/ScriptsPanel.js
Source/WebCore/inspector/front-end/SearchController.js
Source/WebCore/inspector/front-end/Toolbar.js
Source/WebCore/inspector/front-end/inspector.js
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/js/Tests.js

index 2da116a5d5f818381acec5a3cad0399bef17391d..524d35fab39d68332ca8c8a5fa853d0ec05ecbd6 100644 (file)
@@ -1,3 +1,18 @@
+2011-09-16  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: change WebInspector.currentPanel getter/setter to functions.
+        https://bugs.webkit.org/show_bug.cgi?id=68242
+
+        This is necessary for the panel switching performance tests.
+
+        Reviewed by Pavel Feldman.
+
+        * http/tests/inspector/resource-tree/resource-tree-test.js:
+        (initialize_ResourceTreeTest.InspectorTest.dumpResourcesTree):
+        * inspector/debugger/debugger-expand-scope.html:
+        * inspector/debugger/debugger-proto-property.html:
+        * inspector/storage-panel-dom-storage.html:
+
 2011-09-16  Balazs Kelemen  <kbalazs@webkit.org>
 
         [Qt][WK2] bot lucks mobility
index ba45428fb69cc91e8c56c6cbe3b4f46d5b90ae06..bad75bd5fff78a2e7fe76a4abe0848bee22aa6e2 100644 (file)
@@ -63,7 +63,7 @@ InspectorTest.dumpResourcesTree = function()
             dump(children[i], prefix + "    ");
     }
 
-    WebInspector.currentPanel = WebInspector.panels.resources;
+    WebInspector.setCurrentPanel(WebInspector.panels.resources);
     dump(WebInspector.panels.resources.resourcesListTreeElement, "");
 }
 
index 641402598c2090c2b5943f44951349d698840d0b..d5f04d4a9ba877392a4c9b70ad6618c047cab801 100644 (file)
@@ -35,7 +35,7 @@ function test()
     {
         // Expand all but global scopes. Expanding global scope takes for too long
         // so we keep it collapsed.
-        var sections = WebInspector.currentPanel.sidebarPanes.scopechain._sections;
+        var sections = WebInspector.currentPanel().sidebarPanes.scopechain._sections;
         // global scope is always the last one.
         for (var i = 0; i < sections.length - 1; i++)
             sections[i].expand();
index 8b6a442c831109adfcdb660d974abe62029c938f..52c5815a2c02858e0b1c94cea63d9b5d80e1d93d 100644 (file)
@@ -30,7 +30,7 @@ var test = function()
 
     function step2(callFrames)
     {
-        var sections = WebInspector.currentPanel.sidebarPanes.scopechain._sections;
+        var sections = WebInspector.currentPanel().sidebarPanes.scopechain._sections;
         var localScope = sections[0].propertiesTreeOutline;
         var properties = [
             localScope, ["o", "__proto__", "__proto__"],
index b2b3f498b365327900a125a931ad96c0cbe3c6cf..477871e0f0ef47d75e79c0e832e33148f629f64b 100644 (file)
@@ -30,7 +30,7 @@ function test()
         if (storages) {
             for (var i = 0; i < storages.length; i++) {
                 var storage = storages[i];
-                WebInspector.currentPanel.showDOMStorage(storage);
+                WebInspector.currentPanel().showDOMStorage(storage);
                 InspectorTest.addResult("Did show: " + name(storage));
             }
         } else
index f604a746f0fc7e68d7b8c236ac7503594fd6d591..a3bb7df45fc8d0a4b3690eac6ae1f0b3c9b88555 100644 (file)
@@ -1,3 +1,48 @@
+2011-09-16  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: change WebInspector.currentPanel getter/setter to functions.
+        https://bugs.webkit.org/show_bug.cgi?id=68242
+
+        This is necessary for the panel switching performance tests.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/Drawer.js:
+        (WebInspector.Drawer.prototype.show.animationFinished):
+        (WebInspector.Drawer.prototype.show):
+        (WebInspector.Drawer.prototype.hide):
+        (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished):
+        (WebInspector.Drawer.prototype._animateDrawerHeight):
+        (WebInspector.Drawer.prototype._statusBarDragging):
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.prototype.switchToAndFocus):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
+        * inspector/front-end/ScriptsPanel.js:
+        * inspector/front-end/SearchController.js:
+        (WebInspector.SearchController.prototype.updateSearchMatchesCount):
+        (WebInspector.SearchController.prototype.updateCurrentMatchIndex):
+        (WebInspector.SearchController.prototype.updateSearchLabel):
+        (WebInspector.SearchController.prototype.handleShortcut):
+        (WebInspector.SearchController.prototype._performSearch):
+        * inspector/front-end/Toolbar.js:
+        (WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked):
+        (WebInspector.Toolbar.createPanelToolbarItem):
+        * inspector/front-end/inspector.js:
+        (WebInspector.currentPanel):
+        (WebInspector._updateFocusedNode):
+        (WebInspector.windowResize):
+        (WebInspector.documentKeyDown):
+        (WebInspector.documentCanCopy):
+        (WebInspector.documentCopy):
+        (WebInspector.showPanel):
+        (WebInspector.startUserInitiatedDebugging):
+        (WebInspector.inspect):
+        (WebInspector._showAnchorLocationInPanel):
+        (WebInspector._toolbarItemClicked):
+        (WebInspector.PanelHistory.prototype.goBack):
+        (WebInspector.PanelHistory.prototype.goForward):
+
 2011-09-15  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: rename Console.clearConsoleMessages to Console.clearMessages, brush up console domain doc.
index 685a66f50077ea7090ec20214490e06a406e4900..f5362fdb96a4c5ac491efbcafdbfaf8ba0c84b8e 100644 (file)
@@ -122,8 +122,8 @@ WebInspector.Drawer.prototype = {
 
         function animationFinished()
         {
-            if ("updateStatusBarItems" in WebInspector.currentPanel)
-                WebInspector.currentPanel.updateStatusBarItems();
+            if ("updateStatusBarItems" in WebInspector.currentPanel())
+                WebInspector.currentPanel().updateStatusBarItems();
             if (this.visibleView.afterShow)
                 this.visibleView.afterShow();
             delete this._animating;
@@ -160,8 +160,8 @@ WebInspector.Drawer.prototype = {
         // like Elements in their updateStatusBarItems call will size things to fit the final location.
         this._mainStatusBar.style.setProperty("padding-left", (anchoredItems.offsetWidth - 1) + "px");
         document.body.removeStyleClass("drawer-visible");
-        if ("updateStatusBarItems" in WebInspector.currentPanel)
-            WebInspector.currentPanel.updateStatusBarItems();
+        if ("updateStatusBarItems" in WebInspector.currentPanel())
+            WebInspector.currentPanel().updateStatusBarItems();
         document.body.addStyleClass("drawer-visible");
 
         var animations = [
@@ -179,7 +179,7 @@ WebInspector.Drawer.prototype = {
 
         function animationFinished()
         {
-            WebInspector.currentPanel.doResize();
+            WebInspector.currentPanel().doResize();
             this._mainStatusBar.insertBefore(anchoredItems, this._mainStatusBar.firstChild);
             this._mainStatusBar.style.removeProperty("padding-left");
 
@@ -293,7 +293,7 @@ WebInspector.Drawer.prototype = {
 
         function animationFinished()
         {
-            WebInspector.currentPanel.doResize();
+            WebInspector.currentPanel().doResize();
             delete this._animating;
             delete this._currentAnimation;
             this.state = finalState;
@@ -343,8 +343,8 @@ WebInspector.Drawer.prototype = {
 
         this._mainElement.style.bottom = height + "px";
         this.element.style.height = height + "px";
-        if (WebInspector.currentPanel)
-            WebInspector.currentPanel.doResize();
+        if (WebInspector.currentPanel())
+            WebInspector.currentPanel().doResize();
 
         event.preventDefault();
         event.stopPropagation();
index 711783cfd9797e4da04c8e79c4c94606738b4fa2..e0b64d1e34144012efd718bb55a147f24125e10a 100644 (file)
@@ -297,7 +297,7 @@ WebInspector.ElementsPanel.prototype = {
     {
         // Reset search restore.
         WebInspector.searchController.cancelSearch();
-        WebInspector.currentPanel = this;
+        WebInspector.setCurrentPanel(this);
         this.selectDOMNode(node, true);
     },
 
index 885133d709d61b81029f55827fb3429901ac3858..773adbf986d7189de68401ae1b181dbfaf6a8400 100644 (file)
@@ -330,7 +330,7 @@ WebInspector.ResourcesPanel.prototype = {
         if (resource.type === WebInspector.Resource.Type.XHR) {
             // Show XHRs in the network panel only.
             if (WebInspector.panels.network && WebInspector.panels.network.canShowAnchorLocation(anchor)) {
-                WebInspector.currentPanel = WebInspector.panels.network;
+                WebInspector.setCurrentPanel(WebInspector.panels.network);
                 WebInspector.panels.network.showAnchorLocation(anchor);
             }
             return;
index b68b170816c191fd4c5388409ed3d6b86f86d789..40fde2b9114ad4a90b87d987eeef387b275684ac 100644 (file)
@@ -473,7 +473,7 @@ WebInspector.ScriptsPanel.prototype = {
 
         this._updateDebuggerButtons();
 
-        WebInspector.currentPanel = this;
+        WebInspector.setCurrentPanel(this);
 
         this.sidebarPanes.callstack.update(callFrames, details);
         this.sidebarPanes.callstack.selectedCallFrame = this._presentationModel.selectedCallFrame;
index f960eac79b0e8219405b67b70280e1ccc014242e..b4a39dccd92a08dd47e178aa6895f63d36814f9a 100644 (file)
@@ -44,23 +44,23 @@ WebInspector.SearchController.prototype = {
     updateSearchMatchesCount: function(matches, panel)
     {
         if (!panel)
-            panel = WebInspector.currentPanel;
+            panel = WebInspector.currentPanel();
 
         panel.currentSearchMatches = matches;
 
-        if (panel === WebInspector.currentPanel)
-            this._updateSearchMatchesCountAndCurrentMatchIndex(WebInspector.currentPanel.currentQuery && matches);
+        if (panel === WebInspector.currentPanel())
+            this._updateSearchMatchesCountAndCurrentMatchIndex(WebInspector.currentPanel().currentQuery && matches);
     },
 
     updateCurrentMatchIndex: function(currentMatchIndex, panel)
     {
-        if (panel === WebInspector.currentPanel)
+        if (panel === WebInspector.currentPanel())
             this._updateSearchMatchesCountAndCurrentMatchIndex(panel.currentSearchMatches, currentMatchIndex);
     },
 
     updateSearchLabel: function()
     {
-        var panelName = WebInspector.currentPanel && WebInspector.currentPanel.toolbarItemLabel;
+        var panelName = WebInspector.currentPanel() && WebInspector.currentPanel().toolbarItemLabel;
         if (!panelName)
             return;
         var newLabel = WebInspector.UIString("Search %s", panelName);
@@ -104,7 +104,7 @@ WebInspector.SearchController.prototype = {
                 break;
 
             case "U+0047": // G key
-                var currentPanel = WebInspector.currentPanel;
+                var currentPanel = WebInspector.currentPanel();
 
                 if (isMac && event.metaKey && !event.ctrlKey && !event.altKey) {
                     if (event.shiftKey) {
@@ -125,7 +125,7 @@ WebInspector.SearchController.prototype = {
         if (!this._currentQuery)
             return;
 
-        panel = WebInspector.currentPanel;
+        panel = WebInspector.currentPanel();
         if (panel.performSearch) {
             function performPanelSearch()
             {
@@ -256,7 +256,7 @@ WebInspector.SearchController.prototype = {
             return;
         }
 
-        var currentPanel = WebInspector.currentPanel;
+        var currentPanel = WebInspector.currentPanel();
         if (!repeatSearch && query === currentPanel.currentQuery && currentPanel.currentQuery === this._currentQuery) {
             // When this is the same query and a forced search, jump to the next
             // search result for a good user experience.
index 31223e141beb0f411fdc578796e54903062336a3..8eb510aceb63dd1e7bb2a74187dc40a85f79c4ea 100644 (file)
@@ -153,7 +153,7 @@ WebInspector.Toolbar.createPanelToolbarItem = function(panel)
     function onToolbarItemClicked()
     {
         WebInspector.toolbar._updateDropdownButtonAndHideDropdown();
-        WebInspector.currentPanel = panel;
+        WebInspector.setCurrentPanel(panel);
     }
     toolbarItem.addEventListener("click", onToolbarItemClicked);
 
@@ -162,7 +162,7 @@ WebInspector.Toolbar.createPanelToolbarItem = function(panel)
     if ("toolbarItemLabel" in panel)
         toolbarItem.createChild("div", "toolbar-label").textContent = panel.toolbarItemLabel;
 
-    if (panel === WebInspector.currentPanel)
+    if (panel === WebInspector.currentPanel())
         toolbarItem.addStyleClass("toggled-on");
 
     return toolbarItem;
index 4c6f9a8a7c8cf0abd8674e08fd5043bdc212f0e8..490dad2a5c9698d0b2a6e1a38b03ef10858fa28a 100644 (file)
@@ -118,12 +118,12 @@ var WebInspector = {
             this._previousFocusElement.blur();
     },
 
-    get currentPanel()
+    currentPanel: function()
     {
         return this._currentPanel;
     },
 
-    set currentPanel(x)
+    setCurrentPanel: function(x)
     {
         if (this._currentPanel === x)
             return;
@@ -402,7 +402,7 @@ var WebInspector = {
 
     _updateFocusedNode: function(nodeId)
     {
-        this.currentPanel = this.panels.elements;
+        this.setCurrentPanel(this.panels.elements);
         this.panels.elements.updateFocusedNode(nodeId);
     },
 
@@ -605,8 +605,8 @@ WebInspector.dispatchMessageFromBackend = function(messageObject)
 
 WebInspector.windowResize = function(event)
 {
-    if (this.currentPanel)
-        this.currentPanel.doResize();
+    if (this.currentPanel())
+        this.currentPanel().doResize();
     this.drawer.doResize();
     this.toolbar.resize();
 }
@@ -756,8 +756,8 @@ WebInspector.documentKeyDown = function(event)
         }
     }
 
-    if (this.currentPanel) {
-        this.currentPanel.handleShortcut(event);
+    if (this.currentPanel()) {
+        this.currentPanel().handleShortcut(event);
         if (event.handled) {
             event.preventDefault();
             return;
@@ -808,7 +808,7 @@ WebInspector.documentKeyDown = function(event)
                 var isRotateLeft = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
 
             if (isRotateLeft) {
-                var index = this.panelOrder.indexOf(this.currentPanel);
+                var index = this.panelOrder.indexOf(this.currentPanel());
                 index = (index === 0) ? this.panelOrder.length - 1 : index - 1;
                 this.panelOrder[index].toolbarItem.click();
                 event.preventDefault();
@@ -825,7 +825,7 @@ WebInspector.documentKeyDown = function(event)
                 var isRotateRight = event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey;
 
             if (isRotateRight) {
-                var index = this.panelOrder.indexOf(this.currentPanel);
+                var index = this.panelOrder.indexOf(this.currentPanel());
                 index = (index + 1) % this.panelOrder.length;
                 this.panelOrder[index].toolbarItem.click();
                 event.preventDefault();
@@ -850,14 +850,14 @@ WebInspector.documentKeyDown = function(event)
 
 WebInspector.documentCanCopy = function(event)
 {
-    if (this.currentPanel && this.currentPanel.handleCopyEvent)
+    if (this.currentPanel() && this.currentPanel().handleCopyEvent)
         event.preventDefault();
 }
 
 WebInspector.documentCopy = function(event)
 {
-    if (this.currentPanel && this.currentPanel.handleCopyEvent)
-        this.currentPanel.handleCopyEvent(event);
+    if (this.currentPanel() && this.currentPanel().handleCopyEvent)
+        this.currentPanel().handleCopyEvent(event);
 }
 
 WebInspector.contextMenuEventFired = function(event)
@@ -1019,12 +1019,12 @@ WebInspector.showPanel = function(panel)
         else
             panel = "elements";
     }
-    this.currentPanel = this.panels[panel];
+    this.setCurrentPanel(this.panels[panel]);
 }
 
 WebInspector.startUserInitiatedDebugging = function()
 {
-    this.currentPanel = this.panels.scripts;
+    this.setCurrentPanel(this.panels.scripts);
     WebInspector.debuggerModel.enableDebugger();
 }
 
@@ -1160,10 +1160,10 @@ WebInspector.inspect = function(payload, hints)
     }
 
     if (hints.databaseId) {
-        WebInspector.currentPanel = WebInspector.panels.resources;
+        WebInspector.setCurrentPanel(WebInspector.panels.resources);
         WebInspector.panels.resources.selectDatabase(hints.databaseId);
     } else if (hints.domStorageId) {
-        WebInspector.currentPanel = WebInspector.panels.resources;
+        WebInspector.setCurrentPanel(WebInspector.panels.resources);
         WebInspector.panels.resources.selectDOMStorage(hints.domStorageId);
     }
 
@@ -1220,10 +1220,10 @@ WebInspector._showAnchorLocationInPanel = function(anchor, panel)
         anchor.addStyleClass("webkit-html-resource-link");
     }
 
-    this.currentPanel = panel;
+    this.setCurrentPanel(panel);
     if (this.drawer)
         this.drawer.immediatelyFinishAnimation();
-    this.currentPanel.showAnchorLocation(anchor);
+    this.currentPanel().showAnchorLocation(anchor);
     return true;
 }
 
@@ -1606,7 +1606,7 @@ WebInspector.startEditing = function(element, config)
 WebInspector._toolbarItemClicked = function(event)
 {
     var toolbarItem = event.currentTarget;
-    this.currentPanel = toolbarItem.panel;
+    this.setCurrentPanel(toolbarItem.panel);
 }
 
 WebInspector.PanelHistory = function()
@@ -1624,7 +1624,7 @@ WebInspector.PanelHistory.prototype = {
     goBack: function()
     {
         this._inHistory = true;
-        WebInspector.currentPanel = WebInspector.panels[this._history[--this._historyIterator]];
+        WebInspector.setCurrentPanel(WebInspector.panels[this._history[--this._historyIterator]]);
         delete this._inHistory;
     },
 
@@ -1636,7 +1636,7 @@ WebInspector.PanelHistory.prototype = {
     goForward: function()
     {
         this._inHistory = true;
-        WebInspector.currentPanel = WebInspector.panels[this._history[++this._historyIterator]];
+        WebInspector.setCurrentPanel(WebInspector.panels[this._history[++this._historyIterator]]);
         delete this._inHistory;
     },
 
index feb3cf236024db79e26d7d42c8eddb30b6db4a01..fc6058717b338aec6747c62431a85bf2eca8f33d 100644 (file)
@@ -1,3 +1,15 @@
+2011-09-16  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Web Inspector: change WebInspector.currentPanel getter/setter to functions.
+        https://bugs.webkit.org/show_bug.cgi?id=68242
+
+        This is necessary for the panel switching performance tests.
+
+        Reviewed by Pavel Feldman.
+
+        * src/js/Tests.js:
+        (.TestSuite.prototype.showPanel):
+
 2011-09-15  Adam Barth  <abarth@webkit.org>
 
         Sigh.  Missed this one.
index 38c106b07b70614dc547e5d799f91ef12b069673..3c6dae0b5f728f304ac8b1f6e8659410fb2e84f8 100644 (file)
@@ -177,7 +177,7 @@ TestSuite.prototype.showPanel = function(panelName)
     var toolbar = document.getElementById("toolbar");
     var button = toolbar.getElementsByClassName(panelName)[0];
     button.click();
-    this.assertEquals(WebInspector.panels[panelName], WebInspector.currentPanel);
+    this.assertEquals(WebInspector.panels[panelName], WebInspector.currentPanel());
 };
 
 
@@ -252,7 +252,7 @@ TestSuite.prototype.testShowScriptsTab = function()
 TestSuite.prototype.testScriptsTabIsPopulatedOnInspectedPageRefresh = function()
 {
     var test = this;
-    this.assertEquals(WebInspector.panels.elements, WebInspector.currentPanel, "Elements panel should be current one.");
+    this.assertEquals(WebInspector.panels.elements, WebInspector.currentPanel(), "Elements panel should be current one.");
 
     this.addSniffer(WebInspector.panels.scripts, "reset", waitUntilScriptIsParsed);
 
@@ -364,8 +364,8 @@ TestSuite.prototype.testPauseWhenLoadingDevTools = function()
 
 
     // Script execution can already be paused.
-    if (WebInspector.currentPanel.paused) {
-        var callFrame = WebInspector.currentPanel._presentationModel.selectedCallFrame;
+    if (WebInspector.currentPanel().paused) {
+        var callFrame = WebInspector.currentPanel()._presentationModel.selectedCallFrame;
         this.assertEquals(expectations.functionsOnStack[0], callFrame.functionName);
         var callbackInvoked = false;
         this._checkSourceFrameWhenLoaded(expectations, function() {
@@ -592,7 +592,7 @@ TestSuite.prototype.showMainPageScriptSource_ = function(scriptName, callback)
         scriptResource = options[pageScriptIndex].representedObject;
 
         // Current panel is "Scripts".
-        WebInspector.currentPanel._showScriptOrResource(scriptResource);
+        WebInspector.currentPanel()._showScriptOrResource(scriptResource);
         test.assertEquals(pageScriptIndex, scriptSelect.selectedIndex, "Unexpected selected option index.");
     }
 
@@ -711,7 +711,7 @@ TestSuite.prototype._checkSourceFrameWhenLoaded = function(expectations, callbac
 {
     var test = this;
 
-    var frame = WebInspector.currentPanel.visibleView;
+    var frame = WebInspector.currentPanel().visibleView;
 
     if (frame._textViewer)
         checkExecLine();