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

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

Issue 2428163002: Refactor CallbackHelper to base/test (Closed)
Patch Set: Change ui test gn 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 import android.util.Pair; 8 import android.util.Pair;
9 9
10 import org.chromium.android_webview.AwContents; 10 import org.chromium.android_webview.AwContents;
11 import org.chromium.android_webview.AwWebResourceResponse; 11 import org.chromium.android_webview.AwWebResourceResponse;
12 import org.chromium.android_webview.test.util.AwTestTouchUtils; 12 import org.chromium.android_webview.test.util.AwTestTouchUtils;
13 import org.chromium.android_webview.test.util.CommonResources; 13 import org.chromium.android_webview.test.util.CommonResources;
14 import org.chromium.android_webview.test.util.JSUtils; 14 import org.chromium.android_webview.test.util.JSUtils;
15 import org.chromium.base.test.util.CallbackHelper;
15 import org.chromium.base.test.util.Feature; 16 import org.chromium.base.test.util.Feature;
16 import org.chromium.base.test.util.TestFileUtil; 17 import org.chromium.base.test.util.TestFileUtil;
17 import org.chromium.content.browser.test.util.CallbackHelper;
18 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnRece ivedErrorHelper; 18 import org.chromium.content.browser.test.util.TestCallbackHelperContainer.OnRece ivedErrorHelper;
19 import org.chromium.net.test.util.TestWebServer; 19 import org.chromium.net.test.util.TestWebServer;
20 20
21 import java.io.ByteArrayInputStream; 21 import java.io.ByteArrayInputStream;
22 import java.io.IOException; 22 import java.io.IOException;
23 import java.io.InputStream; 23 import java.io.InputStream;
24 import java.util.ArrayList; 24 import java.util.ArrayList;
25 import java.util.HashMap; 25 import java.util.HashMap;
26 import java.util.List; 26 import java.util.List;
27 import java.util.Map; 27 import java.util.Map;
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 mAwContents = mTestContainerView.getAwContents(); 869 mAwContents = mTestContainerView.getAwContents();
870 loadUrlAsync(mAwContents, "http://www.example.com"); 870 loadUrlAsync(mAwContents, "http://www.example.com");
871 waitForShouldInterceptRequest.await(); 871 waitForShouldInterceptRequest.await();
872 // The following call will try to send an IPC and wait for a reply from renderer. 872 // The following call will try to send an IPC and wait for a reply from renderer.
873 // We do not check the actual result, because it can be bogus. The impor tant 873 // We do not check the actual result, because it can be bogus. The impor tant
874 // thing is that the call does not cause a deadlock. 874 // thing is that the call does not cause a deadlock.
875 executeJavaScriptAndWaitForResult(mAwContents, client, "1+1"); 875 executeJavaScriptAndWaitForResult(mAwContents, client, "1+1");
876 signalAfterSendingIpc.countDown(); 876 signalAfterSendingIpc.countDown();
877 } 877 }
878 } 878 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698