125df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller#!/bin/bash
225df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller
325df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller# Copyright 2015 The Chromium Authors. All rights reserved.
425df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller# Use of this source code is governed by a BSD-style license that can be
525df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller# found in the LICENSE file.
625df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller
725df6673f1c51e755dd4d08cf64666cdff5e0f18Paul MillerPACKAGE_NAME="org.chromium.webview_shell"
825df6673f1c51e755dd4d08cf64666cdff5e0f18Paul MillerDEVICE_WEBVIEW_TEST_PATH="/sdcard/android_webview/tools/WebViewShell/test/"
925df6673f1c51e755dd4d08cf64666cdff5e0f18Paul MillerTESTRUNNER="../../../../build/android/test_runner.py"
1025df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller
1125df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller$TESTRUNNER instrumentation \
1225df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller    --test-apk AndroidWebViewShell \
1325df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller    -f 'WebViewLayoutTest*' \
1425df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller    --isolate-file-path android_webview/android_webview_shell_test_apk.isolate
1525df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller
1625df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Millerif [ "$1" = "rebaseline" ]; then
1725df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller  adb shell am instrument -w -e mode rebaseline -e class \
1825df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller      $PACKAGE_NAME.WebViewLayoutTest \
1925df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller      $PACKAGE_NAME/$PACKAGE_NAME.WebViewLayoutTestRunner
2025df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller  adb pull $DEVICE_WEBVIEW_TEST_PATH ../test_rebaseline/
2125df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Millerfi
2225df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Miller
2325df6673f1c51e755dd4d08cf64666cdff5e0f18Paul Millerexit 0
24