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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/indexeddb/resources-panel.html

Issue 2747123008: [DevTools] Separate old Application tab code (Closed)
Patch Set: [DevTools] Separate old Application tab code Created 3 years, 9 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="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="indexeddb-test.js"></script> 4 <script src="indexeddb-test.js"></script>
5 <script src="../resources-test.js"></script> 5 <script src="../resources-test.js"></script>
6 <script src="../console-test.js"></script> 6 <script src="../console-test.js"></script>
7 <script> 7 <script>
8 function test() 8 function test()
9 { 9 {
10 var mainFrameId = InspectorTest.resourceTreeModel.mainFrame.id; 10 var mainFrameId = InspectorTest.resourceTreeModel.mainFrame.id;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 InspectorTest.addSniffer(Resources.IndexedDBTreeElement.prototype, "_indexed DBLoaded", indexedDBLoaded, true); 63 InspectorTest.addSniffer(Resources.IndexedDBTreeElement.prototype, "_indexed DBLoaded", indexedDBLoaded, true);
64 function indexedDBLoaded() 64 function indexedDBLoaded()
65 { 65 {
66 InspectorTest.addResult("Database loaded."); 66 InspectorTest.addResult("Database loaded.");
67 } 67 }
68 68
69 // Switch to resources panel. 69 // Switch to resources panel.
70 UI.viewManager.showView("resources"); 70 UI.viewManager.showView("resources");
71 71
72 InspectorTest.addResult("Expanded IndexedDB tree element."); 72 InspectorTest.addResult("Expanded IndexedDB tree element.");
73 UI.panels.resources.indexedDBListTreeElement.expand(); 73 UI.panels.resources._sidebar.indexedDBListTreeElement.expand();
74 InspectorTest.dumpIndexedDBTree(); 74 InspectorTest.dumpIndexedDBTree();
75 InspectorTest.addResult("Created database."); 75 InspectorTest.addResult("Created database.");
76 createDatabase(databaseCreated); 76 createDatabase(databaseCreated);
77 77
78 function databaseCreated() 78 function databaseCreated()
79 { 79 {
80 indexedDBModel = InspectorTest.indexedDBModel(); 80 indexedDBModel = InspectorTest.indexedDBModel();
81 indexedDBModel.addEventListener(Resources.IndexedDBModel.Events.Database Loaded, databaseLoaded); 81 indexedDBModel.addEventListener(Resources.IndexedDBModel.Events.Database Loaded, databaseLoaded);
82 UI.panels.resources.indexedDBListTreeElement.refreshIndexedDB(); 82 UI.panels.resources._sidebar.indexedDBListTreeElement.refreshIndexedDB() ;
83 } 83 }
84 84
85 function databaseLoaded() 85 function databaseLoaded()
86 { 86 {
87 indexedDBModel.removeEventListener(Resources.IndexedDBModel.Events.Datab aseLoaded, databaseLoaded); 87 indexedDBModel.removeEventListener(Resources.IndexedDBModel.Events.Datab aseLoaded, databaseLoaded);
88 InspectorTest.dumpIndexedDBTree(); 88 InspectorTest.dumpIndexedDBTree();
89 InspectorTest.addResult("Navigated to another security origin."); 89 InspectorTest.addResult("Navigated to another security origin.");
90 InspectorTest.navigate(withoutIndexedDBURL, navigatedAway); 90 InspectorTest.navigate(withoutIndexedDBURL, navigatedAway);
91 } 91 }
92 92
93 function navigatedAway() 93 function navigatedAway()
94 { 94 {
95 InspectorTest.dumpIndexedDBTree(); 95 InspectorTest.dumpIndexedDBTree();
96 InspectorTest.addResult("Navigated back."); 96 InspectorTest.addResult("Navigated back.");
97 InspectorTest.navigate(originalURL, navigatedBack); 97 InspectorTest.navigate(originalURL, navigatedBack);
98 } 98 }
99 99
100 function navigatedBack() 100 function navigatedBack()
101 { 101 {
102 InspectorTest.dumpIndexedDBTree(); 102 InspectorTest.dumpIndexedDBTree();
103 InspectorTest.addResult("Deleted database."); 103 InspectorTest.addResult("Deleted database.");
104 deleteDatabase(databaseDeleted); 104 deleteDatabase(databaseDeleted);
105 } 105 }
106 106
107 function databaseDeleted() 107 function databaseDeleted()
108 { 108 {
109 UI.panels.resources.indexedDBListTreeElement.refreshIndexedDB(); 109 UI.panels.resources._sidebar.indexedDBListTreeElement.refreshIndexedDB() ;
110 InspectorTest.addSniffer(Resources.IndexedDBModel.prototype, "_updateOri ginDatabaseNames", databaseNamesLoadedAfterDeleting, false); 110 InspectorTest.addSniffer(Resources.IndexedDBModel.prototype, "_updateOri ginDatabaseNames", databaseNamesLoadedAfterDeleting, false);
111 } 111 }
112 112
113 function databaseNamesLoadedAfterDeleting() 113 function databaseNamesLoadedAfterDeleting()
114 { 114 {
115 InspectorTest.dumpIndexedDBTree(); 115 InspectorTest.dumpIndexedDBTree();
116 UI.panels.resources.indexedDBListTreeElement.collapse(); 116 UI.panels.resources._sidebar.indexedDBListTreeElement.collapse();
117 InspectorTest.completeTest(); 117 InspectorTest.completeTest();
118 } 118 }
119 } 119 }
120 120
121 </script> 121 </script>
122 </head> 122 </head>
123 <body onload="runTest()"> 123 <body onload="runTest()">
124 <p>Tests IndexedDB tree element on resources panel.</p> 124 <p>Tests IndexedDB tree element on resources panel.</p>
125 </body> 125 </body>
126 </html> 126 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698