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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-rename-mapped-file.html

Issue 2349343002: DevTools: introduce persistence/ module (Closed)
Patch Set: reupload Created 4 years, 3 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/persistence-rename-mapped-file.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-rename-mapped-file.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-rename-mapped-file.html
new file mode 100644
index 0000000000000000000000000000000000000000..e1400bfbf90b5c92d061a2a61f242c0778df23ec
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-rename-mapped-file.html
@@ -0,0 +1,40 @@
+<html>
+<head>
+<script src="../inspector-test.js"></script>
+<script src="../debugger-test.js"></script>
+<script src="../workspace-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()
+{
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ var fsEntry = InspectorTest.addFooJSFile(fs);
+ fs.addFileMapping("http://127.0.0.1:8000", "/");
+ fs.reportCreated(function () { });
+ InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
+ WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.BindingRemoved, onBindingRemoved);
+
+ function onBindingCreated(binding)
+ {
+ InspectorTest.addResult("Binding created: " + binding);
+ InspectorTest.addResult("Renaming foo.js -> bar.js");
+ binding.fileSystem.rename("bar.js", function() { });
+ }
+
+ function onBindingRemoved(event)
+ {
+ var binding = event.data;
dgozman 2016/09/23 23:03:20 Let's dump it.
lushnikov 2016/09/24 00:30:50 Done.
+ InspectorTest.addResult("Binding successfully removed.");
+ InspectorTest.completeTest();
+ }
+
+};
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that binding gets removed as the fileSystem file gets renamed.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698