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

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

Issue 2801723003: [DevTools] Do not reset storage tree items (Closed)
Patch Set: [DevTools] Do not reset storage tree items Created 3 years, 8 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
(Empty)
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="../resources-test.js"></script>
5 <script src="../console-test.js"></script>
6 <script src="../indexeddb/indexeddb-test.js"></script>
7 <script>
8
9 async function test()
10 {
11
12 function createIndexedDB(callback) {
13 var mainFrameId = InspectorTest.resourceTreeModel.mainFrame.id;
14 var model = InspectorTest.mainTarget.model(Resources.IndexedDBModel);
15 InspectorTest.createDatabase(mainFrameId, 'Database1', () => {
16 var event = model.addEventListener(Resources.IndexedDBModel.Events.D atabaseAdded, () => {
17 Common.EventTarget.removeEventListeners([event]);
18 callback();
19 });
20 model.refreshDatabaseNames();
21 });
22 }
23
24 function dump(node, prefix)
25 {
26 for (var child of node.children()) {
27 InspectorTest.addResult(prefix + child.listItemElement.textContent);
28 dump(child, prefix + ' ');
29 }
30 }
31
32 function dumpCurrentState(label) {
33 var view = UI.panels.resources;
34 InspectorTest.addResult(label);
35 dump(view._sidebar._sidebarTree.rootElement(), '');
36 InspectorTest.addResult('Visible view is a query view: ' + (view.visible View instanceof Resources.DatabaseQueryView));
37 }
38
39 function fireFrameNavigated() {
40 var rtm = InspectorTest.resourceTreeModel;
41 rtm.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameNavigated , rtm.mainFrame);
42 }
43
44 await new Promise(createIndexedDB);
45 await InspectorTest.createWebSQLDatabase('database-for-test');
46 UI.viewManager.showView('resources');
47 UI.panels.resources._sidebar.databasesListTreeElement.firstChild().select(fa lse, true);
48 dumpCurrentState('Initial state:');
49 await InspectorTest.navigatePromise('http://127.0.0.1:8000/inspector/resourc es/resources-panel-on-navigation.html');
50 dumpCurrentState('After navigation:');
51 InspectorTest.completeTest();
52 }
53 </script>
54 </head>
55 <body onload="runTest()">
56 <p>Tests Application Panel response to a main frame navigation.</p>
57 </body>
58 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698