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

Unified Diff: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java

Issue 2337983004: [AndroidWebView] Add instrumentation test to catch StrictMode violations (Closed)
Patch Set: Minor changes - class renaming + comment removal. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java
index c3af5de0dfcdcfb652a08ee7a28a08fc797e741a..9e9de75202389f1efeb60c674b8a69060e232c85 100644
--- a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java
+++ b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestRunnerActivity.java
@@ -7,6 +7,7 @@ package org.chromium.android_webview.test;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
+import android.os.StrictMode;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
@@ -30,7 +31,9 @@ public class AwTestRunnerActivity extends Activity {
AwShellResourceProvider.registerResources(this);
ContextUtils.initApplicationContext(getApplicationContext());
+ StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
AwBrowserProcess.loadLibrary();
+ StrictMode.setThreadPolicy(oldPolicy);
mLinearLayout = new LinearLayout(this);
mLinearLayout.setOrientation(LinearLayout.VERTICAL);

Powered by Google App Engine
This is Rietveld 408576698