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

Side by Side Diff: LayoutTests/http/tests/inspector/indexeddb/database-names.html

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var indexedDBModel = new WebInspector.IndexedDBModel(WebInspector.targetMana ger.mainTarget()); 8 var indexedDBModel = new WebInspector.IndexedDBModel(WebInspector.targetMana ger.mainTarget());
9 indexedDBModel.enable(); 9 indexedDBModel.enable();
10 var mainFrameId = WebInspector.resourceTreeModel.mainFrame.id; 10 var mainFrameId = InspectorTest.resourceTreeModel.mainFrame.id;
11 11
12 function dumpDatabaseNames() 12 function dumpDatabaseNames()
13 { 13 {
14 InspectorTest.addResult("Dumping database names:"); 14 InspectorTest.addResult("Dumping database names:");
15 var securityOrigins = WebInspector.resourceTreeModel.securityOrigins(); 15 var securityOrigins = InspectorTest.resourceTreeModel.securityOrigins();
16 var securityOrigin = securityOrigins[0]; 16 var securityOrigin = securityOrigins[0];
17 var names = indexedDBModel._databaseNamesBySecurityOrigin[securityOrigin ]; 17 var names = indexedDBModel._databaseNamesBySecurityOrigin[securityOrigin ];
18 for (var i = 0; i < names.length; ++i) 18 for (var i = 0; i < names.length; ++i)
19 InspectorTest.addResult(" " + names[i]); 19 InspectorTest.addResult(" " + names[i]);
20 InspectorTest.addResult(""); 20 InspectorTest.addResult("");
21 } 21 }
22 22
23 InspectorTest.addSniffer(WebInspector.IndexedDBModel.prototype, "_updateOrig inDatabaseNames", step2, false); 23 InspectorTest.addSniffer(WebInspector.IndexedDBModel.prototype, "_updateOrig inDatabaseNames", step2, false);
24 24
25 function step2() 25 function step2()
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 dumpDatabaseNames(); 75 dumpDatabaseNames();
76 InspectorTest.completeTest(); 76 InspectorTest.completeTest();
77 } 77 }
78 } 78 }
79 </script> 79 </script>
80 </head> 80 </head>
81 <body onload="runTest()"> 81 <body onload="runTest()">
82 <p>Tests that database names are correctly loaded and saved in IndexedDBModel.</ p> 82 <p>Tests that database names are correctly loaded and saved in IndexedDBModel.</ p>
83 </body> 83 </body>
84 </html> 84 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698