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

Side by Side Diff: android_webview/tools/WebViewShell/src/org/chromium/webview_shell/WebViewLayoutTestRunner.java

Issue 1364593002: Refactor android_webview_shell and its tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.webview_shell;
6
7 import android.os.Bundle;
8 import android.test.AndroidTestRunner;
9 import android.test.InstrumentationTestRunner;
10
11 import org.chromium.test.reporter.TestStatusListener;
12
13 /**
14 * Customized test runner for running instrumentation tests in WebViewBrowserTes ts.
15 */
16 public class WebViewLayoutTestRunner extends InstrumentationTestRunner {
17 private String mModeArgument;
18 private static final String MODE_REBASELINE = "rebaseline";
19
20 @Override
21 public void onCreate(Bundle arguments) {
22 super.onCreate(arguments);
23 if (arguments != null) {
24 mModeArgument = arguments.getString("mode");
25 }
26 }
27
28 public boolean isRebaseline() {
29 return mModeArgument != null ? mModeArgument.equals(MODE_REBASELINE) : f alse;
30 }
31
32 @Override
33 protected AndroidTestRunner getAndroidTestRunner() {
34 AndroidTestRunner runner = super.getAndroidTestRunner();
35 runner.addTestListener(new TestStatusListener(getContext()));
36 return runner;
37 }
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698