Commit 908f3f71 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Patch flaky tests due to strict mode

Android system is crashing due to StrictMode but we need to know the
underlying cause in order to understand why it is flaking. Disabling
StrictMode just for those code paths as the flakiness is unreliable and
hard to reproduce.

BUG=767423,767153,767624

Change-Id: I0ddcabd876bab99841487742f039cea920ea433d
Reviewed-on: https://chromium-review.googlesource.com/677226
Commit-Queue: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarccameron chromium <ccameron@chromium.org>
Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503595}
parent 12c14b4d
......@@ -31,6 +31,7 @@ import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.ObserverList;
import org.chromium.base.StrictModeContext;
import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
......@@ -211,9 +212,12 @@ public class WindowAndroid {
mContextRef = new WeakReference<>(context);
mOutstandingIntents = new SparseArray<>();
mIntentErrors = new HashMap<>();
mVSyncMonitor = new VSyncMonitor(context, mVSyncListener);
mAccessibilityManager = (AccessibilityManager) mApplicationContext.getSystemService(
Context.ACCESSIBILITY_SERVICE);
// Temporary solution for flaky tests, see https://crbug.com/767624 for context
try (StrictModeContext unused = StrictModeContext.allowDiskReads()) {
mVSyncMonitor = new VSyncMonitor(context, mVSyncListener);
mAccessibilityManager = (AccessibilityManager) mApplicationContext.getSystemService(
Context.ACCESSIBILITY_SERVICE);
}
mDisplayAndroid = display;
// Configuration.isDisplayServerWideColorGamut must be queried from the window's context.
// Because of crbug.com/756180, many devices report true for isScreenWideColorGamut in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment