OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 package com.skia; | 8 package com.skia; |
9 | 9 |
10 import android.app.Instrumentation; | 10 import android.app.Instrumentation; |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 protected void setUp() throws Exception { | 23 protected void setUp() throws Exception { |
24 super.setUp(); | 24 super.setUp(); |
25 mInstrumentation = getInstrumentation(); | 25 mInstrumentation = getInstrumentation(); |
26 } | 26 } |
27 | 27 |
28 public void testVisualBench() throws InterruptedException { | 28 public void testVisualBench() throws InterruptedException { |
29 String pkg = getInstrumentation().getTargetContext().getPackageName(); | 29 String pkg = getInstrumentation().getTargetContext().getPackageName(); |
30 Intent intent = new Intent(getInstrumentation().getTargetContext(), | 30 Intent intent = new Intent(getInstrumentation().getTargetContext(), |
31 VisualBenchActivity.class); | 31 VisualBenchActivity.class); |
32 intent.putExtra("cmdLineFlags", ""); | 32 intent.putExtra("cmdLineFlags", "--outResultsFile /sdcard/skia_results/v
isualbench.json"); |
33 mActivity = launchActivityWithIntent(pkg, VisualBenchActivity.class, int
ent); | 33 mActivity = launchActivityWithIntent(pkg, VisualBenchActivity.class, int
ent); |
34 | 34 |
35 assertNotNull("mActivity is null", mActivity); | 35 assertNotNull("mActivity is null", mActivity); |
36 Thread.sleep(5000); | 36 Thread.sleep(5000); |
37 while (!mActivity.isDestroyed()) { | 37 while (!mActivity.isDestroyed()) { |
38 Log.d("skiatest", "Waiting for subprocess to finish."); | 38 Log.d("skiatest", "Waiting for subprocess to finish."); |
39 Thread.sleep(1000); | 39 Thread.sleep(1000); |
40 } | 40 } |
41 } | 41 } |
42 } | 42 } |
OLD | NEW |