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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-switch-editor-tab.html

Issue 2551233002: DevTools: show filesystem file by default (Closed)
Patch Set: nit Created 4 years 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/persistence/persistence-switch-editor-tab.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-switch-editor-tab.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-switch-editor-tab.html
new file mode 100644
index 0000000000000000000000000000000000000000..12bc769c4d88526bc3698678c9159b6253d209c9
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-switch-editor-tab.html
@@ -0,0 +1,57 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../debugger-test.js"></script>
+<script src="../isolated-filesystem-test.js"></script>
+<script src="./persistence-test.js"></script>
+<script src="./resources/foo.js"></script>
+<script>
+
+function test()
+{
+ InspectorTest.runTestSuite([
+ function openNetworkTab(next)
+ {
+ InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.Network)
+ .then(sourceCode => InspectorTest.showUISourceCodePromise(sourceCode))
+ .then(onSourceFrame);
+
+ function onSourceFrame(sourceFrame)
+ {
+ dumpEditorTabs();
+ next();
+ }
+ },
+
+ function addMapping(next)
+ {
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ fs.addFileMapping("http://127.0.0.1:8000", "/");
+ InspectorTest.addFooJSFile(fs);
+ fs.reportCreated(function() { });
+ InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
+
+ function onBindingCreated()
+ {
+ dumpEditorTabs();
+ next();
+ }
+ },
+ ]);
+
+ function dumpEditorTabs()
+ {
+ var editorContainer = UI.panels.sources._sourcesView._editorContainer;
+ var openedUISourceCodes = editorContainer._tabIds.keysArray();
+ openedUISourceCodes.sort((a, b) => a.url().compareTo(b.url()));
+ InspectorTest.addResult("Opened tabs: ");
+ for (code of openedUISourceCodes)
+ InspectorTest.addResult(" " + code.url());
+ }
+};
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that a network file tab gets substituted with filesystem tab when persistence binding comes.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698