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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation.html b/third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation.html
new file mode 100644
index 0000000000000000000000000000000000000000..01bcd6af71a27dbe25e4c94a6cacb4de0f295095
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/resources/resources-panel-on-navigation.html
@@ -0,0 +1,58 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../resources-test.js"></script>
+<script src="../console-test.js"></script>
+<script src="../indexeddb/indexeddb-test.js"></script>
+<script>
+
+async function test()
+{
+
+ function createIndexedDB(callback) {
+ var mainFrameId = InspectorTest.resourceTreeModel.mainFrame.id;
+ var model = InspectorTest.mainTarget.model(Resources.IndexedDBModel);
+ InspectorTest.createDatabase(mainFrameId, 'Database1', () => {
+ var event = model.addEventListener(Resources.IndexedDBModel.Events.DatabaseAdded, () => {
+ Common.EventTarget.removeEventListeners([event]);
+ callback();
+ });
+ model.refreshDatabaseNames();
+ });
+ }
+
+ function dump(node, prefix)
+ {
+ for (var child of node.children()) {
+ InspectorTest.addResult(prefix + child.listItemElement.textContent);
+ dump(child, prefix + ' ');
+ }
+ }
+
+ function dumpCurrentState(label) {
+ var view = UI.panels.resources;
+ InspectorTest.addResult(label);
+ dump(view._sidebar._sidebarTree.rootElement(), '');
+ InspectorTest.addResult('Visible view is a query view: ' + (view.visibleView instanceof Resources.DatabaseQueryView));
+ }
+
+ function fireFrameNavigated() {
+ var rtm = InspectorTest.resourceTreeModel;
+ rtm.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameNavigated, rtm.mainFrame);
+ }
+
+ await new Promise(createIndexedDB);
+ await InspectorTest.createWebSQLDatabase('database-for-test');
+ UI.viewManager.showView('resources');
+ UI.panels.resources._sidebar.databasesListTreeElement.firstChild().select(false, true);
+ dumpCurrentState('Initial state:');
+ await InspectorTest.navigatePromise('http://127.0.0.1:8000/inspector/resources/resources-panel-on-navigation.html');
+ dumpCurrentState('After navigation:');
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests Application Panel response to a main frame navigation.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698