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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-rename-files.html

Issue 2780933003: DevTools: support UISourceCode rename in automapping (Closed)
Patch Set: fix test Created 3 years, 9 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/persistence/automapping-rename-files.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-rename-files.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-rename-files.html
new file mode 100644
index 0000000000000000000000000000000000000000..28e26bf011e4521f73b36079dd5928e720eb04be
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-rename-files.html
@@ -0,0 +1,49 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../isolated-filesystem-test.js"></script>
+<script src="./persistence-test.js"></script>
+<script src="./automapping-test.js"></script>
+<script>
+
+async function test()
+{
+ // Disable default-running automapping so that it doesn't conflict
+ // with AutomappingTest.
+ InspectorTest.initializeTestMapping();
+
+ var foo_js = {
+ content: "console.log('foo.js!');",
+ time: null
+ };
+
+ var automappingTest = new InspectorTest.AutomappingTest(Workspace.workspace);
+ automappingTest.addNetworkResources({
+ "http://example.com/path/foo.js": foo_js,
+ });
+
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ InspectorTest.addFiles(fs, {
+ "scripts/foo.js": foo_js,
+ });
+ await new Promise(fulfill => fs.reportCreated(fulfill));
+
+ await automappingTest.waitUntilMappingIsStabilized();
+
+ InspectorTest.markStep('Rename foo.js => bar.js');
+ var fileUISourceCode = await InspectorTest.waitForUISourceCode('foo.js', Workspace.projectTypes.FileSystem);
+ await fileUISourceCode.rename('bar.js');
+ await automappingTest.waitUntilMappingIsStabilized();
+
+ InspectorTest.markStep('Rename bar.js => foo.js');
+ fileUISourceCode.rename('foo.js');
+ await automappingTest.waitUntilMappingIsStabilized();
+
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that automapping is sane.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698