OLD | NEW |
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/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
6 <script src="resources/framework.js"></script> | 6 <script src="resources/framework.js"></script> |
7 <script> | 7 <script> |
8 | 8 |
9 function appendElement(parentId, childId) | 9 function appendElement(parentId, childId) |
10 { | 10 { |
11 var child = document.createElement("div"); | 11 var child = document.createElement("div"); |
12 child.id = childId; | 12 child.id = childId; |
13 var parent = document.getElementById(parentId); | 13 var parent = document.getElementById(parentId); |
14 Framework.appendChild(parent, child); | 14 Framework.appendChild(parent, child); |
15 } | 15 } |
16 | 16 |
17 function sendXHR(url) | 17 function sendXHR(url) |
18 { | 18 { |
19 Framework.sendXHR(url); | 19 Framework.sendXHR(url); |
20 } | 20 } |
21 | 21 |
22 function addListenerAndClick() | 22 function addListenerAndClick() |
23 { | 23 { |
24 function testElementClicked() | 24 function testElementClicked() |
25 { | 25 { |
26 return 0; | 26 return 0; |
27 } | 27 } |
28 | 28 |
29 var button = document.getElementById("test"); | 29 var button = document.getElementById("test"); |
30 Framework.addEventListener(button, "click", Framework.bind(testElementClicke
d, null), true); | 30 var remover = Framework.addEventListener(button, "click", Framework.empty, t
rue); // Should be ignored. |
31 button.click(); | 31 button.click(); |
| 32 remover(); |
| 33 |
| 34 remover = Framework.addEventListener(button, "click", Framework.bind(testEle
mentClicked, null), true); |
| 35 button.click(); |
| 36 remover(); |
32 } | 37 } |
33 | 38 |
34 function test() | 39 function test() |
35 { | 40 { |
36 var frameworkRegexString = "/framework\\.js$"; | 41 var frameworkRegexString = "/framework\\.js$"; |
37 WebInspector.experimentsSettings.frameworksDebuggingSupport.enableForTest(); | 42 WebInspector.experimentsSettings.frameworksDebuggingSupport.enableForTest(); |
38 WebInspector.settings.skipStackFramesSwitch.set(true); | 43 WebInspector.settings.skipStackFramesSwitch.set(true); |
39 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); | 44 WebInspector.settings.skipStackFramesPattern.set(frameworkRegexString); |
40 | 45 |
41 InspectorTest.setQuiet(true); | 46 InspectorTest.setQuiet(true); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 </head> | 81 </head> |
77 | 82 |
78 <body onload="runTest()"> | 83 <body onload="runTest()"> |
79 <p> | 84 <p> |
80 Tests framework black-boxing on DOM, XHR and Event breakpoints. | 85 Tests framework black-boxing on DOM, XHR and Event breakpoints. |
81 </p> | 86 </p> |
82 <div id="rootElement"></div> | 87 <div id="rootElement"></div> |
83 <input type=button id="test"></input> | 88 <input type=button id="test"></input> |
84 </body> | 89 </body> |
85 </html> | 90 </html> |
OLD | NEW |