Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-frameworks / frameworks-jquery.html
blob74d6dab14c67e842fa08238baa7db2e513fba487
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="../debugger/resources/jquery-1.11.1.min.js"></script>
6 <script>
8 function testFunction()
10 var pp = $("p");
11 var scripts = $("script");
12 pp.on("testevent", onTestEvent1);
13 pp.on("testevent", onTestEvent2);
14 pp.on("testevent", onTestEvent3);
16 debugger;
18 scripts.each(onEachScript);
19 pp.trigger("testevent");
22 function onTestEvent1()
24 output("onTestEvent1");
27 function onTestEvent2()
29 output("onTestEvent2");
32 function onTestEvent3()
34 output("onTestEvent3");
37 function onEachScript(index, script)
39 return script.textContent;
42 function test()
44 var frameworkRegexString = "/jquery-1\\.11\\.1\\.min\\.js$";
45 WebInspector.settingForTest("skipStackFramesPattern").set(frameworkRegexString);
47 InspectorTest.startDebuggerTest(step1, true);
49 function step1()
51 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
54 function step2()
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
67 InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3);
70 function step3()
72 InspectorTest.completeDebuggerTest();
76 </script>
77 </head>
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>