| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |