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

Side by Side Diff: LayoutTests/inspector/storage-panel-dom-storage-update.html

Issue 22396002: function storageForId() should be used in _domStorageItemUpdated instead of DOMStorageModel._storag… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | LayoutTests/inspector/storage-panel-dom-storage-update-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> 4 <script>
5 5
6 function addItem(key, value) 6 function addItem(key, value)
7 { 7 {
8 localStorage.setItem(key, value); 8 localStorage.setItem(key, value);
9 } 9 }
10 10
11 function removeItem(key) 11 function removeItem(key)
12 { 12 {
13 localStorage.removeItem(key); 13 localStorage.removeItem(key);
14 } 14 }
15 15
16 function updateItem(key, newValue)
17 {
18 localStorage.setItem(key, newValue);
19 }
20
16 function clear() 21 function clear()
17 { 22 {
18 localStorage.clear(); 23 localStorage.clear();
19 } 24 }
20 25
21 function test() 26 function test()
22 { 27 {
23 var view = null; 28 var view = null;
24 29
25 // Resources panel must be visible 30 // Resources panel must be visible
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 InspectorTest.addResult(""); 120 InspectorTest.addResult("");
116 InspectorTest.addSniffer(view.domStorageModel, "_domStorageItemR emoved", itemRemoved); 121 InspectorTest.addSniffer(view.domStorageModel, "_domStorageItemR emoved", itemRemoved);
117 var command = "removeItem('key" + index + "');"; 122 var command = "removeItem('key" + index + "');";
118 InspectorTest.addResult(command); 123 InspectorTest.addResult(command);
119 InspectorTest.evaluateInPage(command); 124 InspectorTest.evaluateInPage(command);
120 } 125 }
121 126
122 removeItem(); 127 removeItem();
123 }, 128 },
124 129
130 function updateItemTest(next)
131 {
132 InspectorTest.addResult("");
133 InspectorTest.addSniffer(view.domStorageModel, "_domStorageItemUpdat ed", itemUpdated);
134 var command = "updateItem('key2', 'VALUE2');";
135 InspectorTest.addResult(command);
136 InspectorTest.evaluateInPage(command);
137
138 function itemUpdated()
139 {
140 dumpDataGrid(view._dataGrid.rootNode());
141 next();
142 }
143 },
144
125 function clearTest(next) 145 function clearTest(next)
126 { 146 {
127 function itemsCleared() 147 function itemsCleared()
128 { 148 {
129 dumpDataGrid(view._dataGrid.rootNode()); 149 dumpDataGrid(view._dataGrid.rootNode());
130 next(); 150 next();
131 } 151 }
132 152
133 InspectorTest.addResult(""); 153 InspectorTest.addResult("");
134 InspectorTest.addSniffer(view.domStorageModel, "_domStorageItemsClea red", itemsCleared); 154 InspectorTest.addSniffer(view.domStorageModel, "_domStorageItemsClea red", itemsCleared);
135 var command = "clear()"; 155 var command = "clear()";
136 InspectorTest.addResult(command); 156 InspectorTest.addResult(command);
137 InspectorTest.evaluateInPage(command); 157 InspectorTest.evaluateInPage(command);
138 } 158 }
139 ]); 159 ]);
140 } 160 }
141 </script> 161 </script>
142 </head> 162 </head>
143 163
144 <body onload="runTest()"> 164 <body onload="runTest()">
145 <p>Test that storage panel is present and that it contains correct data whenever localStorage is updated.</p> 165 <p>Test that storage panel is present and that it contains correct data whenever localStorage is updated.</p>
146 </body> 166 </body>
147 </html> 167 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/storage-panel-dom-storage-update-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698