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

Side by Side Diff: platform_tools/android/apps/visualbench/src/main/java/com/skia/VisualBenchTestActivity.java

Issue 1295823004: Add VisualBenchTestActivity for instrumentation-testing VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove extra dependencies Created 5 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
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 package com.skia;
9
10 import android.app.Instrumentation;
11 import android.content.Intent;
12 import android.test.ActivityUnitTestCase;
13 import android.util.Log;
14
15 public class VisualBenchTestActivity extends ActivityUnitTestCase<VisualBenchAct ivity> {
16 private VisualBenchActivity mActivity;
17 private Instrumentation mInstrumentation;
18
19 public VisualBenchTestActivity() {
20 super(VisualBenchActivity.class);
21 }
22
23 protected void setUp() throws Exception {
24 super.setUp();
25 mInstrumentation = getInstrumentation();
26 }
27
28 public void testVisualBench() throws InterruptedException {
29 String pkg = getInstrumentation().getTargetContext().getPackageName();
30 Intent intent = new Intent(getInstrumentation().getTargetContext(),
31 VisualBenchActivity.class);
32 intent.putExtra("cmdLineFlags", "");
33 mActivity = launchActivityWithIntent(pkg, VisualBenchActivity.class, int ent);
34
35 assertNotNull("mActivity is null", mActivity);
36 Thread.sleep(5000);
37 while (!mActivity.isDestroyed()) {
38 Log.d("skiatest", "Waiting for subprocess to finish.");
39 Thread.sleep(1000);
40 }
41 }
42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698