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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-dynamic-uisourcecodes.html

Issue 2418813005: DevTools: [Persistence] implement automapping (Closed)
Patch Set: address comments Created 4 years, 2 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-dynamic-uisourcecodes.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-dynamic-uisourcecodes.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-dynamic-uisourcecodes.html
new file mode 100644
index 0000000000000000000000000000000000000000..8f20327b3284632d244aa3e6da3ef89bec9f0ca7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-dynamic-uisourcecodes.html
@@ -0,0 +1,69 @@
+<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>
+
+function test()
+{
+ var foo_js = {
+ content: "console.log('foo.js!');",
+ time: new Date("December 1, 1989")
+ };
+
+ var automappingTest = new InspectorTest.AutomappingTest(new WebInspector.Workspace());
+ var fs = new InspectorTest.TestFileSystem("file:///var/www");
+ fs.reportCreated(onFileSystemCreated);
+
+ function onFileSystemCreated()
+ {
+ InspectorTest.runTestSuite(tests);
+ }
+
+ var tests = [
+ function addNetworkResource(next)
+ {
+ automappingTest.addNetworkResources({
+ "http://example.com/path/foo.js": foo_js,
+ });
+ automappingTest.waitUntilMappingIsStabilized(next);
+ },
+
+ function addFileSystemUISourceCode(next)
+ {
+ InspectorTest.addFiles(fs, {
+ "scripts/foo.js": foo_js,
+ });
+ automappingTest.waitUntilMappingIsStabilized(next);
+ },
+
+ function removeNetworkUISourceCode(next)
+ {
+ automappingTest.removeResources(["http://example.com/path/foo.js"]);
+ automappingTest.waitUntilMappingIsStabilized(next);
+ },
+
+ function reAddNetworkUISourceCode(next)
+ {
+ automappingTest.addNetworkResources({
+ // Make sure simple resource gets mapped.
+ "http://example.com/path/foo.js": foo_js,
+ });
+ automappingTest.waitUntilMappingIsStabilized(next);
+ },
+
+ function removeFileSystem(next)
+ {
+ fs.reportRemoved();
+ automappingTest.waitUntilMappingIsStabilized(next);
+ },
+ ];
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Verify that automapping works property when UISourceCodes come and go.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698