Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> |
| 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/tracing- test.js"></script> | 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/tracing- test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function performAction(callback) | 7 function performAction() |
| 8 { | 8 { |
| 9 var div = document.querySelector("#my-div"); | 9 var div = document.querySelector("#my-div"); |
| 10 div.addEventListener("click", function(e) { }, false); | 10 div.addEventListener("click", function(e) { }, false); |
| 11 div.click(); | 11 div.click(); |
| 12 | 12 |
| 13 var iframe = document.createElement("iframe"); | 13 var iframe = document.createElement("iframe"); |
| 14 div.appendChild(iframe); | 14 div.appendChild(iframe); |
| 15 callback(); | 15 return Promise.resolve(); |
|
caseq
2016/08/05 17:56:41
just use InspectorTest.evaluateWithTimeline() belo
kozy
2016/08/10 01:21:13
Acknowledged.
| |
| 16 } | 16 } |
| 17 | 17 |
| 18 function test() | 18 function test() |
| 19 { | 19 { |
| 20 InspectorTest.invokeAsyncWithTracing("performAction", finish); | 20 InspectorTest.invokeAsyncWithTracing("performAction", finish); |
| 21 | 21 |
| 22 function finish(devtoolsEvents) | 22 function finish(devtoolsEvents) |
| 23 { | 23 { |
| 24 function windowEventFilter(type, e) | 24 function windowEventFilter(type, e) |
| 25 { | 25 { |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 48 }); | 48 }); |
| 49 InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + J SON.stringify(formattedEvents, null, 2)); | 49 InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + J SON.stringify(formattedEvents, null, 2)); |
| 50 } | 50 } |
| 51 } | 51 } |
| 52 </script> | 52 </script> |
| 53 </head> | 53 </head> |
| 54 <body onLoad="runTest();"> | 54 <body onLoad="runTest();"> |
| 55 <div id="my-div"></div> | 55 <div id="my-div"></div> |
| 56 </body> | 56 </body> |
| 57 </html> | 57 </html> |
| OLD | NEW |