Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / tracing / timeline-bound-function.html
blobdb71e9eb807e87b8738d4ebbeee757de54b6e7a6
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script>
7 function original() { }
9 function performActions()
11 var b = document.getElementById("btn");
12 var foo = original.bind();
13 b.onclick = foo;
14 b.click();
17 function test()
19 InspectorTest.evaluateWithTimeline("performActions()", finish);
21 function finish()
23 function formatter(record)
25 if (record.type() === "FunctionCall") {
26 var data = record.traceEvent().args["data"];
27 var scriptName = data.scriptName;
28 var scriptNameShort = scriptName.substring(scriptName.lastIndexOf("/") + 1);
29 if (scriptNameShort !== "InjectedScript")
30 InspectorTest.addResult(record.type() + " " + scriptNameShort + ":" + data.scriptLine);
33 InspectorTest.printTimelineRecords(null, formatter);
34 InspectorTest.completeTest();
38 </script>
39 </head>
41 <body onload="runTest()">
42 <p>
43 Tests extracting information about original functions from bound ones
44 </p>
45 <button id="btn"></button>
46 </body>
47 </html>