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

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

Issue 2522753002: DevTools: [Persistence] properly copy breakpoints to filesystem during reload (Closed)
Patch Set: fix test 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
(Empty)
1 <html>
2 <head>
3 <script src='../inspector-test.js'></script>
4 <script src='../debugger-test.js'></script>
5 <script src='../workspace-test.js'></script>
6 <script src='../isolated-filesystem-test.js'></script>
7 <script src='./persistence-test.js'></script>
8 <script>
9
10 function addFooJS() {
11 var script = document.createElement('script');
12 script.src = './resources/foo.js';
13 document.body.appendChild(script);
14 }
15
16 function test()
17 {
18 var fs = new InspectorTest.TestFileSystem('file:///var/www');
19 fs.addFileMapping('http://127.0.0.1:8000', '/');
20 InspectorTest.addFooJSFile(fs);
21
22 InspectorTest.runTestSuite([
23 function addFileSystem(next)
24 {
25 fs.reportCreated(next);
26 },
27
28 function addNetworkFooJS(next)
29 {
30 InspectorTest.evaluateInPage('addFooJS()');
31 InspectorTest.waitForBinding('foo.js').then(next);
32 },
33
34 function setBreakpointInNetworkUISourceCode(next)
35 {
36 InspectorTest.waitForUISourceCode('foo.js', Workspace.projectTypes.N etwork)
37 .then(sourceCode => InspectorTest.showUISourceCodePromise(source Code))
38 .then(onSourceFrame);
39
40 function onSourceFrame(sourceFrame)
41 {
42 InspectorTest.setBreakpoint(sourceFrame, 0, '', true);
43 InspectorTest.waitBreakpointSidebarPane().then(dumpBreakpointSid ebarPane).then(next);
44 }
45 },
46
47 function reloadPageAndDumpBreakpoints(next)
48 {
49 Promise.all([
50 InspectorTest.waitBreakpointSidebarPane(),
51 InspectorTest.reloadPagePromise()
52 ]).then(dumpBreakpointSidebarPane).then(next);
53 },
54 ]);
55
56 function dumpBreakpointSidebarPane()
57 {
58 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpoi ntsSidebarPane).contentElement;
59 var empty = paneElement.querySelector('.gray-info-message');
60 if (empty)
61 return InspectorTest.textContentWithLineBreaks(empty);
62 var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry '));
63 for (var entry of entries) {
64 var uiLocation = entry[Sources.JavaScriptBreakpointsSidebarPane._loc ationSymbol];
65 InspectorTest.addResult(" " + uiLocation.uiSourceCode.url() +":" + uiLocation.lineNumber);
66 }
67 }
68 };
69 </script>
70 </head>
71 <body onload='runTest()'>
72 <p>Verify that breakpoints are moved appropriately in case of page reload.</p>
73 </body>
74 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698