| 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>
|
|
|