| OLD | NEW |
| 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 var tabbedLocation = WebInspector.viewManager.createTabbedLocation(); | 7 var tabbedLocation = UI.viewManager.createTabbedLocation(); |
| 8 logPersistenceSetting(); | 8 logPersistenceSetting(); |
| 9 | 9 |
| 10 // Show a closeable tab. | 10 // Show a closeable tab. |
| 11 var sensors = new WebInspector.SimpleView("sensors"); | 11 var sensors = new UI.SimpleView("sensors"); |
| 12 sensors.isCloseable = function() { return true; } | 12 sensors.isCloseable = function() { return true; } |
| 13 tabbedLocation.showView(sensors); | 13 tabbedLocation.showView(sensors); |
| 14 logPersistenceSetting(); | 14 logPersistenceSetting(); |
| 15 | 15 |
| 16 // Repeat. | 16 // Repeat. |
| 17 tabbedLocation.showView(sensors); | 17 tabbedLocation.showView(sensors); |
| 18 logPersistenceSetting(); | 18 logPersistenceSetting(); |
| 19 | 19 |
| 20 // Show a permanent tab. | 20 // Show a permanent tab. |
| 21 var console = new WebInspector.SimpleView("console"); | 21 var console = new UI.SimpleView("console"); |
| 22 tabbedLocation.showView(console); | 22 tabbedLocation.showView(console); |
| 23 logPersistenceSetting(); | 23 logPersistenceSetting(); |
| 24 | 24 |
| 25 // Show transient tab. | 25 // Show transient tab. |
| 26 var history = new WebInspector.SimpleView("history"); | 26 var history = new UI.SimpleView("history"); |
| 27 history.isTransient = function() { return true; } | 27 history.isTransient = function() { return true; } |
| 28 tabbedLocation.showView(history); | 28 tabbedLocation.showView(history); |
| 29 logPersistenceSetting(); | 29 logPersistenceSetting(); |
| 30 | 30 |
| 31 // Close closeable tab. | 31 // Close closeable tab. |
| 32 tabbedLocation.tabbedPane().closeTab("sensors"); | 32 tabbedLocation.tabbedPane().closeTab("sensors"); |
| 33 logPersistenceSetting(); | 33 logPersistenceSetting(); |
| 34 | 34 |
| 35 InspectorTest.completeTest(); | 35 InspectorTest.completeTest(); |
| 36 | 36 |
| 37 function logPersistenceSetting() | 37 function logPersistenceSetting() |
| 38 { | 38 { |
| 39 InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(t
abbedLocation._closeableTabSetting.get())); | 39 InspectorTest.addResult("Closeable tabs to restore: " + JSON.stringify(t
abbedLocation._closeableTabSetting.get())); |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 </script> | 42 </script> |
| 43 </head> | 43 </head> |
| 44 <body onload="runTest()"> | 44 <body onload="runTest()"> |
| 45 <p>Tests extensible tabbed pane closeable tabs persistence logic.</p> | 45 <p>Tests extensible tabbed pane closeable tabs persistence logic.</p> |
| 46 </body> | 46 </body> |
| 47 </html> | 47 </html> |
| OLD | NEW |