Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html

Issue 2217783002: DevTools: use view locations in the elements and sources sidebars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html
diff --git a/third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html b/third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html
index 7be8a911019cc0f2e92b70bd11df55ea209911a5..29325a07ccc515986c7c966486d70a6e42bdb64f 100644
--- a/third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html
+++ b/third_party/WebKit/LayoutTests/inspector/tabbed-pane-closeable-persistence.html
@@ -4,29 +4,40 @@
<script type="text/javascript">
var test = function()
{
- function logPersistenceSetting()
- {
- InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(tabbedPaneController._closeableTabSetting.get()));
- }
-
- var tabbedPaneController = WebInspector.inspectorView._drawerTabbedLocation;
+ var tabbedLocation = WebInspector.viewManager.createTabbedLocation();
logPersistenceSetting();
+
// Show a closeable tab.
- tabbedPaneController.showView("sensors");
+ var sensors = new WebInspector.SimpleView("sensors");
+ sensors.isCloseable = function() { return true; }
+ tabbedLocation.showView(sensors);
logPersistenceSetting();
- tabbedPaneController.showView("sensors");
+
+ // Repeat.
+ tabbedLocation.showView(sensors);
logPersistenceSetting();
+
// Show a permanent tab.
- tabbedPaneController.showView("console");
+ var console = new WebInspector.SimpleView("console");
+ tabbedLocation.showView(console);
logPersistenceSetting();
- // Show temporary tab.
- tabbedPaneController.showView("sources.history");
+
+ // Show transient tab.
+ var history = new WebInspector.SimpleView("history");
+ history.isTransient = function() { return true; }
+ tabbedLocation.showView(history);
logPersistenceSetting();
+
// Close closeable tab.
- tabbedPaneController.tabbedPane().closeTab("sensors");
+ tabbedLocation.tabbedPane().closeTab("sensors");
logPersistenceSetting();
InspectorTest.completeTest();
+
+ function logPersistenceSetting()
+ {
+ InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(tabbedLocation._closeableTabSetting.get()));
+ }
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698