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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script> 3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script type="text/javascript"> 4 <script type="text/javascript">
5 var test = function() 5 var test = function()
6 { 6 {
7 function logPersistenceSetting() 7 var tabbedLocation = WebInspector.viewManager.createTabbedLocation();
8 { 8 logPersistenceSetting();
9 InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(t abbedPaneController._closeableTabSetting.get()));
10 }
11 9
12 var tabbedPaneController = WebInspector.inspectorView._drawerTabbedLocation; 10 // Show a closeable tab.
11 var sensors = new WebInspector.SimpleView("sensors");
12 sensors.isCloseable = function() { return true; }
13 tabbedLocation.showView(sensors);
13 logPersistenceSetting(); 14 logPersistenceSetting();
14 // Show a closeable tab. 15
15 tabbedPaneController.showView("sensors"); 16 // Repeat.
17 tabbedLocation.showView(sensors);
16 logPersistenceSetting(); 18 logPersistenceSetting();
17 tabbedPaneController.showView("sensors"); 19
20 // Show a permanent tab.
21 var console = new WebInspector.SimpleView("console");
22 tabbedLocation.showView(console);
18 logPersistenceSetting(); 23 logPersistenceSetting();
19 // Show a permanent tab. 24
20 tabbedPaneController.showView("console"); 25 // Show transient tab.
26 var history = new WebInspector.SimpleView("history");
27 history.isTransient = function() { return true; }
28 tabbedLocation.showView(history);
21 logPersistenceSetting(); 29 logPersistenceSetting();
22 // Show temporary tab. 30
23 tabbedPaneController.showView("sources.history");
24 logPersistenceSetting();
25 // Close closeable tab. 31 // Close closeable tab.
26 tabbedPaneController.tabbedPane().closeTab("sensors"); 32 tabbedLocation.tabbedPane().closeTab("sensors");
27 logPersistenceSetting(); 33 logPersistenceSetting();
28 34
29 InspectorTest.completeTest(); 35 InspectorTest.completeTest();
36
37 function logPersistenceSetting()
38 {
39 InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(t abbedLocation._closeableTabSetting.get()));
40 }
30 } 41 }
31 </script> 42 </script>
32 </head> 43 </head>
33 <body onload="runTest()"> 44 <body onload="runTest()">
34 <p>Tests extensible tabbed pane closeable tabs persistence logic.</p> 45 <p>Tests extensible tabbed pane closeable tabs persistence logic.</p>
35 </body> 46 </body>
36 </html> 47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698