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

Side by Side Diff: LayoutTests/inspector/sources/debugger/frameworks-jquery.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 src="resources/jquery-1.11.1.min.js"></script>
6 <script>
7
8 function testFunction()
9 {
10 var pp = $("p");
11 var scripts = $("script");
12 pp.on("testevent", onTestEvent1);
13 pp.on("testevent", onTestEvent2);
14 pp.on("testevent", onTestEvent3);
15
16 debugger;
17
18 scripts.each(onEachScript);
19 pp.trigger("testevent");
20 }
21
22 function onTestEvent1()
23 {
24 output("onTestEvent1");
25 }
26
27 function onTestEvent2()
28 {
29 output("onTestEvent2");
30 }
31
32 function onTestEvent3()
33 {
34 output("onTestEvent3");
35 }
36
37 function onEachScript(index, script)
38 {
39 return script.textContent;
40 }
41
42 function test()
43 {
44 var frameworkRegexString = "/jquery-1\\.11\\.1\\.min\\.js$";
45 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexStri ng);
46
47 InspectorTest.startDebuggerTest(step1, true);
48
49 function step1()
50 {
51 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
52 }
53
54 function step2()
55 {
56 var actions = [
57 "Print", // "debugger" in testFunction()
58 "StepInto", "StepInto", "Print", // entered onEachScript()
59 "StepInto", "StepInto", "Print", // again in onEachScript()
60 "StepOver", "StepOver", "Print", // again in onEachScript()
61 "StepOut", "Print", // last time in onEachScript()
62 "StepOut", "Print", // about to execute jQuery.trigger( )
63 "StepInto", "Print", // onTestEvent1
64 "StepOut", "Print", // onTestEvent2
65 "StepOver", "StepOver", "Print", // onTestEvent3
66 ];
67 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3);
68 }
69
70 function step3()
71 {
72 InspectorTest.completeDebuggerTest();
73 }
74 }
75
76 </script>
77 </head>
78
79 <body onload="runTest()">
80 <input type='button' onclick='testFunction()' value='Test'/>
81 <p>
82 Tests framework blackboxing feature on jQuery.
83 </p>
84 </body>
85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698