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

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

Issue 14271024: [Android WebView] Move the most of WebSettings into AwSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated findbugs issues Created 7 years, 8 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.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 8
9 import org.chromium.android_webview.AwContents; 9 import org.chromium.android_webview.AwContents;
10 import org.chromium.base.test.util.DisabledTest; 10 import org.chromium.base.test.util.DisabledTest;
(...skipping 23 matching lines...) Expand all
34 protected void tearDown() throws Exception { 34 protected void tearDown() throws Exception {
35 super.tearDown(); 35 super.tearDown();
36 } 36 }
37 37
38 /* 38 /*
39 @SmallTest 39 @SmallTest
40 This test is timing out on ICS bots including cq. See crbug.com/175854. 40 This test is timing out on ICS bots including cq. See crbug.com/175854.
41 */ 41 */
42 @DisabledTest 42 @DisabledTest
43 public void testScaleUp() throws Throwable { 43 public void testScaleUp() throws Throwable {
44 getContentSettingsOnUiThread(mAwContents).setUseWideViewPort(true); 44 getAwSettingsOnUiThread(mAwContents).setUseWideViewPort(true);
45 loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(), 45 loadDataSync(mAwContents, mContentsClient.getOnPageFinishedHelper(),
46 CommonResources.ABOUT_HTML, "text/html", false); 46 CommonResources.ABOUT_HTML, "text/html", false);
47 ContentViewCore core = mAwContents.getContentViewCore(); 47 ContentViewCore core = mAwContents.getContentViewCore();
48 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount() ; 48 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount() ;
49 core.onSizeChanged( 49 core.onSizeChanged(
50 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2, 50 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2,
51 core.getViewportWidthPix(), core.getViewportHeightPix()); 51 core.getViewportWidthPix(), core.getViewportHeightPix());
52 // TODO: Investigate on using core.zoomIn(); 52 // TODO: Investigate on using core.zoomIn();
53 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount); 53 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount);
54 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge tLastScaleRatio(), 54 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge tLastScaleRatio(),
55 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() < 1); 55 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() < 1);
56 } 56 }
57 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698