| 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 src="../http/tests/inspector/resources-test.js"></script> | 4 <script src="../http/tests/inspector/resources-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function addItem(key, value) | 7 function addItem(key, value) |
| 8 { | 8 { |
| 9 localStorage.setItem(key, value); | 9 localStorage.setItem(key, value); |
| 10 } | 10 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 var storages = InspectorTest.domStorageModel().storages(); | 59 var storages = InspectorTest.domStorageModel().storages(); |
| 60 for (var i = 0; i < storages.length; ++i) { | 60 for (var i = 0; i < storages.length; ++i) { |
| 61 if (storages[i].isLocalStorage) { | 61 if (storages[i].isLocalStorage) { |
| 62 storage = storages[i]; | 62 storage = storages[i]; |
| 63 break; | 63 break; |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 | 66 |
| 67 InspectorTest.assertTrue(!!storage, "Local storage not found."); | 67 InspectorTest.assertTrue(!!storage, "Local storage not found."); |
| 68 | 68 |
| 69 WebInspector.panels.resources._showDOMStorage(storage); | 69 UI.panels.resources._showDOMStorage(storage); |
| 70 view = WebInspector.panels.resources._domStorageViews.get(storage); | 70 view = UI.panels.resources._domStorageViews.get(storage); |
| 71 InspectorTest.addSniffer(view, "_dataGridForDOMStorageItems", viewUp
dated); | 71 InspectorTest.addSniffer(view, "_dataGridForDOMStorageItems", viewUp
dated); |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 function addItemTest(next) | 74 function addItemTest(next) |
| 75 { | 75 { |
| 76 var indicesToAdd = [1, 2, 3, 4, 5, 6]; | 76 var indicesToAdd = [1, 2, 3, 4, 5, 6]; |
| 77 | 77 |
| 78 function itemAdded() | 78 function itemAdded() |
| 79 { | 79 { |
| 80 dumpDataGrid(view._dataGrid.rootNode()); | 80 dumpDataGrid(view._dataGrid.rootNode()); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 } | 156 } |
| 157 ]); | 157 ]); |
| 158 } | 158 } |
| 159 </script> | 159 </script> |
| 160 </head> | 160 </head> |
| 161 | 161 |
| 162 <body onload="runTest()"> | 162 <body onload="runTest()"> |
| 163 <p>Test that storage panel is present and that it contains correct data whenever
localStorage is updated.</p> | 163 <p>Test that storage panel is present and that it contains correct data whenever
localStorage is updated.</p> |
| 164 </body> | 164 </body> |
| 165 </html> | 165 </html> |
| OLD | NEW |