Chromium Code Reviews| Index: LayoutTests/inspector/timeline/timeline-receive-response-event.html |
| diff --git a/LayoutTests/inspector/timeline/timeline-receive-response-event.html b/LayoutTests/inspector/timeline/timeline-receive-response-event.html |
| index a55c3fdf3b24f1d10f526c346f5a3a2ee8467bba..24a8d2ffda63952eda6233174f5c8b3043c7f3f3 100644 |
| --- a/LayoutTests/inspector/timeline/timeline-receive-response-event.html |
| +++ b/LayoutTests/inspector/timeline/timeline-receive-response-event.html |
| @@ -4,7 +4,7 @@ |
| <script src="../../http/tests/inspector/timeline-test.js"></script> |
| <script> |
| -function performActions() |
| +function performActions(callback) |
| { |
| var image = new Image(); |
| image.onload = bar; |
| @@ -12,29 +12,16 @@ function performActions() |
| function bar() { |
| var image = new Image(); |
| - image.onload = function() { testRunner.evaluateInWebInspector(0, "window.step2()"); } |
| + image.onload = function(event) { callback(); } // do not pass event argument to the callback. |
|
yurys
2014/07/17 10:42:24
Should be possible to do image.onload = callback;
|
| image.src = "resources/anotherImage.png"; |
| } |
| } |
| function test() |
| { |
| - WebInspector.inspectorView.showPanel("timeline"); |
| - WebInspector.panels.timeline._model._collectionEnabled = true; |
| + InspectorTest.invokeAsyncWithTimeline("performActions", finish); |
| - TimelineAgent.start(step1); |
| - |
| - function step1() |
| - { |
| - InspectorTest.evaluateInPage("performActions()"); |
| - } |
| - |
| - window.step2 = function() |
| - { |
| - TimelineAgent.stop(step3); |
| - } |
| - |
| - function step3() |
| + function finish() |
| { |
| function dumpFormattedRecord(presentationRecord, prefix) |
| { |
| @@ -53,8 +40,6 @@ function test() |
| dumpFormattedRecord(presentationRecord.presentationChildren()[i], childPrefix); |
| } |
| } |
| - WebInspector.panels.timeline._model._collectionEnabled = false; |
| - |
| var records = WebInspector.panels.timeline._currentViews[0]._rootRecord().presentationChildren(); |
| for (var i = 0; i < records.length; ++i) |
| dumpFormattedRecord(records[i]); |