diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-11-17 18:24:49 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-11-17 18:24:49 +0000 |
commit | f118a318bb942ff5a02d07f5721f7122adeb4c3f (patch) | |
tree | dcd23357d4208e647ac0601f0ba03cc46e1967dd | |
parent | a0cac3151315da4adcd4dbea4ff21a3b4fc7ea54 (diff) | |
parent | 9ee9488a63e7a65a124a9d9215a8074f123b844c (diff) | |
download | android_frameworks_webview-f118a318bb942ff5a02d07f5721f7122adeb4c3f.tar.gz android_frameworks_webview-f118a318bb942ff5a02d07f5721f7122adeb4c3f.tar.bz2 android_frameworks_webview-f118a318bb942ff5a02d07f5721f7122adeb4c3f.zip |
Merge AOSP master into M39 glue layer code.
Change-Id: I58c8e5a6b58f87fb737c6def35175990673e1683
2 files changed, 20 insertions, 19 deletions
diff --git a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java index 4132a8e..8620282 100644 --- a/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java +++ b/chromium/java/com/android/webview/chromium/WebViewChromiumFactoryProvider.java @@ -131,6 +131,12 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider { cl.appendSwitch("enable-dcheck"); ThreadUtils.setWillOverrideUiThread(); + + // TODO: Remove when GL is supported by default in the upstream code. + if (!cl.hasSwitch("disable-webview-gl-mode")) { + cl.appendSwitch("testing-webview-gl-mode"); + } + // Load chromium library. AwBrowserProcess.loadLibrary(); // Load glue-layer support library. diff --git a/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java b/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java index efd9f27..16eee7f 100644 --- a/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java +++ b/chromium/tests/UbWebViewJankTests/src/com/android/webview/chromium/tests/jank/WebViewFlingTest.java @@ -22,8 +22,10 @@ import android.os.SystemClock; import android.support.test.jank.JankTest; import android.support.test.jank.JankTestBase; import android.support.test.jank.JankType; +import android.support.test.uiautomator.By; +import android.support.test.uiautomator.Direction; import android.support.test.uiautomator.UiDevice; -import android.support.test.uiautomator.UiObjectNotFoundException; +import android.support.test.uiautomator.UiObject2; import android.support.test.uiautomator.UiScrollable; import android.support.test.uiautomator.UiSelector; @@ -47,17 +49,14 @@ import java.io.IOException; public class WebViewFlingTest extends JankTestBase { private static final long TEST_DELAY_TIME_MS = 2 * 1000; // 2 seconds - private static final long PAGE_LOAD_DELAY_TIMEOUT_MS = 10 * 1000; // 10 seconds private static final long PAGE_LOAD_DELAY_TIME_MS = 20 * 1000; // 20 seconds private static final int MIN_DATA_SIZE = 50; private static final long DEFAULT_ANIMATION_TIME = 2 * 1000; private static final String CHROMIUM_SHELL_APP = "com.android.webview.chromium.shell"; private static final String CHROMIUM_SHELL_ACTIVITY = CHROMIUM_SHELL_APP + ".JankActivity"; - private static final String AW_CONTAINER = "com.android.webview.chromium.shell:id/container"; + private static final String RES_PACKAGE = "com.android.webview.chromium.shell"; private UiDevice mDevice; - private UiScrollable mWebPageDisplay = null; - /** * {@inheritDoc} @@ -84,14 +83,19 @@ public class WebViewFlingTest extends JankTestBase { } @Override - public void beforeLoop() throws UiObjectNotFoundException { - getContainer().flingToBeginning(20); + public void beforeLoop() { + UiObject2 container = mDevice.findObject(By.res(RES_PACKAGE, "container")); + + // Fling to the top + while (container.fling(Direction.UP)) { + } + SystemClock.sleep(TEST_DELAY_TIME_MS); } @JankTest(type=JankType.CONTENT_FRAMES, expectedFrames=MIN_DATA_SIZE) - public void testBrowserPageFling() throws UiObjectNotFoundException, IOException { - getContainer().flingForward(); + public void testBrowserPageFling() throws IOException { + mDevice.findObject(By.res(RES_PACKAGE, "container")).fling(Direction.DOWN); SystemClock.sleep(DEFAULT_ANIMATION_TIME); } @@ -101,16 +105,7 @@ public class WebViewFlingTest extends JankTestBase { @Override protected void tearDown() throws Exception { mDevice.unfreezeRotation(); - super.tearDown(); - } - private UiScrollable getContainer() { - if (mWebPageDisplay == null) { - mWebPageDisplay = - new UiScrollable(new UiSelector().resourceId(AW_CONTAINER).instance(0)); - assertTrue("Failed to get web container", - mWebPageDisplay.waitForExists(PAGE_LOAD_DELAY_TIMEOUT_MS)); - } - return mWebPageDisplay; + super.tearDown(); } } |