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

Issue 2933623002: Create AwJUnit4ClassRunner AwActivityTestRule and convert AwContentsTest (Closed)

Created:
3 years, 6 months ago by the real yoland
Modified:
3 years, 4 months ago
CC:
agrieve+watch_chromium.org, android-webview-reviews_chromium.org, chromium-reviews, jbudorick+watch_chromium.org, mikecase+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create AwJUnit4ClassRunner AwActivityTestRule and convert AwContentsTest AwJUnit4ClassRunner automatically duplicate test methods into single process mode test and multiprocess mode test. The multiprocess test would run with AwSwitches.WEBVIEW_SANDBOXED_RENDERER as one of its commandline switches. @SkipCommandLineParameterization is added for test method or class to skip parameterization. This CL also create AwActivityTestRule which shares implementation for helper methods with AwTestBase under AwTestCommon. The CL converts AwContentsTest to JUnit4 as an example. For more on JUnit4 migration, please check src/testing/android/docs/junit4.md BUG=640116

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebase + fix errors #

Total comments: 16

Patch Set 3 : address bo's comments #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1616 lines, -664 lines) Patch
M android_webview/javatests/AndroidManifest.xml View 2 1 chunk +4 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java View 1 2 chunks +7 lines, -6 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java View 1 2 1 chunk +407 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java View 1 2 1 chunk +1 line, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java View 2 chunks +4 lines, -3 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java View 1 2 26 chunks +266 lines, -185 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java View 1 3 chunks +9 lines, -9 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java View 1 2 17 chunks +151 lines, -414 lines 0 comments Download
A android_webview/javatests/src/org/chromium/android_webview/test/AwTestCommon.java View 1 2 1 chunk +587 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/ClientOnPageFinishedTest.java View 1 chunk +1 line, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/CookieManagerTest.java View 1 2 2 chunks +12 lines, -14 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadUrlTest.java View 1 1 chunk +2 lines, -2 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/util/JSUtils.java View 4 chunks +9 lines, -12 lines 0 comments Download
M android_webview/test/BUILD.gn View 1 2 4 chunks +7 lines, -0 lines 0 comments Download
A android_webview/test/shell/src/org/chromium/android_webview/test/AwJUnit4ClassRunner.java View 1 2 1 chunk +101 lines, -0 lines 1 comment Download
M base/test/android/javatests/src/org/chromium/base/test/BaseChromiumAndroidJUnitRunner.java View 1 2 5 chunks +27 lines, -7 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/BaseJUnit4ClassRunner.java View 1 2 3 chunks +19 lines, -0 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/TestListInstrumentationRunListener.java View 1 2 3 chunks +2 lines, -10 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 17 (11 generated)
the real yoland
https://codereview.chromium.org/2933623002/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwSimpleTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwSimpleTest.java (right): https://codereview.chromium.org/2933623002/diff/1/android_webview/javatests/src/org/chromium/android_webview/test/AwSimpleTest.java#newcode1 android_webview/javatests/src/org/chromium/android_webview/test/AwSimpleTest.java:1: // Copyright 2012 The Chromium Authors. All rights reserved. ...
3 years, 6 months ago (2017-06-09 21:40:37 UTC) #1
the real yoland
take out the Logs
3 years, 6 months ago (2017-06-12 21:51:02 UTC) #2
the real yoland
3 years, 5 months ago (2017-07-20 02:41:12 UTC) #6
boliu
https://codereview.chromium.org/2933623002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java (left): https://codereview.chromium.org/2933623002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java#oldcode455 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java:455: String xfoo = getJavaScriptResultBodyTextContent(awContents, mContentsClient); add this to Rules? ...
3 years, 5 months ago (2017-07-20 21:22:48 UTC) #10
the real yoland
https://codereview.chromium.org/2933623002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java (left): https://codereview.chromium.org/2933623002/diff/20001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java#oldcode455 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java:455: String xfoo = getJavaScriptResultBodyTextContent(awContents, mContentsClient); On 2017/07/20 at 21:22:47, ...
3 years, 4 months ago (2017-07-27 00:29:48 UTC) #12
boliu
3 years, 4 months ago (2017-07-27 17:32:18 UTC) #17
are the base changes relevant?

also looks like a bunch of webview tests failed

https://codereview.chromium.org/2933623002/diff/40001/android_webview/test/sh...
File
android_webview/test/shell/src/org/chromium/android_webview/test/AwJUnit4ClassRunner.java
(right):

https://codereview.chromium.org/2933623002/diff/40001/android_webview/test/sh...
android_webview/test/shell/src/org/chromium/android_webview/test/AwJUnit4ClassRunner.java:47:
Log.w("#YOLAND-SIZE",
no random logs, and below

Powered by Google App Engine
This is Rietveld 408576698