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

Unified Diff: LayoutTests/inspector/timeline/timeline-auto-record.html

Issue 221833004: Cleanup inspector test expectations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/timeline/timeline-auto-record.html
diff --git a/LayoutTests/inspector/timeline/timeline-auto-record.html b/LayoutTests/inspector/timeline/timeline-auto-record.html
index 2d9f8a53e03990d0d3d2fed00f84be723c28bb1c..6140c1fd34b2234ac72ba810f490d751d1dd76e3 100644
--- a/LayoutTests/inspector/timeline/timeline-auto-record.html
+++ b/LayoutTests/inspector/timeline/timeline-auto-record.html
@@ -8,27 +8,33 @@ function test()
{
var panel = WebInspector.inspectorView.panel("timeline");
var model = panel._model;
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline is being recorded");
- InspectorTest.assertTrue(!model.records().length, "timeline has already been recorded");
+
+ model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, recordingStarted);
+ model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, recordingStopped);
WebInspector.inspectorView.showPanel("console");
InspectorTest.runWhenPageLoads(step1);
+ InspectorTest.addResult("Reloading page on console panel");
WebInspector.resourceTreeModel.reloadPage();
+
function step1()
{
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline started recording");
- InspectorTest.assertTrue(!model.records().length, "timeline has been recorded");
-
WebInspector.inspectorView.showPanel("timeline");
- InspectorTest.runWhenPageLoads(step2);
+ InspectorTest.runWhenPageLoads(function() {});
apavlov 2014/04/02 11:32:34 InspectorTest.reloadPage() ?
+ InspectorTest.addResult("Reloading page on timeline panel");
WebInspector.resourceTreeModel.reloadPage();
}
- function step2()
+ function recordingStarted()
+ {
+ InspectorTest.addResult("Recording started");
+ InspectorTest.addResult("Initiated by user: " + model._clientInitiatedRecording);
+ }
+
+ function recordingStopped()
{
- InspectorTest.assertTrue(model.records().length, "timeline should have been recorded");
- InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline recording should have finished");
+ InspectorTest.addResult("Recording stopped");
InspectorTest.completeTest();
}
}

Powered by Google App Engine
This is Rietveld 408576698