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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html

Issue 2533483002: [DevTools] Typed events and event listeners. (Closed)
Patch Set: 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 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="../workspace-test.js"></script> 5 <script src="../workspace-test.js"></script>
6 <script src="../isolated-filesystem-test.js"></script> 6 <script src="../isolated-filesystem-test.js"></script>
7 <script src="./persistence-test.js"></script> 7 <script src="./persistence-test.js"></script>
8 <script src="./resources/foo.js"></script> 8 <script src="./resources/foo.js"></script>
9 <script> 9 <script>
10 10
(...skipping 27 matching lines...) Expand all
38 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/"); 38 Workspace.fileSystemMapping.addFileMapping(fs.fileSystemPath, "http: //127.0.0.1:8000", "/");
39 39
40 function onBindingCreated(binding) 40 function onBindingCreated(binding)
41 { 41 {
42 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next); 42 InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dum pBreakpointSidebarPane).then(next);
43 } 43 }
44 }, 44 },
45 45
46 function removeFileMapping(next) 46 function removeFileMapping(next)
47 { 47 {
48 Persistence.persistence.addEventListener(Persistence.Persistence.Eve nts.BindingRemoved, onBindingRemoved); 48 Persistence.persistence.addEventListener(Persistence.Persistence.Bin dingChangedEvent, onBindingChanged);
49 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/"); 49 Workspace.fileSystemMapping.removeFileMapping(fs.fileSystemPath, "ht tp://127.0.0.1:8000", "/");
50 50
51 function onBindingRemoved(event) 51 function onBindingChanged(event)
52 { 52 {
53 var binding = event.data; 53 if (!event.removed)
54 if (binding.network.name() !== "foo.js") 54 return;
55 if (event.binding.network.name() !== "foo.js")
55 return 56 return
56 Persistence.persistence.removeEventListener(Persistence.Persiste nce.Events.BindingRemoved, onBindingRemoved); 57 Persistence.persistence.removeEventListener(Persistence.Persiste nce.BindingChangedEvent, onBindingChanged);
57 InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSid ebarPane).then(next); 58 InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSid ebarPane).then(next);
58 } 59 }
59 }, 60 },
60 ]); 61 ]);
61 62
62 function dumpBreakpointSidebarPane() 63 function dumpBreakpointSidebarPane()
63 { 64 {
64 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpoi ntsSidebarPane).contentElement; 65 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpoi ntsSidebarPane).contentElement;
65 var empty = paneElement.querySelector('.gray-info-message'); 66 var empty = paneElement.querySelector('.gray-info-message');
66 if (empty) 67 if (empty)
67 return InspectorTest.textContentWithLineBreaks(empty); 68 return InspectorTest.textContentWithLineBreaks(empty);
68 var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry ')); 69 var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry '));
69 for (var entry of entries) { 70 for (var entry of entries) {
70 var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._loc ationSymbol]; 71 var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._loc ationSymbol];
71 InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber); 72 InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber);
72 } 73 }
73 } 74 }
74 }; 75 };
75 </script> 76 </script>
76 </head> 77 </head>
77 <body onload="runTest()"> 78 <body onload="runTest()">
78 <p>Verify that breakpoints are moved appropriately</p> 79 <p>Verify that breakpoints are moved appropriately</p>
79 </body> 80 </body>
80 </html> 81 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698