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/timeline-test.js"></script> | 4 <script src="../../http/tests/inspector/timeline-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function original() { } | 7 function original() { } |
8 | 8 |
9 function performActions() | 9 function performActions() |
10 { | 10 { |
11 var b = document.getElementById("btn"); | 11 var b = document.getElementById("btn"); |
12 var foo = original.bind(); | 12 var foo = original.bind(); |
13 b.onclick = foo; | 13 b.onclick = foo; |
14 b.click(); | 14 b.click(); |
15 } | 15 } |
16 | 16 |
17 function test() | 17 function test() |
18 { | 18 { |
19 InspectorTest.evaluateWithTimeline("performActions()", finish); | 19 InspectorTest.evaluateWithTimeline("performActions()", finish); |
20 | 20 |
21 function finish() | 21 function finish() |
22 { | 22 { |
23 function formatter(record) | 23 function formatter(record) |
24 { | 24 { |
25 if (record.type === "FunctionCall") { | 25 if (record.type() === "FunctionCall") { |
26 var scriptName = record.data.scriptName; | 26 var scriptName = record.data().scriptName; |
27 var scriptNameShort = scriptName.substring(scriptName.lastIndexO
f("/") + 1); | 27 var scriptNameShort = scriptName.substring(scriptName.lastIndexO
f("/") + 1); |
28 if (scriptNameShort !== "InjectedScript") | 28 if (scriptNameShort !== "InjectedScript") |
29 InspectorTest.addResult(record.type + " " + scriptNameShort
+ ":" + record.data.scriptLine); | 29 InspectorTest.addResult(record.type() + " " + scriptNameShor
t + ":" + record.data().scriptLine); |
30 } | 30 } |
31 } | 31 } |
32 InspectorTest.printTimelineRecords(null, formatter); | 32 InspectorTest.printTimelineRecords(null, formatter); |
33 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 </script> | 37 </script> |
38 </head> | 38 </head> |
39 | 39 |
40 <body onload="runTest()"> | 40 <body onload="runTest()"> |
41 <p> | 41 <p> |
42 Tests extracting information about original functions from bound ones | 42 Tests extracting information about original functions from bound ones |
43 </p> | 43 </p> |
44 <button id="btn"></button> | 44 <button id="btn"></button> |
45 </body> | 45 </body> |
46 </html> | 46 </html> |
OLD | NEW |