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

Side by Side Diff: LayoutTests/inspector/sources/debugger/async-callstack-events.html

Issue 383363002: DevTools: Fix async stacks instrumentation for XHRs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script> 5 <script>
6 6
7 function testFunction() 7 function testFunction()
8 { 8 {
9 for (var name in window) { 9 for (var name in window) {
10 if (/^doTest[A-Z]/.test(name) && typeof window[name] === "function") 10 if (/^doTest[A-Z]/.test(name) && typeof window[name] === "function")
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 function onSelectionChange() 36 function onSelectionChange()
37 { 37 {
38 document.removeEventListener("selectionchange", onSelectionChange, false); 38 document.removeEventListener("selectionchange", onSelectionChange, false);
39 debugger; 39 debugger;
40 } 40 }
41 41
42 function doTestHashChange() 42 function doTestHashChange()
43 { 43 {
44 window.addEventListener("hashchange", onHashChange, false); 44 window.addEventListener("hashchange", onHashChange1, false);
45 window.addEventListener("hashchange", onHashChange2, true);
aandrey 2014/07/12 16:21:28 Note: this test would also pass before, just addin
45 location.hash = location.hash + "x"; 46 location.hash = location.hash + "x";
46 } 47 }
47 48
48 function onHashChange() 49 function onHashChange1()
49 { 50 {
50 window.removeEventListener("hashchange", onHashChange, false); 51 window.removeEventListener("hashchange", onHashChange1, false);
51 debugger; 52 debugger;
52 } 53 }
53 54
55 function onHashChange2()
56 {
57 window.removeEventListener("hashchange", onHashChange2, true);
58 debugger;
59 }
60
54 function doTestMediaEvents() 61 function doTestMediaEvents()
55 { 62 {
56 var video = document.getElementById("video"); 63 var video = document.getElementById("video");
57 video.addEventListener("play", onVideoPlay, false); 64 video.addEventListener("play", onVideoPlay, false);
58 video.play(); 65 video.play();
59 } 66 }
60 67
61 function onVideoPlay() 68 function onVideoPlay()
62 { 69 {
63 video.removeEventListener("play", onVideoPlay, false); 70 video.removeEventListener("play", onVideoPlay, false);
64 debugger; 71 debugger;
65 } 72 }
66 73
67 var test = function() 74 var test = function()
68 { 75 {
69 var totalDebuggerStatements = 3; 76 var totalDebuggerStatements = 4;
70 var maxAsyncCallStackDepth = 4; 77 var maxAsyncCallStackDepth = 4;
71 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt ackDepth); 78 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt ackDepth);
72 } 79 }
73 80
74 </script> 81 </script>
75 </head> 82 </head>
76 83
77 <body onload="runTest()"> 84 <body onload="runTest()">
78 <video id="video" src="../../../media/content/test.ogv"></video> 85 <video id="video" src="../../../media/content/test.ogv"></video>
79 <p id="content"> 86 <p id="content">
80 Tests asynchronous call stacks for various DOM events. 87 Tests asynchronous call stacks for various DOM events.
81 </p> 88 </p>
82 </body> 89 </body>
83 </html> 90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698