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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/TracingControllerAndroidTest.java

Issue 425593002: Refactor trace_event_impl's SetEnabled to use TraceOptions. Propagate this through the whole stack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pull enable_systrace to TraceOptions Created 6 years, 4 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout; 7 import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
8 8
9 import android.os.SystemClock; 9 import android.os.SystemClock;
10 import android.test.suitebuilder.annotation.MediumTest; 10 import android.test.suitebuilder.annotation.MediumTest;
(...skipping 15 matching lines...) Expand all
26 ContentShellActivity activity = launchContentShellWithUrl("about:blank") ; 26 ContentShellActivity activity = launchContentShellWithUrl("about:blank") ;
27 waitForActiveShellToBeDoneLoading(); 27 waitForActiveShellToBeDoneLoading();
28 28
29 final TracingControllerAndroid tracingController = new TracingController Android(activity); 29 final TracingControllerAndroid tracingController = new TracingController Android(activity);
30 assertFalse(tracingController.isTracing()); 30 assertFalse(tracingController.isTracing());
31 assertNull(tracingController.getOutputPath()); 31 assertNull(tracingController.getOutputPath());
32 32
33 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 33 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
34 @Override 34 @Override
35 public void run() { 35 public void run() {
36 assertTrue(tracingController.startTracing(true, "*", false)); 36 assertTrue(tracingController.startTracing(
37 true, "*", TracingControllerAndroid.TraceOptions.RECORD_UNTI L_FULL));
37 } 38 }
38 }); 39 });
39 40
40 assertTrue(tracingController.isTracing()); 41 assertTrue(tracingController.isTracing());
41 File file = new File(tracingController.getOutputPath()); 42 File file = new File(tracingController.getOutputPath());
42 assertTrue(file.getName().startsWith("chrome-profile-results")); 43 assertTrue(file.getName().startsWith("chrome-profile-results"));
43 44
44 ThreadUtils.runOnUiThreadBlocking(new Runnable() { 45 ThreadUtils.runOnUiThreadBlocking(new Runnable() {
45 @Override 46 @Override
46 public void run() { 47 public void run() {
(...skipping 10 matching lines...) Expand all
57 } 58 }
58 Thread.sleep(1000); 59 Thread.sleep(1000);
59 } 60 }
60 61
61 // It says it stopped, so it should have written the output file. 62 // It says it stopped, so it should have written the output file.
62 assertTrue(file.exists()); 63 assertTrue(file.exists());
63 assertTrue(file.delete()); 64 assertTrue(file.delete());
64 tracingController.destroy(); 65 tracingController.destroy();
65 } 66 }
66 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698