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

Unified Diff: LayoutTests/inspector/sources/debugger/switch-file.html

Issue 378273004: DevTools: Add a shortcut for switching between files with the same name and different extensions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/switch-file-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/switch-file.html
diff --git a/LayoutTests/inspector/sources/debugger/switch-file.html b/LayoutTests/inspector/sources/debugger/switch-file.html
new file mode 100644
index 0000000000000000000000000000000000000000..8b168ba5a38062e6f7c11fecba35f5bf4a977ec1
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/switch-file.html
@@ -0,0 +1,62 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script src="../../../http/tests/inspector/workspace-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.createWorkspace(true);
+
+ var uiSourceCodes = [];
+ function addUISourceCode(url)
+ {
+ var contentProvider = new WebInspector.StaticContentProvider(WebInspector.resourceTypes.Script, "");
+ var uiSourceCode = InspectorTest.testNetworkWorkspaceBinding.addFileForURL(url, contentProvider, false);
+ uiSourceCodes.push(uiSourceCode);
+ }
+
+ var files = [
+ "foo.css",
+ "foo.js",
+ "foo.js.map",
+ "foo.ts",
+
+ "bar.css",
+ "bar.js",
+ "bar.js.map",
+ "bar.ts",
+
+ "baz.css",
+ "baz2",
+
+ "foo/foo.css",
+ "foo/foo.js",
+ "foo/foo.js.map",
+ "foo/foo.ts",
+ "foo/foo",
+
+ "bar/foo.css",
+ "bar/foo.js",
+ "bar/foo.js.map",
+ "bar/foo.ts",
+ "bar/foo" ];
+
+ for (var i = 0; i < files.length; ++i)
+ addUISourceCode("http://example.com/" + files[i]);
+
+ InspectorTest.addResult("Dumping next file for each file:");
+ for (var i = 0; i < uiSourceCodes.length; ++i) {
+ var uiSourceCode = uiSourceCodes[i];
+ var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate._nextFile(uiSourceCode);
+ var nextURI = nextUISourceCode ? nextUISourceCode.uri() : "<none>";
+ InspectorTest.addResult("Next file for " + uiSourceCode.uri() + " is " + nextURI + ".");
+ }
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Tests how switch to next file with the same name and different extension feature works.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/switch-file-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698