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

Side by Side 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, 8 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 var panel = WebInspector.inspectorView.panel("timeline"); 9 var panel = WebInspector.inspectorView.panel("timeline");
10 var model = panel._model; 10 var model = panel._model;
11 InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline is bein g recorded"); 11
12 InspectorTest.assertTrue(!model.records().length, "timeline has already been recorded"); 12 model.addEventListener(WebInspector.TimelineModel.Events.RecordingStarted, r ecordingStarted);
13 model.addEventListener(WebInspector.TimelineModel.Events.RecordingStopped, r ecordingStopped);
13 14
14 WebInspector.inspectorView.showPanel("console"); 15 WebInspector.inspectorView.showPanel("console");
15 InspectorTest.runWhenPageLoads(step1); 16 InspectorTest.runWhenPageLoads(step1);
17 InspectorTest.addResult("Reloading page on console panel");
16 WebInspector.resourceTreeModel.reloadPage(); 18 WebInspector.resourceTreeModel.reloadPage();
17 19
20
18 function step1() 21 function step1()
19 { 22 {
20 InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline sta rted recording");
21 InspectorTest.assertTrue(!model.records().length, "timeline has been rec orded");
22
23 WebInspector.inspectorView.showPanel("timeline"); 23 WebInspector.inspectorView.showPanel("timeline");
24 InspectorTest.runWhenPageLoads(step2); 24 InspectorTest.runWhenPageLoads(function() {});
apavlov 2014/04/02 11:32:34 InspectorTest.reloadPage() ?
25 InspectorTest.addResult("Reloading page on timeline panel");
25 WebInspector.resourceTreeModel.reloadPage(); 26 WebInspector.resourceTreeModel.reloadPage();
26 } 27 }
27 28
28 function step2() 29 function recordingStarted()
29 { 30 {
30 InspectorTest.assertTrue(model.records().length, "timeline should have b een recorded"); 31 InspectorTest.addResult("Recording started");
31 InspectorTest.assertTrue(!model._clientInitiatedRecording, "timeline rec ording should have finished"); 32 InspectorTest.addResult("Initiated by user: " + model._clientInitiatedRe cording);
33 }
34
35 function recordingStopped()
36 {
37 InspectorTest.addResult("Recording stopped");
32 InspectorTest.completeTest(); 38 InspectorTest.completeTest();
33 } 39 }
34 } 40 }
35 41
36 </script> 42 </script>
37 </head> 43 </head>
38 44
39 <body onload="runTest()"> 45 <body onload="runTest()">
40 <p>Test auto-recording of Timeline.</p> 46 <p>Test auto-recording of Timeline.</p>
41 47
42 </body> 48 </body>
43 </html> 49 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698