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

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

Issue 976403003: Make shouldInterceptRequest thinner in glue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.test.suitebuilder.annotation.MediumTest; 9 import android.test.suitebuilder.annotation.MediumTest;
10 import android.test.suitebuilder.annotation.SmallTest; 10 import android.test.suitebuilder.annotation.SmallTest;
11 import android.webkit.WebResourceResponse;
11 12
12 import org.chromium.android_webview.AwBrowserProcess; 13 import org.chromium.android_webview.AwBrowserProcess;
13 import org.chromium.android_webview.AwContents; 14 import org.chromium.android_webview.AwContents;
14 import org.chromium.android_webview.AwCookieManager; 15 import org.chromium.android_webview.AwCookieManager;
15 import org.chromium.android_webview.AwWebResourceResponse;
16 import org.chromium.android_webview.test.util.CommonResources; 16 import org.chromium.android_webview.test.util.CommonResources;
17 import org.chromium.android_webview.test.util.CookieUtils; 17 import org.chromium.android_webview.test.util.CookieUtils;
18 import org.chromium.base.test.util.Feature; 18 import org.chromium.base.test.util.Feature;
19 import org.chromium.base.test.util.MinAndroidSdkLevel; 19 import org.chromium.base.test.util.MinAndroidSdkLevel;
20 import org.chromium.content.app.ContentMain; 20 import org.chromium.content.app.ContentMain;
21 import org.chromium.net.test.util.TestWebServer; 21 import org.chromium.net.test.util.TestWebServer;
22 22
23 23
24 /** 24 /**
25 * Tests for CookieManager/Chromium startup ordering weirdness. 25 * Tests for CookieManager/Chromium startup ordering weirdness.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 assertTrue(cookieManager.acceptCookie()); 115 assertTrue(cookieManager.acceptCookie());
116 } 116 }
117 117
118 // https://code.google.com/p/chromium/issues/detail?id=374203 118 // https://code.google.com/p/chromium/issues/detail?id=374203
119 @MediumTest 119 @MediumTest
120 @Feature({"AndroidWebView"}) 120 @Feature({"AndroidWebView"})
121 public void testShouldInterceptRequestDeadlock() throws Throwable { 121 public void testShouldInterceptRequestDeadlock() throws Throwable {
122 String url = "http://www.example.com"; 122 String url = "http://www.example.com";
123 TestAwContentsClient contentsClient = new TestAwContentsClient() { 123 TestAwContentsClient contentsClient = new TestAwContentsClient() {
124 @Override 124 @Override
125 public AwWebResourceResponse shouldInterceptRequest(AwWebResourceReq uest request) { 125 public WebResourceResponse shouldInterceptRequest(WebResourceRequest Impl request) {
126 (new AwCookieManager()).getCookie("www.example.com"); 126 (new AwCookieManager()).getCookie("www.example.com");
127 return null; 127 return null;
128 } 128 }
129 }; 129 };
130 startChromiumWithClient(contentsClient); 130 startChromiumWithClient(contentsClient);
131 loadUrlSync(mAwContents, contentsClient.getOnPageFinishedHelper(), url); 131 loadUrlSync(mAwContents, contentsClient.getOnPageFinishedHelper(), url);
132 } 132 }
133 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698