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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.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 var fsEntry = InspectorTest.addFooJSFile(fs); 14 var fsEntry = InspectorTest.addFooJSFile(fs);
14 15
15 InspectorTest.runTestSuite([ 16 InspectorTest.runTestSuite([
16 function addFileSystem(next) 17 function addFileSystem(next)
17 { 18 {
18 fs.reportCreated(next); 19 fs.reportCreated(next);
19 }, 20 },
20 21
21 function setBreakpointInFileSystemUISourceCode(next) 22 function setBreakpointInFileSystemUISourceCode(next)
22 { 23 {
23 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.F ileSystem) 24 InspectorTest.waitForUISourceCode("foo.js", Workspace.projectTypes.F ileSystem)
24 .then(code => InspectorTest.showUISourceCodePromise(code)) 25 .then(code => InspectorTest.showUISourceCodePromise(code))
25 .then(onSourceFrame); 26 .then(onSourceFrame);
26 27
27 function onSourceFrame(sourceFrame) 28 function onSourceFrame(sourceFrame)
28 { 29 {
29 InspectorTest.setBreakpoint(sourceFrame, 0, "", true); 30 InspectorTest.setBreakpoint(sourceFrame, 0, "", true);
30 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next); 31 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next);
31 } 32 }
32 }, 33 },
33 34
34 function addFileMapping(next) 35 function addFileMapping(next)
35 { 36 {
37 testMapping.addBinding('foo.js');
36 InspectorTest.waitForBinding("foo.js").then(onBindingCreated); 38 InspectorTest.waitForBinding("foo.js").then(onBindingCreated);
37 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
38 39
39 function onBindingCreated(binding) 40 function onBindingCreated(binding)
40 { 41 {
41 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next); 42 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next);
42 } 43 }
43 }, 44 },
44 45
45 function removeFileMapping(next) 46 function removeFileMapping(next)
46 { 47 {
47 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved); 48 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved);
48 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/"); 49 testMapping.removeBinding('foo.js');
49 50
50 function onBindingRemoved(event) 51 function onBindingRemoved(event)
51 { 52 {
52 var binding = event.data; 53 var binding = event.data;
53 if (binding.network.name() !== "foo.js") 54 if (binding.network.name() !== "foo.js")
54 return 55 return
55 Persistence.persistence.removeEventListener(Persistence.Persiste nce.Events.BindingRemoved, onBindingRemoved); 56 Persistence.persistence.removeEventListener(Persistence.Persiste nce.Events.BindingRemoved, onBindingRemoved);
56 InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSid ebarPane).then(next); 57 InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSid ebarPane).then(next);
57 } 58 }
58 }, 59 },
(...skipping 11 matching lines...) Expand all
70 InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber); 71 InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber);
71 } 72 }
72 } 73 }
73 }; 74 };
74 </script> 75 </script>
75 </head> 76 </head>
76 <body onload="runTest()"> 77 <body onload="runTest()">
77 <p>Verify that breakpoints are moved appropriately</p> 78 <p>Verify that breakpoints are moved appropriately</p>
78 </body> 79 </body>
79 </html> 80 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698