| Index: third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html
|
| index 13157894490b4dac27f77ddda556baae17186abf..56b63e8b3ef5ff6e049475605ffeda965e650968 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html
|
| @@ -28,8 +28,7 @@ function test()
|
| function onSourceFrame(sourceFrame)
|
| {
|
| InspectorTest.setBreakpoint(sourceFrame, 0, "", true);
|
| - dumpBreakpointSidebarPane();
|
| - next();
|
| + InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dumpBreakpointSidebarPane).then(next);
|
| }
|
| },
|
|
|
| @@ -40,8 +39,7 @@ function test()
|
|
|
| function onBindingCreated(binding)
|
| {
|
| - dumpBreakpointSidebarPane();
|
| - next();
|
| + InspectorTest.waitBreakpointSidebarPane().then(InspectorTest.dumpBreakpointSidebarPane).then(next);
|
| }
|
| },
|
|
|
| @@ -56,18 +54,22 @@ function test()
|
| if (binding.network.name() !== "foo.js")
|
| return
|
| Persistence.persistence.removeEventListener(Persistence.Persistence.Events.BindingRemoved, onBindingRemoved);
|
| - dumpBreakpointSidebarPane();
|
| - next();
|
| + InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSidebarPane).then(next);
|
| }
|
| },
|
| ]);
|
|
|
| function dumpBreakpointSidebarPane()
|
| {
|
| - var sidebarPane = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane)
|
| - var breakpoints = sidebarPane._items.keysArray();
|
| - for (var breakpoint of breakpoints)
|
| - InspectorTest.addResult(" " + breakpoint.uiSourceCode().url() +":" + breakpoint.lineNumber());
|
| + var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement;
|
| + var empty = paneElement.querySelector('.gray-info-message');
|
| + if (empty)
|
| + return InspectorTest.textContentWithLineBreaks(empty);
|
| + var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
|
| + for (var entry of entries) {
|
| + var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._locationSymbol];
|
| + InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber);
|
| + }
|
| }
|
| };
|
| </script>
|
|
|