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