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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/debugger/fetch-breakpoints.html

Issue 2012873002: [DevTools] Add fetch support for XHR breakpoints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/debugger/fetch-breakpoints-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../inspector-test.js"></script>
4 <script src="../debugger-test.js"></script>
5 <script>
6
7 function sendRequest(url)
8 {
9 fetch(url);
10 }
11
12 function test()
13 {
14 var pane = WebInspector.panels.sources.sidebarPanes.xhrBreakpoints;
15 InspectorTest.runDebuggerTestSuite([
16 function testFetchBreakpoint(next)
17 {
18 pane._setBreakpoint("foo", true);
19 InspectorTest.waitUntilPaused(step1);
20 InspectorTest.evaluateInPageWithTimeout("sendRequest('/foo?a=b')");
21
22 function step1(callFrames)
23 {
24 InspectorTest.captureStackTrace(callFrames);
25 InspectorTest.resumeExecution(step2);
26 }
27
28 function step2()
29 {
30 InspectorTest.evaluateInPage("sendRequest('/bar?a=b')", step3);
31 }
32
33 function step3()
34 {
35 pane._removeBreakpoint("foo");
36 InspectorTest.evaluateInPage("sendRequest('/foo?a=b')", next);
37 }
38 },
39
40 function testPauseOnAnyFetch(next)
41 {
42 pane._setBreakpoint("", true);
43 InspectorTest.waitUntilPaused(pausedFoo);
44 InspectorTest.evaluateInPageWithTimeout("sendRequest('/foo?a=b')");
45
46 function pausedFoo(callFrames)
47 {
48 function resumed()
49 {
50 InspectorTest.waitUntilPaused(pausedBar);
51 InspectorTest.evaluateInPage("sendRequest('/bar?a=b')");
52 }
53 InspectorTest.resumeExecution(resumed);
54 }
55
56 function pausedBar(callFrames)
57 {
58 function resumed()
59 {
60 pane._removeBreakpoint("");
61 InspectorTest.evaluateInPage("sendRequest('/baz?a=b')", next );
62 }
63 InspectorTest.resumeExecution(resumed);
64 }
65 },
66
67 function testDisableBreakpoint(next)
68 {
69 pane._setBreakpoint("", true);
70 InspectorTest.waitUntilPaused(paused);
71 InspectorTest.evaluateInPage("sendRequest('/foo')");
72
73 function paused(callFrames)
74 {
75 function resumed()
76 {
77 pane._breakpointElements.get("")._checkboxElement.click();
78 InspectorTest.waitUntilPaused(pausedAgain);
79 InspectorTest.evaluateInPage("sendRequest('/foo')", next);
80 }
81 InspectorTest.resumeExecution(resumed);
82 }
83
84 function pausedAgain(callFrames)
85 {
86 InspectorTest.addResult("Fail, paused again after breakpoint was removed.");
87 next();
88 }
89 }
90 ]);
91 }
92
93 </script>
94 </head>
95
96 <body onload="runTest()">
97 <p>
98 Tests fetch() breakpoints.
99 </p>
100
101 </body>
102 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/debugger/fetch-breakpoints-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698