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

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

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
6
7 function testFunction()
8 {
9 for (var name in window) {
10 if (/^doTest[A-Z]/.test(name) && typeof window[name] === "function")
11 window[name]();
12 }
13 }
14
15 function setSelection(start, end)
16 {
17 var node = document.getElementById("content").firstChild;
18 var range = document.createRange();
19 range.setStart(node, start);
20 range.setEnd(node, end);
21 var selection = window.getSelection();
22 selection.removeAllRanges();
23 if (start !== end)
24 selection.addRange(range);
25 }
26
27 function doTestSelectionChange()
28 {
29 setSelection(0, 0);
30 document.addEventListener("selectionchange", onSelectionChange, false);
31 setSelection(0, 4);
32 setSelection(0, 8);
33 setSelection(0, 0);
34 }
35
36 function onSelectionChange()
37 {
38 document.removeEventListener("selectionchange", onSelectionChange, false);
39 debugger;
40 }
41
42 function doTestHashChange()
43 {
44 window.addEventListener("hashchange", onHashChange1, false);
45 window.addEventListener("hashchange", onHashChange2, true);
46 location.hash = location.hash + "x";
47 }
48
49 function onHashChange1()
50 {
51 window.removeEventListener("hashchange", onHashChange1, false);
52 debugger;
53 }
54
55 function onHashChange2()
56 {
57 window.removeEventListener("hashchange", onHashChange2, true);
58 debugger;
59 }
60
61 function doTestMediaEvents()
62 {
63 var video = document.getElementById("video");
64 video.addEventListener("play", onVideoPlay, false);
65 video.play();
66 }
67
68 function onVideoPlay()
69 {
70 video.removeEventListener("play", onVideoPlay, false);
71 debugger;
72 }
73
74 var test = function()
75 {
76 var totalDebuggerStatements = 4;
77 var maxAsyncCallStackDepth = 4;
78 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt ackDepth);
79 }
80
81 </script>
82 </head>
83
84 <body onload="runTest()">
85 <video id="video" src="../../../media/content/test.ogv"></video>
86 <p id="content">
87 Tests asynchronous call stacks for various DOM events.
88 </p>
89 </body>
90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698