OLD | NEW |
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 org.chromium.android_webview.AwContents; | 7 import org.chromium.android_webview.AwContents; |
8 import org.chromium.android_webview.test.util.CommonResources; | 8 import org.chromium.android_webview.test.util.CommonResources; |
9 import org.chromium.base.test.util.DisabledTest; | 9 import org.chromium.base.test.util.DisabledTest; |
10 import org.chromium.content.browser.ContentViewCore; | 10 import org.chromium.content_public.browser.ContentViewCore; |
11 | 11 |
12 /** | 12 /** |
13 * Tests for the WebViewClient.onScaleChanged. | 13 * Tests for the WebViewClient.onScaleChanged. |
14 */ | 14 */ |
15 public class AwContentsClientOnScaleChangedTest extends AwTestBase { | 15 public class AwContentsClientOnScaleChangedTest extends AwTestBase { |
16 private TestAwContentsClient mContentsClient; | 16 private TestAwContentsClient mContentsClient; |
17 private AwContents mAwContents; | 17 private AwContents mAwContents; |
18 | 18 |
19 @Override | 19 @Override |
20 protected void setUp() throws Exception { | 20 protected void setUp() throws Exception { |
(...skipping 22 matching lines...) Expand all Loading... |
43 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount()
; | 43 int callCount = mContentsClient.getOnScaleChangedHelper().getCallCount()
; |
44 core.onSizeChanged( | 44 core.onSizeChanged( |
45 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2, | 45 core.getViewportWidthPix() / 2, core.getViewportHeightPix() / 2, |
46 core.getViewportWidthPix(), core.getViewportHeightPix()); | 46 core.getViewportWidthPix(), core.getViewportHeightPix()); |
47 // TODO: Investigate on using core.zoomIn(); | 47 // TODO: Investigate on using core.zoomIn(); |
48 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount); | 48 mContentsClient.getOnScaleChangedHelper().waitForCallback(callCount); |
49 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge
tLastScaleRatio(), | 49 assertTrue("Scale ratio:" + mContentsClient.getOnScaleChangedHelper().ge
tLastScaleRatio(), |
50 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() <
1); | 50 mContentsClient.getOnScaleChangedHelper().getLastScaleRatio() <
1); |
51 } | 51 } |
52 } | 52 } |
OLD | NEW |