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

Side by Side Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwStrictModeTest.java

Issue 2611883002: Prepare to call GMS APIs from WebView (Closed)
Patch Set: explicit destructor for style checker Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview.test; 5 package org.chromium.android_webview.test;
6 6
7 import android.os.StrictMode; 7 import android.os.StrictMode;
8 import android.support.test.filters.LargeTest; 8 import android.support.test.filters.LargeTest;
9 9
10 import org.chromium.android_webview.AwBrowserProcess;
11 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
12 11
13 /** 12 /**
14 * Tests ensuring that starting up WebView does not cause any diskRead StrictMod e violations. 13 * Tests ensuring that starting up WebView does not cause any diskRead StrictMod e violations.
15 */ 14 */
16 public class AwStrictModeTest extends AwTestBase { 15 public class AwStrictModeTest extends AwTestBase {
17 private TestAwContentsClient mContentsClient; 16 private TestAwContentsClient mContentsClient;
18 private AwTestContainerView mAwTestContainerView; 17 private AwTestContainerView mAwTestContainerView;
19 18
20 private StrictMode.ThreadPolicy mOldThreadPolicy; 19 private StrictMode.ThreadPolicy mOldThreadPolicy;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 getInstrumentation().runOnMainSync(new Runnable() { 91 getInstrumentation().runOnMainSync(new Runnable() {
93 @Override 92 @Override
94 public void run() { 93 public void run() {
95 StrictMode.setThreadPolicy(mOldThreadPolicy); 94 StrictMode.setThreadPolicy(mOldThreadPolicy);
96 StrictMode.setVmPolicy(mOldVmPolicy); 95 StrictMode.setVmPolicy(mOldVmPolicy);
97 }}); 96 }});
98 } 97 }
99 98
100 private void startEverythingSync() throws Exception { 99 private void startEverythingSync() throws Exception {
101 getActivity(); 100 getActivity();
101 createAwBrowserContext();
102 startBrowserProcess();
102 getInstrumentation().runOnMainSync(new Runnable() { 103 getInstrumentation().runOnMainSync(new Runnable() {
103 @Override 104 @Override
104 public void run() { 105 public void run() {
105 createAwBrowserContext();
106 AwBrowserProcess.start();
107 mAwTestContainerView = createAwTestContainerView(mContentsClient ); 106 mAwTestContainerView = createAwTestContainerView(mContentsClient );
108 } 107 }
109 }); 108 });
110 } 109 }
111 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698