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

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

Issue 11196016: [Android WebView] Fix some findbugs warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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.os.Bundle; 7 import android.os.Bundle;
8 import android.os.SystemClock; 8 import android.os.SystemClock;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 import android.util.Pair; 10 import android.util.Pair;
(...skipping 27 matching lines...) Expand all
38 private final static String DATA_URL = "data:text/html,<div/>"; 38 private final static String DATA_URL = "data:text/html,<div/>";
39 private final static String REDIRECT_TARGET_PATH = "/redirect_target.html"; 39 private final static String REDIRECT_TARGET_PATH = "/redirect_target.html";
40 private final static String TITLE = "TITLE"; 40 private final static String TITLE = "TITLE";
41 41
42 private static final long TEST_TIMEOUT = 20000L; 42 private static final long TEST_TIMEOUT = 20000L;
43 private static final int CHECK_INTERVAL = 100; 43 private static final int CHECK_INTERVAL = 100;
44 44
45 private static class TestAwContentsClient 45 private static class TestAwContentsClient
46 extends org.chromium.android_webview.test.TestAwContentsClient { 46 extends org.chromium.android_webview.test.TestAwContentsClient {
47 47
48 public class ShouldIgnoreNavigationHelper extends CallbackHelper { 48 public static class ShouldIgnoreNavigationHelper extends CallbackHelper {
49 private String mShouldIgnoreNavigationUrl; 49 private String mShouldIgnoreNavigationUrl;
50 private String mPreviousShouldIgnoreNavigationUrl; 50 private String mPreviousShouldIgnoreNavigationUrl;
51 private boolean mShouldIgnoreNavigationReturnValue = false; 51 private boolean mShouldIgnoreNavigationReturnValue = false;
52 void setShouldIgnoreNavigationUrl(String url) { 52 void setShouldIgnoreNavigationUrl(String url) {
53 mShouldIgnoreNavigationUrl = url; 53 mShouldIgnoreNavigationUrl = url;
54 } 54 }
55 void setPreviousShouldIgnoreNavigationUrl(String url) { 55 void setPreviousShouldIgnoreNavigationUrl(String url) {
56 mPreviousShouldIgnoreNavigationUrl = url; 56 mPreviousShouldIgnoreNavigationUrl = url;
57 } 57 }
58 void setShouldIgnoreNavigationReturnValue(boolean value) { 58 void setShouldIgnoreNavigationReturnValue(boolean value) {
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 final String redirectTargetUrl = createRedirectTargetPage(webServer) ; 754 final String redirectTargetUrl = createRedirectTargetPage(webServer) ;
755 final String redirectUrl = addPageToTestServer(webServer, "/js_delay ed_replace.html", 755 final String redirectUrl = addPageToTestServer(webServer, "/js_delay ed_replace.html",
756 getHtmlForPageWithJsRedirectTo(redirectTargetUrl, "Replace", 100)); 756 getHtmlForPageWithJsRedirectTo(redirectTargetUrl, "Replace", 100));
757 doTestShouldIgnoreNavigationCalledOnRedirect(webServer, redirectUrl, 757 doTestShouldIgnoreNavigationCalledOnRedirect(webServer, redirectUrl,
758 redirectTargetUrl); 758 redirectTargetUrl);
759 } finally { 759 } finally {
760 if (webServer != null) webServer.shutdown(); 760 if (webServer != null) webServer.shutdown();
761 } 761 }
762 } 762 }
763 } 763 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698