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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded.html

Issue 2542073002: DevTools: [Persistence] validate persistence binding. (Closed)
Patch Set: add etst 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-validate-binding-on-content-loaded.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded.html
new file mode 100644
index 0000000000000000000000000000000000000000..ecd91744e844a63b8ed2bb48ce23f0825d1800cc
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-validate-binding-on-content-loaded.html
@@ -0,0 +1,53 @@
+<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()
+{
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ fs.addFileMapping("http://127.0.0.1:8000", "/");
+ var amendedContent = ";" + InspectorTest.fooJSContent.substring(1);
+ var fsEntry = fs.addFile("inspector/persistence/resources/foo.js", amendedContent);
+ fs.reportCreated(function() { });
+
+ InspectorTest.runTestSuite([
+ function waitForBinding(next)
+ {
+ InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
+
+ function onBindingCreated(binding)
+ {
+ InspectorTest.addResult("binding added: " + binding);
+ next();
+ }
+ },
+
+ function openFileSystemTab(next)
+ {
+ Persistence.persistence.addEventListener(Persistence.Persistence.Events.BindingRemoved, onBindingRemoved);
+ InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.FileSystem)
+ .then(code => InspectorTest.showUISourceCodePromise(code));
+
+ function onBindingRemoved(event)
+ {
+ var binding = event.data;
+ if (binding.network.name() !== "foo.js")
+ return
+ Persistence.persistence.removeEventListener(Persistence.Persistence.Events.BindingRemoved, onBindingRemoved);
+ InspectorTest.addResult("binding removed: " + binding);
+ next();
+ }
+ },
+ ]);
+};
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that bindings are validated whenever the editor tab gets opened.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698