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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-sourceframe-messages.html

Issue 2784733002: DevTools: prepare tests for Persistence2.0 release (Closed)
Patch Set: address comments + three special tests Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../inspector-test.js"></script> 3 <script src="../inspector-test.js"></script>
4 <script src="../debugger-test.js"></script> 4 <script src="../debugger-test.js"></script>
5 <script src="../isolated-filesystem-test.js"></script> 5 <script src="../isolated-filesystem-test.js"></script>
6 <script src="./persistence-test.js"></script> 6 <script src="./persistence-test.js"></script>
7 <script src="./resources/foo.js"></script> 7 <script src="./resources/foo.js"></script>
8 <script> 8 <script>
9 9
10 function test() 10 function test()
11 { 11 {
12 var testMapping = InspectorTest.initializeTestMapping();
12 var fs = new InspectorTest.TestFileSystem("file:///var/www"); 13 var fs = new InspectorTest.TestFileSystem("file:///var/www");
13 InspectorTest.addFooJSFile(fs); 14 InspectorTest.addFooJSFile(fs);
14 var networkSourceCode; 15 var networkSourceCode;
15 var fileSystemSourceCode; 16 var fileSystemSourceCode;
16 var fileSystemSourceFrame, networkSourceFrame; 17 var fileSystemSourceFrame, networkSourceFrame;
17 18
18 InspectorTest.runTestSuite([ 19 InspectorTest.runTestSuite([
19 function waitForUISourceCodes(next) 20 function waitForUISourceCodes(next)
20 { 21 {
21 fs.reportCreated(function() { }); 22 fs.reportCreated(function() { });
(...skipping 20 matching lines...) Expand all
42 fileSystemSourceFrame = sourceFrames[0]; 43 fileSystemSourceFrame = sourceFrames[0];
43 networkSourceFrame = sourceFrames[1]; 44 networkSourceFrame = sourceFrames[1];
44 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true); 45 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true);
45 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true); 46 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true);
46 next(); 47 next();
47 } 48 }
48 }, 49 },
49 50
50 function addMapping(next) 51 function addMapping(next)
51 { 52 {
53 testMapping.addBinding("foo.js");
52 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); 54 InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
53 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
54 55
55 function onBindingCreated(binding) 56 function onBindingCreated(binding)
56 { 57 {
57 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true); 58 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true);
58 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true); 59 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true);
59 next(); 60 next();
60 } 61 }
61 }, 62 },
62 63
63 function removeMapping(next) 64 function removeMapping(next)
64 { 65 {
65 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved); 66 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved);
66 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/"); 67 testMapping.removeBinding("foo.js");
67 68
68 function onBindingRemoved(event) 69 function onBindingRemoved(event)
69 { 70 {
70 var binding = event.data; 71 var binding = event.data;
71 if (binding.network.name() !== "foo.js") 72 if (binding.network.name() !== "foo.js")
72 return 73 return
73 Persistence.persistence.removeEventListener(Persistence.Persiste nce.Events.BindingRemoved, onBindingRemoved); 74 Persistence.persistence.removeEventListener(Persistence.Persiste nce.Events.BindingRemoved, onBindingRemoved);
74 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true); 75 InspectorTest.dumpSourceFrameMessages(fileSystemSourceFrame, /* dumpFullURL */ true);
75 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true); 76 InspectorTest.dumpSourceFrameMessages(networkSourceFrame, /* dum pFullURL */ true);
76 next(); 77 next();
77 } 78 }
78 }, 79 },
79 ]); 80 ]);
80 }; 81 };
81 </script> 82 </script>
82 </head> 83 </head>
83 <body onload="runTest()"> 84 <body onload="runTest()">
84 <p>Verify that messages are synced in UISourceCodeFrame between UISourceCodes of persistence binding.</p> 85 <p>Verify that messages are synced in UISourceCodeFrame between UISourceCodes of persistence binding.</p>
85 </body> 86 </body>
86 </html> 87 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698