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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/indexeddb-test.js

Issue 2902673003: Added a refresh database button on the IndexedDB view. (Closed)
Patch Set: Changed to use refreshDatabase() function instead of event listener, created database structure in … Created 3 years, 7 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 var initialize_IndexedDBTest = function() { 1 var initialize_IndexedDBTest = function() {
2 InspectorTest.preloadPanel("resources"); 2 InspectorTest.preloadPanel("resources");
3 3
4 InspectorTest.dumpIndexedDBTree = function() 4 InspectorTest.dumpIndexedDBTree = function()
5 { 5 {
6 InspectorTest.addResult("Dumping IndexedDB tree:"); 6 InspectorTest.addResult("Dumping IndexedDB tree:");
7 var indexedDBTreeElement = UI.panels.resources._sidebar.indexedDBListTreeEle ment; 7 var indexedDBTreeElement = UI.panels.resources._sidebar.indexedDBListTreeEle ment;
8 if (!indexedDBTreeElement.childCount()) { 8 if (!indexedDBTreeElement.childCount()) {
9 InspectorTest.addResult(" (empty)"); 9 InspectorTest.addResult(" (empty)");
10 return; 10 return;
11 } 11 }
12 for (var i = 0; i < indexedDBTreeElement.childCount(); ++i) { 12 for (var i = 0; i < indexedDBTreeElement.childCount(); ++i) {
13 var databaseTreeElement = indexedDBTreeElement.childAt(i); 13 var databaseTreeElement = indexedDBTreeElement.childAt(i);
14 InspectorTest.addResult(" database: " + databaseTreeElement.title); 14 InspectorTest.addResult(" database: " + databaseTreeElement.title);
15 if (!databaseTreeElement.childCount()) { 15 if (!databaseTreeElement.childCount()) {
16 InspectorTest.addResult(" (no object stores)"); 16 InspectorTest.addResult(" (no object stores)");
17 continue; 17 continue;
18 } 18 }
19 for (var j = 0; j < databaseTreeElement.childCount(); ++j) { 19 for (var j = 0; j < databaseTreeElement.childCount(); ++j) {
20 var objectStoreTreeElement = databaseTreeElement.childAt(j); 20 var objectStoreTreeElement = databaseTreeElement.childAt(j);
21 InspectorTest.addResult(" Object store: " + objectStoreTreeEl ement.title); 21 InspectorTest.addResult(" Object store: " + objectStoreTreeEl ement.title);
22 if (!objectStoreTreeElement.childCount()) { 22 if (!objectStoreTreeElement.childCount()) {
23 InspectorTest.addResult(" (no indexes)"); 23 InspectorTest.addResult(" (no indexes)");
24 continue; 24 continue;
25 } 25 }
26 for (var j = 0; j < objectStoreTreeElement.childCount(); ++j) { 26 for (var k = 0; k < objectStoreTreeElement.childCount(); ++k) {
dgozman 2017/05/26 19:10:46 Nice fix!
27 var indexTreeElement = objectStoreTreeElement.childAt(j); 27 var indexTreeElement = objectStoreTreeElement.childAt(k);
28 InspectorTest.addResult(" Index: " + indexTreeElement .title); 28 InspectorTest.addResult(" Index: " + indexTreeElement .title);
29 } 29 }
30 } 30 }
31 } 31 }
32 } 32 }
33 33
34 var lastCallbackId = 0; 34 var lastCallbackId = 0;
35 var callbacks = {}; 35 var callbacks = {};
36 var callbackIdPrefix = "InspectorTest.IndexedDB_callback"; 36 var callbackIdPrefix = "InspectorTest.IndexedDB_callback";
37 InspectorTest.evaluateWithCallback = function(frameId, methodName, parameters, c allback) 37 InspectorTest.evaluateWithCallback = function(frameId, methodName, parameters, c allback)
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 { 253 {
254 var request; 254 var request;
255 if (key) 255 if (key)
256 request = objectStore.add(value, key); 256 request = objectStore.add(value, key);
257 else 257 else
258 request = objectStore.add(value); 258 request = objectStore.add(value);
259 request.onerror = onIndexedDBError; 259 request.onerror = onIndexedDBError;
260 request.onsuccess = commitCallback; 260 request.onsuccess = commitCallback;
261 } 261 }
262 } 262 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698