From a49e9faf5eb9f5fe417ce6470bb58f95d2a7261e Mon Sep 17 00:00:00 2001 From: aurimas Date: Thu, 16 Oct 2014 14:10:22 -0700 Subject: Fix Java indentation issues. Fix indentation issues to allow enabling Checkstyle indentation rule. BUG=318404 Review URL: https://codereview.chromium.org/663573002 Cr-Commit-Position: refs/heads/master@{#299975} --- .../test/AndroidScrollIntegrationTest.java | 155 +++++++------ .../test/AndroidViewIntegrationTest.java | 47 ++-- .../test/AwContentsClientAutoLoginTest.java | 2 +- .../test/AwContentsClientCallbackHelperTest.java | 8 +- .../test/AwContentsClientFaviconTest.java | 8 +- ...AwContentsClientShouldInterceptRequestTest.java | 56 ++--- ...ContentsClientShouldOverrideUrlLoadingTest.java | 124 +++++------ .../test/AwContentsClientVisitedHistoryTest.java | 8 +- .../android_webview/test/AwContentsRenderTest.java | 4 +- .../android_webview/test/AwContentsTest.java | 12 +- .../test/AwQuotaManagerBridgeTest.java | 28 ++- .../android_webview/test/AwSettingsTest.java | 248 +++++++++++---------- .../test/ClientOnPageFinishedTest.java | 2 +- .../android_webview/test/CookieManagerTest.java | 6 +- .../android_webview/test/GeolocationTest.java | 2 +- .../android_webview/test/KeySystemTest.java | 2 +- .../test/LoadDataWithBaseUrlTest.java | 24 +- .../chromium/android_webview/test/LoadUrlTest.java | 23 +- .../test/NavigationHistoryTest.java | 2 +- .../android_webview/test/TestAwContentsClient.java | 2 +- .../android_webview/test/UserAgentTest.java | 14 +- .../test/util/AwQuotaManagerBridgeTestUtil.java | 13 +- .../android_webview/test/util/CommonResources.java | 70 +++--- .../android_webview/test/util/JSUtils.java | 14 +- .../android_webview/test/util/VideoTestUtil.java | 22 +- 25 files changed, 454 insertions(+), 442 deletions(-) (limited to 'android_webview/javatests/src') diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java index bd75c07..5f8b805 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java @@ -62,7 +62,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { private CallbackHelper mOnScrollToCallbackHelper = new CallbackHelper(); private OverScrollByCallbackHelper mOverScrollByCallbackHelper = - new OverScrollByCallbackHelper(); + new OverScrollByCallbackHelper(); public ScrollTestContainerView(Context context, boolean allowHardwareAcceleration) { super(context, allowHardwareAcceleration); @@ -129,17 +129,17 @@ public class AndroidScrollIntegrationTest extends AwTestBase { } private static final String TEST_PAGE_COMMON_HEADERS = - " " + - " "; + " " + + " "; private static final String TEST_PAGE_COMMON_CONTENT = "
test div
"; private String makeTestPage(String onscrollObserver, String firstFrameObserver, @@ -198,7 +198,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { @Override public void run() { equal.set((scrollXPix == testContainerView.getScrollX()) && - (scrollYPix == testContainerView.getScrollY())); + (scrollYPix == testContainerView.getScrollY())); } }); return equal.get(); @@ -222,11 +222,11 @@ public class AndroidScrollIntegrationTest extends AwTestBase { @Override public Boolean call() throws Exception { String x = executeJavaScriptAndWaitForResult(awContents, contentsClient, - "window.scrollX"); + "window.scrollX"); String y = executeJavaScriptAndWaitForResult(awContents, contentsClient, - "window.scrollY"); + "window.scrollY"); return (Integer.toString(xCss).equals(x) && - Integer.toString(yCss).equals(y)); + Integer.toString(yCss).equals(y)); } }); } @@ -234,12 +234,12 @@ public class AndroidScrollIntegrationTest extends AwTestBase { private void assertScrolledToBottomInJs(final AwContents awContents, final TestAwContentsClient contentsClient) throws Exception { final String isBottomScript = "window.scrollY == " + - "(window.document.documentElement.scrollHeight - window.innerHeight)"; + "(window.document.documentElement.scrollHeight - window.innerHeight)"; poll(new Callable() { @Override public Boolean call() throws Exception { String r = executeJavaScriptAndWaitForResult(awContents, contentsClient, - isBottomScript); + isBottomScript); return r.equals("true"); } }); @@ -256,7 +256,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { @Override public void run() { firstFrameObserver.register(testContainerView.getContentViewCore(), - firstFrameObserverName); + firstFrameObserverName); } }); @@ -276,11 +276,11 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testUiScrollReflectedInJs() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int targetScrollXCss = 233; final int targetScrollYCss = 322; final int targetScrollXPix = (int) Math.ceil(targetScrollXCss * deviceDIPScale); @@ -291,7 +291,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { @Override public void run() { onscrollObserver.register(testContainerView.getContentViewCore(), - "onscrollObserver"); + "onscrollObserver"); } }); @@ -309,11 +309,11 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testJsScrollReflectedInUi() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int targetScrollXCss = 132; final int targetScrollYCss = 243; final int targetScrollXPix = (int) Math.floor(targetScrollXCss * deviceDIPScale); @@ -323,7 +323,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { makeTestPage(null, null, ""), "text/html", false); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); executeJavaScriptAndWaitForResult(testContainerView.getAwContents(), contentsClient, String.format("window.scrollTo(%d, %d);", targetScrollXCss, targetScrollYCss)); @@ -337,23 +337,23 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testJsScrollFromBody() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int targetScrollXCss = 132; final int targetScrollYCss = 243; final int targetScrollXPix = (int) Math.floor(targetScrollXCss * deviceDIPScale); final int targetScrollYPix = (int) Math.floor(targetScrollYCss * deviceDIPScale); final String scrollFromBodyScript = - " "; + " "; final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); loadDataAsync(testContainerView.getAwContents(), makeTestPage(null, null, scrollFromBodyScript), "text/html", false); @@ -367,11 +367,11 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testJsScrollCanBeAlteredByUi() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int targetScrollXCss = 132; final int targetScrollYCss = 243; final int targetScrollXPix = (int) Math.floor(targetScrollXCss * deviceDIPScale); @@ -388,7 +388,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { setMaxScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); executeJavaScriptAndWaitForResult(testContainerView.getAwContents(), contentsClient, "window.scrollTo(" + targetScrollXCss + "," + targetScrollYCss + ")"); @@ -402,7 +402,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testTouchScrollCanBeAlteredByUi() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final int dragSteps = 10; @@ -413,7 +413,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { final int targetScrollYPix = dragStepSize * dragSteps; final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int maxScrollXPix = 101; final int maxScrollYPix = 211; // Make sure we can't hit these values simply as a result of scrolling. @@ -427,7 +427,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); AwTestTouchUtils.dragCompleteView(testContainerView, 0, -targetScrollXPix, // these need to be negative as we're scrolling down. @@ -437,8 +437,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { for (int i = 1; i <= dragSteps; ++i) { onScrollToCallbackHelper.waitForCallback(scrollToCallCount, i); - if (checkScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix)) - break; + if (checkScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix)) break; } assertScrollOnMainSync(testContainerView, maxScrollXPix, maxScrollYPix); @@ -451,7 +450,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testNoSpuriousOverScrolls() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final int dragSteps = 1; @@ -462,7 +461,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); CountDownLatch scrollingCompleteLatch = new CountDownLatch(1); AwTestTouchUtils.dragCompleteView(testContainerView, @@ -483,9 +482,9 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testOverScrollX() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); final OverScrollByCallbackHelper overScrollByCallbackHelper = - testContainerView.getOverScrollByCallbackHelper(); + testContainerView.getOverScrollByCallbackHelper(); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final int overScrollDeltaX = 30; @@ -516,9 +515,9 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testOverScrollY() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); final OverScrollByCallbackHelper overScrollByCallbackHelper = - testContainerView.getOverScrollByCallbackHelper(); + testContainerView.getOverScrollByCallbackHelper(); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final int overScrollDeltaY = 30; @@ -546,35 +545,35 @@ public class AndroidScrollIntegrationTest extends AwTestBase { // results in the view also reporting as being scrolled to the bottom. final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final int targetScrollXCss = 1000; final int targetScrollYCss = 10000; final String pageHeaders = - " " + - " "; + " " + + " "; loadDataSync(testContainerView.getAwContents(), contentsClient.getOnPageFinishedHelper(), CommonResources.makeHtmlPageFrom(pageHeaders, TEST_PAGE_COMMON_CONTENT), "text/html", false); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); executeJavaScriptAndWaitForResult(testContainerView.getAwContents(), contentsClient, "window.scrollTo(" + targetScrollXCss + "," + targetScrollYCss + ")"); @@ -620,7 +619,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testFlingScroll() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); @@ -628,7 +627,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { assertScrollOnMainSync(testContainerView, 0, 0); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); getInstrumentation().runOnMainSync(new Runnable() { @@ -654,7 +653,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testPageDown() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, ""); @@ -670,7 +669,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { }); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); getInstrumentation().runOnMainSync(new Runnable() { @@ -683,8 +682,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { // Wait for the animation to hit the bottom of the page. for (int i = 1;; ++i) { onScrollToCallbackHelper.waitForCallback(scrollToCallCount, i); - if (checkScrollOnMainSync(testContainerView, 0, maxScrollYPix)) - break; + if (checkScrollOnMainSync(testContainerView, 0, maxScrollYPix)) break; } } @@ -693,11 +691,11 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testPageUp() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); enableJavaScriptOnUiThread(testContainerView.getAwContents()); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int targetScrollYCss = 243; final int targetScrollYPix = (int) Math.ceil(targetScrollYCss * deviceDIPScale); @@ -708,7 +706,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { scrollToOnMainSync(testContainerView, 0, targetScrollYPix); final CallbackHelper onScrollToCallbackHelper = - testContainerView.getOnScrollToCallbackHelper(); + testContainerView.getOnScrollToCallbackHelper(); final int scrollToCallCount = onScrollToCallbackHelper.getCallCount(); getInstrumentation().runOnMainSync(new Runnable() { @@ -721,8 +719,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { // Wait for the animation to hit the bottom of the page. for (int i = 1;; ++i) { onScrollToCallbackHelper.waitForCallback(scrollToCallCount, i); - if (checkScrollOnMainSync(testContainerView, 0, 0)) - break; + if (checkScrollOnMainSync(testContainerView, 0, 0)) break; } } @@ -765,7 +762,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testTouchScrollingConsumesScrollByGesture() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); final TestGestureStateListener testGestureStateListener = new TestGestureStateListener(); enableJavaScriptOnUiThread(testContainerView.getAwContents()); @@ -789,7 +786,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase { } }); final CallbackHelper onScrollUpdateGestureConsumedHelper = - testGestureStateListener.getOnScrollUpdateGestureConsumedHelper(); + testGestureStateListener.getOnScrollUpdateGestureConsumedHelper(); final int callCount = onScrollUpdateGestureConsumedHelper.getCallCount(); AwTestTouchUtils.dragCompleteView(testContainerView, @@ -805,9 +802,9 @@ public class AndroidScrollIntegrationTest extends AwTestBase { public void testPinchZoomUpdatesScrollRangeSynchronously() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final ScrollTestContainerView testContainerView = - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); + (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient); final OverScrollByCallbackHelper overScrollByCallbackHelper = - testContainerView.getOverScrollByCallbackHelper(); + testContainerView.getOverScrollByCallbackHelper(); final AwContents awContents = testContainerView.getAwContents(); enableJavaScriptOnUiThread(awContents); @@ -819,18 +816,18 @@ public class AndroidScrollIntegrationTest extends AwTestBase { assertTrue(awContents.canZoomIn()); int oldScrollRange = - awContents.computeVerticalScrollRange() - testContainerView.getHeight(); + awContents.computeVerticalScrollRange() - testContainerView.getHeight(); float oldScale = awContents.getScale(); int oldContentHeightApproximation = - (int) Math.ceil(awContents.computeVerticalScrollRange() / oldScale); + (int) Math.ceil(awContents.computeVerticalScrollRange() / oldScale); awContents.zoomIn(); int newScrollRange = - awContents.computeVerticalScrollRange() - testContainerView.getHeight(); + awContents.computeVerticalScrollRange() - testContainerView.getHeight(); float newScale = awContents.getScale(); int newContentHeightApproximation = - (int) Math.ceil(awContents.computeVerticalScrollRange() / newScale); + (int) Math.ceil(awContents.computeVerticalScrollRange() / newScale); assertTrue(String.format(Locale.ENGLISH, "Scale range should increase after zoom (%f) > (%f)", diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java index 84278da..2930d39 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java @@ -47,22 +47,24 @@ public class AndroidViewIntegrationTest extends AwTestBase { } private OnContentSizeChangedHelper mOnContentSizeChangedHelper = - new OnContentSizeChangedHelper(); + new OnContentSizeChangedHelper(); private CallbackHelper mOnPageScaleChangedHelper = new CallbackHelper(); private class TestAwLayoutSizer extends AwLayoutSizer { @Override public void onContentSizeChanged(int widthCss, int heightCss) { super.onContentSizeChanged(widthCss, heightCss); - if (mOnContentSizeChangedHelper != null) + if (mOnContentSizeChangedHelper != null) { mOnContentSizeChangedHelper.onContentSizeChanged(widthCss, heightCss); + } } @Override public void onPageScaleChanged(float pageScaleFactor) { super.onPageScaleChanged(pageScaleFactor); - if (mOnPageScaleChangedHelper != null) + if (mOnPageScaleChangedHelper != null) { mOnPageScaleChangedHelper.notifyCalled(); + } } } @@ -77,7 +79,7 @@ public class AndroidViewIntegrationTest extends AwTestBase { } final LinearLayout.LayoutParams mWrapContentLayoutParams = - new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); + new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); private AwTestContainerView createCustomTestContainerViewOnMainSync( final AwContentsClient awContentsClient, final int visibility) throws Exception { @@ -191,7 +193,7 @@ public class AndroidViewIntegrationTest extends AwTestBase { public void testDisconnectedViewLoadsContent() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createDetachedTestContainerViewOnMainSync(contentsClient); + createDetachedTestContainerViewOnMainSync(contentsClient); assertZeroHeight(testContainerView); final int contentSizeChangeCallCount = mOnContentSizeChangedHelper.getCallCount(); @@ -204,8 +206,7 @@ public class AndroidViewIntegrationTest extends AwTestBase { private String makeHtmlPageOfSize(int widthCss, int heightCss, boolean heightPercent) { String content = "
a
"; - if (heightPercent) - content += "
"; + if (heightPercent) content += "
"; return CommonResources.makeHtmlPageFrom( "", "
a
"); + "", "
a
"); final int contentSizeChangeCallCount = mOnContentSizeChangedHelper.getCallCount(); loadDataAsync(testContainerView.getAwContents(), htmlData, "text/html", false); @@ -308,7 +309,7 @@ public class AndroidViewIntegrationTest extends AwTestBase { assertZeroHeight(testContainerView); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int contentWidthCss = 142; final int contentHeightCss = 180; @@ -316,7 +317,7 @@ public class AndroidViewIntegrationTest extends AwTestBase { // In wrap-content mode the AwLayoutSizer will size the view to be as wide as the parent // view. final int expectedWidthCss = - (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale); + (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale); final int expectedHeightCss = contentHeightCss; loadPageOfSizeAndWaitForSizeChange(testContainerView.getAwContents(), @@ -336,13 +337,13 @@ public class AndroidViewIntegrationTest extends AwTestBase { assertZeroHeight(testContainerView); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int contentWidthCss = 142; final int contentHeightCss = 180; final int expectedWidthCss = - (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale); + (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale); final int expectedHeightCss = contentHeightCss; loadPageOfSizeAndWaitForSizeChange(testContainerView.getAwContents(), @@ -362,15 +363,15 @@ public class AndroidViewIntegrationTest extends AwTestBase { final AwContents awContents = testContainerView.getAwContents(); final double deviceDIPScale = - DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); + DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale(); final int physicalWidth = 600; final int spanWidth = 42; final int expectedWidthCss = - (int) Math.ceil(physicalWidth / deviceDIPScale); + (int) Math.ceil(physicalWidth / deviceDIPScale); StringBuilder htmlBuilder = new StringBuilder(""); final String spanBlock = - "a"; + "a"; for (int i = 0; i < 10; ++i) { htmlBuilder.append(spanBlock); } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java index 2fac919..7385b36 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientAutoLoginTest.java @@ -27,7 +27,7 @@ public class AwContentsClientAutoLoginTest extends AwTestBase { AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient); AwContents awContents = testView.getAwContents(); final OnReceivedLoginRequestHelper loginRequestHelper = - mContentsClient.getOnReceivedLoginRequestHelper(); + mContentsClient.getOnReceivedLoginRequestHelper(); final String path = "/" + testName + ".html"; final String html = testName; diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java index 8b5cab3..570afd8 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientCallbackHelperTest.java @@ -133,7 +133,7 @@ public class AwContentsClientCallbackHelperTest extends AwTestBase { @SmallTest public void testOnNewPicture() throws Exception { final PictureListenerHelper pictureListenerHelper = - mContentsClient.getPictureListenerHelper(); + mContentsClient.getPictureListenerHelper(); final Picture thePicture = new Picture(); @@ -183,7 +183,7 @@ public class AwContentsClientCallbackHelperTest extends AwTestBase { @SmallTest public void testOnReceivedLoginRequest() throws Exception { OnReceivedLoginRequestHelper receivedLoginRequestHelper = - mContentsClient.getOnReceivedLoginRequestHelper(); + mContentsClient.getOnReceivedLoginRequestHelper(); int onReceivedLoginRequestCount = receivedLoginRequestHelper.getCallCount(); mClientHelper.postOnReceivedLoginRequest(REALM, ACCOUNT, ARGS); @@ -197,7 +197,7 @@ public class AwContentsClientCallbackHelperTest extends AwTestBase { @SmallTest public void testOnReceivedError() throws Exception { OnReceivedErrorHelper receivedErrorHelper = - mContentsClient.getOnReceivedErrorHelper(); + mContentsClient.getOnReceivedErrorHelper(); int onReceivedErrorCount = receivedErrorHelper.getCallCount(); mClientHelper.postOnReceivedError(ERROR_CODE, ERROR_MESSAGE, TEST_URL); @@ -211,7 +211,7 @@ public class AwContentsClientCallbackHelperTest extends AwTestBase { @SmallTest public void testOnScaleChangedScaled() throws Exception { TestAwContentsClient.OnScaleChangedHelper scaleChangedHelper = - mContentsClient.getOnScaleChangedHelper(); + mContentsClient.getOnScaleChangedHelper(); int onScaleChangeCount = scaleChangedHelper.getCallCount(); mClientHelper.postOnScaleChangedScaled(OLD_SCALE, NEW_SCALE); diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java index f70e7a9..ff3d0fc 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFaviconTest.java @@ -111,9 +111,9 @@ public class AwContentsClientFaviconTest extends AwTestBase { int callCount = mContentsClient.mFaviconHelper.getCallCount(); final String faviconUrl = mWebServer.setResponseBase64(FAVICON1_URL, - CommonResources.FAVICON_DATA_BASE64, CommonResources.getImagePngHeaders(true)); + CommonResources.FAVICON_DATA_BASE64, CommonResources.getImagePngHeaders(true)); final String pageUrl = mWebServer.setResponse(FAVICON1_PAGE_URL, FAVICON1_PAGE_HTML, - CommonResources.getTextHtmlHeaders(true)); + CommonResources.getTextHtmlHeaders(true)); loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), pageUrl); @@ -138,7 +138,7 @@ public class AwContentsClientFaviconTest extends AwTestBase { mWebServer.setResponseWithNotFoundStatus(FAVICON1_URL); final String pageUrl = mWebServer.setResponse(FAVICON1_PAGE_URL, FAVICON1_PAGE_HTML, - CommonResources.getTextHtmlHeaders(true)); + CommonResources.getTextHtmlHeaders(true)); loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), pageUrl); poll(new Callable() { @@ -161,7 +161,7 @@ public class AwContentsClientFaviconTest extends AwTestBase { int callCount = mContentsClient.mFaviconHelper.getCallCount(); final String pageUrl = mWebServer.setResponse(TOUCHICON_REL_URL, TOUCHICON_REL_PAGE_HTML, - CommonResources.getTextHtmlHeaders(true)); + CommonResources.getTextHtmlHeaders(true)); loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), pageUrl); diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java index 47cb465..4606961 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java @@ -43,10 +43,10 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { public static class ShouldInterceptRequestHelper extends CallbackHelper { private List mShouldInterceptRequestUrls = new ArrayList(); - private ConcurrentHashMap mReturnValuesByUrls - = new ConcurrentHashMap(); - private ConcurrentHashMap mParamsByUrls - = new ConcurrentHashMap(); + private ConcurrentHashMap mReturnValuesByUrls = + new ConcurrentHashMap(); + private ConcurrentHashMap mParamsByUrls = + new ConcurrentHashMap(); // This is read from the IO thread, so needs to be marked volatile. private volatile AwWebResourceResponse mShouldInterceptRequestReturnValue = null; void setReturnValue(AwWebResourceResponse value) { @@ -93,7 +93,7 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { @Override public AwWebResourceResponse shouldInterceptRequest(ShouldInterceptRequestParams params) { AwWebResourceResponse returnValue = - mShouldInterceptRequestHelper.getReturnValue(params.url); + mShouldInterceptRequestHelper.getReturnValue(params.url); mShouldInterceptRequestHelper.notifyCalled(params); return returnValue; } @@ -286,7 +286,7 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { mShouldInterceptRequestHelper.waitForCallback(callCount, 2); Map headers = - mShouldInterceptRequestHelper.getParamsForUrl(syncGetUrl).requestHeaders; + mShouldInterceptRequestHelper.getParamsForUrl(syncGetUrl).requestHeaders; assertTrue(headers.containsKey(headerName)); assertEquals(headerValue, headers.get(headerName)); } @@ -296,7 +296,7 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { public void testOnLoadResourceCalledWithCorrectUrl() throws Throwable { final String aboutPageUrl = addAboutPageToTestServer(mWebServer); final TestAwContentsClient.OnLoadResourceHelper onLoadResourceHelper = - mContentsClient.getOnLoadResourceHelper(); + mContentsClient.getOnLoadResourceHelper(); int callCount = onLoadResourceHelper.getCallCount(); @@ -453,8 +453,8 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { final String aboutPageData = makePageWithTitle("some title"); final String encoding = "UTF-8"; final SlowAwWebResourceResponse slowAwWebResourceResponse = - new SlowAwWebResourceResponse("text/html", encoding, - new ByteArrayInputStream(aboutPageData.getBytes(encoding))); + new SlowAwWebResourceResponse("text/html", encoding, + new ByteArrayInputStream(aboutPageData.getBytes(encoding))); mShouldInterceptRequestHelper.setReturnValue(slowAwWebResourceResponse); int callCount = slowAwWebResourceResponse.getReadStartedCallbackHelper().getCallCount(); @@ -487,14 +487,14 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { public void testHttpStatusCodeAndText() throws Throwable { final String syncGetUrl = mWebServer.getResponseUrl("/intercept_me"); final String syncGetJs = - "(function() {" + - " var xhr = new XMLHttpRequest();" + - " xhr.open('GET', '" + syncGetUrl + "', false);" + - " xhr.send(null);" + - " console.info('xhr.status = ' + xhr.status);" + - " console.info('xhr.statusText = ' + xhr.statusText);" + - " return '[' + xhr.status + '][' + xhr.statusText + ']';" + - "})();"; + "(function() {" + + " var xhr = new XMLHttpRequest();" + + " xhr.open('GET', '" + syncGetUrl + "', false);" + + " xhr.send(null);" + + " console.info('xhr.status = ' + xhr.status);" + + " console.info('xhr.statusText = ' + xhr.statusText);" + + " return '[' + xhr.status + '][' + xhr.statusText + ']';" + + "})();"; enableJavaScriptOnUiThread(mAwContents); final String aboutPageUrl = addAboutPageToTestServer(mWebServer); @@ -512,7 +512,7 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { mShouldInterceptRequestHelper.setReturnValue( new AwWebResourceResponse("text/html", "UTF-8", new EmptyInputStream(), - TEAPOT_STATUS_CODE, TEAPOT_RESPONSE_PHRASE, new HashMap())); + TEAPOT_STATUS_CODE, TEAPOT_RESPONSE_PHRASE, new HashMap())); assertEquals("\"[" + TEAPOT_STATUS_CODE + "][" + TEAPOT_RESPONSE_PHRASE + "]\"", executeJavaScriptAndWaitForResult(mAwContents, mContentsClient, syncGetJs)); } @@ -520,13 +520,13 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { private String getHeaderValue(AwContents awContents, TestAwContentsClient contentsClient, String url, String headerName) throws Exception { final String syncGetJs = - "(function() {" + - " var xhr = new XMLHttpRequest();" + - " xhr.open('GET', '" + url + "', false);" + - " xhr.send(null);" + - " console.info(xhr.getAllResponseHeaders());" + - " return xhr.getResponseHeader('" + headerName + "');" + - "})();"; + "(function() {" + + " var xhr = new XMLHttpRequest();" + + " xhr.open('GET', '" + url + "', false);" + + " xhr.send(null);" + + " console.info(xhr.getAllResponseHeaders());" + + " return xhr.getResponseHeader('" + headerName + "');" + + "})();"; String header = executeJavaScriptAndWaitForResult(awContents, contentsClient, syncGetJs); if (header.equals("null")) @@ -636,7 +636,7 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { @Feature({"AndroidWebView"}) public void testNullInputStreamCausesErrorForMainFrame() throws Throwable { final OnReceivedErrorHelper onReceivedErrorHelper = - mContentsClient.getOnReceivedErrorHelper(); + mContentsClient.getOnReceivedErrorHelper(); mShouldInterceptRequestHelper.setReturnValue( new AwWebResourceResponse("text/html", "UTF-8", null)); @@ -655,8 +655,8 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase { mWebServer.setResponseBase64(imagePath, CommonResources.FAVICON_DATA_BASE64, CommonResources.getImagePngHeaders(true)); final String pageWithImage = - addPageToTestServer(mWebServer, "/page_with_image.html", - CommonResources.getOnImageLoadedHtml(CommonResources.FAVICON_FILENAME)); + addPageToTestServer(mWebServer, "/page_with_image.html", + CommonResources.getOnImageLoadedHtml(CommonResources.FAVICON_FILENAME)); int callCount = mShouldInterceptRequestHelper.getCallCount(); loadUrlSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), pageWithImage); diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java index 97331c1..1284fba 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java @@ -118,10 +118,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testNotCalledOnLoadUrl() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); loadDataSync(awContents, contentsClient.getOnPageFinishedHelper(), CommonResources.makeHtmlPageWithSimpleLinkTo(DATA_URL), "text/html", false); @@ -144,10 +144,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testNotCalledOnBackForwardNavigation() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); final String[] pageTitles = new String[] { "page1", "page2", "page3" }; for (String title : pageTitles) { @@ -159,38 +159,38 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { waitForNavigationRunnableAndAssertTitleChanged(awContents, contentsClient.getOnPageFinishedHelper(), new Runnable() { - @Override - public void run() { - awContents.goBack(); - } - }); + @Override + public void run() { + awContents.goBack(); + } + }); assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); waitForNavigationRunnableAndAssertTitleChanged(awContents, contentsClient.getOnPageFinishedHelper(), new Runnable() { - @Override - public void run() { - awContents.goForward(); - } - }); + @Override + public void run() { + awContents.goForward(); + } + }); assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); waitForNavigationRunnableAndAssertTitleChanged(awContents, contentsClient.getOnPageFinishedHelper(), new Runnable() { - @Override - public void run() { - awContents.goBackOrForward(-2); - } - }); + @Override + public void run() { + awContents.goBackOrForward(-2); + } + }); assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); waitForNavigationRunnableAndAssertTitleChanged(awContents, contentsClient.getOnPageFinishedHelper(), new Runnable() { - @Override - public void run() { - awContents.goBackOrForward(1); - } - }); + @Override + public void run() { + awContents.goBackOrForward(1); + } + }); assertEquals(0, shouldOverrideUrlLoadingHelper.getCallCount()); } @@ -199,10 +199,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCantBlockLoads() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); setShouldOverrideUrlLoadingReturnValueOnUiThread(shouldOverrideUrlLoadingHelper, true); @@ -218,10 +218,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCalledBeforeOnPageStarted() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); OnPageStartedHelper onPageStartedHelper = contentsClient.getOnPageStartedHelper(); loadDataSync(awContents, contentsClient.getOnPageFinishedHelper(), @@ -242,10 +242,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testDoesNotCauseOnReceivedError() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); OnReceivedErrorHelper onReceivedErrorHelper = contentsClient.getOnReceivedErrorHelper(); final int onReceivedErrorCallCount = onReceivedErrorHelper.getCallCount(); @@ -284,10 +284,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { private void doTestNotCalledForAnchorNavigations(boolean useLoadData) throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); final String anchorLinkPath = "/anchor_link.html"; final String anchorLinkUrl = mWebServer.getResponseUrl(anchorLinkPath); @@ -302,7 +302,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { } final int shouldOverrideUrlLoadingCallCount = - shouldOverrideUrlLoadingHelper.getCallCount(); + shouldOverrideUrlLoadingHelper.getCallCount(); clickOnLinkUsingJs(awContents, contentsClient); @@ -319,7 +319,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCalledWhenLinkClicked() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -340,7 +340,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCalledWhenTopLevelAboutBlankNavigation() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -367,7 +367,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCalledWhenSelfLinkClicked() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -395,7 +395,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); enableJavaScriptOnUiThread(awContents); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = @@ -418,7 +418,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); enableJavaScriptOnUiThread(awContents); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = @@ -438,7 +438,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testPassesCorrectUrl() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -460,7 +460,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCanIgnoreLoading() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -505,7 +505,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { "L2hlYWQ+PC9odG1sPg=="; final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -527,7 +527,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testCalledForUnsupportedSchemes() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = contentsClient.getShouldOverrideUrlLoadingHelper(); @@ -550,10 +550,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { // The reason POST requests are excluded is BUG 155250. final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); final String redirectTargetUrl = createRedirectTargetPage(mWebServer); final String postLinkUrl = addPageToTestServer(mWebServer, "/page_with_post_link.html", @@ -562,7 +562,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), postLinkUrl); final int shouldOverrideUrlLoadingCallCount = - shouldOverrideUrlLoadingHelper.getCallCount(); + shouldOverrideUrlLoadingHelper.getCallCount(); assertEquals(0, mWebServer.getRequestCount(REDIRECT_TARGET_PATH)); clickOnLinkUsingJs(awContents, contentsClient); @@ -588,10 +588,10 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { // The reason POST requests are excluded is BUG 155250. final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); final String redirectTargetUrl = createRedirectTargetPage(mWebServer); final String postToGetRedirectUrl = mWebServer.setRedirect("/302.html", redirectTargetUrl); @@ -601,7 +601,7 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { loadUrlSync(awContents, contentsClient.getOnPageFinishedHelper(), postLinkUrl); final int shouldOverrideUrlLoadingCallCount = - shouldOverrideUrlLoadingHelper.getCallCount(); + shouldOverrideUrlLoadingHelper.getCallCount(); clickOnLinkUsingJs(awContents, contentsClient); @@ -624,20 +624,20 @@ public class AwContentsClientShouldOverrideUrlLoadingTest extends AwTestBase { public void testNotCalledForIframeHttpNavigations() throws Throwable { final TestAwContentsClient contentsClient = new TestAwContentsClient(); final AwTestContainerView testContainerView = - createAwTestContainerViewOnMainSync(contentsClient); + createAwTestContainerViewOnMainSync(contentsClient); final AwContents awContents = testContainerView.getAwContents(); final TestAwContentsClient.ShouldOverrideUrlLoadingHelper shouldOverrideUrlLoadingHelper = - contentsClient.getShouldOverrideUrlLoadingHelper(); + contentsClient.getShouldOverrideUrlLoadingHelper(); final String iframeRedirectTargetUrl = createRedirectTargetPage(mWebServer); final String iframeRedirectUrl = - mWebServer.setRedirect("/302.html", iframeRedirectTargetUrl); + mWebServer.setRedirect("/302.html", iframeRedirectTargetUrl); final String pageWithIframeUrl = - addPageToTestServer(mWebServer, "/iframe_intercept.html", - makeHtmlPageFrom("", "