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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-bound-function.html

Issue 2145873002: [DevTools] Split inspector/tracing into subdirectories to speed things up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
(Empty)
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>
6
7 function original() { }
8
9 function performActions()
10 {
11 var b = document.getElementById("btn");
12 var foo = original.bind();
13 b.onclick = foo;
14 b.click();
15 }
16
17 function test()
18 {
19 InspectorTest.evaluateWithTimeline("performActions()", finish);
20
21 function finish()
22 {
23 function formatter(record)
24 {
25 if (record.type() === "FunctionCall") {
26 var data = record.traceEvent().args["data"];
27 var scriptName = data.scriptName;
28 var scriptNameShort = scriptName.substring(scriptName.lastIndexO f("/") + 1);
29 InspectorTest.addResult(record.type() + " " + scriptNameShort + ":" + data.scriptLine);
30 }
31 }
32 InspectorTest.printTimelineRecords(null, formatter);
33 InspectorTest.completeTest();
34 }
35 }
36
37 </script>
38 </head>
39
40 <body onload="runTest()">
41 <p>
42 Tests extracting information about original functions from bound ones
43 </p>
44 <button id="btn"></button>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698