| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 import android.view.View; | 8 import android.view.View; |
| 9 import android.view.ViewGroup.LayoutParams; | 9 import android.view.ViewGroup.LayoutParams; |
| 10 import android.widget.LinearLayout; | 10 import android.widget.LinearLayout; |
| 11 | 11 |
| 12 import org.chromium.android_webview.AwContents; | 12 import org.chromium.android_webview.AwContents; |
| 13 import org.chromium.android_webview.AwContentsClient; | 13 import org.chromium.android_webview.AwContentsClient; |
| 14 import org.chromium.android_webview.AwLayoutSizer; | 14 import org.chromium.android_webview.AwLayoutSizer; |
| 15 import org.chromium.android_webview.test.AwTestBaseUtility.TestDependencyFactory
; |
| 15 import org.chromium.android_webview.test.util.CommonResources; | 16 import org.chromium.android_webview.test.util.CommonResources; |
| 16 import org.chromium.android_webview.test.util.GraphicsTestUtils; | 17 import org.chromium.android_webview.test.util.GraphicsTestUtils; |
| 17 import org.chromium.base.test.util.Feature; | 18 import org.chromium.base.test.util.Feature; |
| 18 import org.chromium.content.browser.test.util.CallbackHelper; | 19 import org.chromium.content.browser.test.util.CallbackHelper; |
| 19 import org.chromium.ui.gfx.DeviceDisplayInfo; | 20 import org.chromium.ui.gfx.DeviceDisplayInfo; |
| 20 | 21 |
| 21 import java.util.concurrent.atomic.AtomicReference; | 22 import java.util.concurrent.atomic.AtomicReference; |
| 22 | 23 |
| 23 /** | 24 /** |
| 24 * Tests for certain edge cases related to integrating with the Android view sys
tem. | 25 * Tests for certain edge cases related to integrating with the Android view sys
tem. |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 mOnContentSizeChangedHelper.waitForCallback(contentSizeChangeCallCount); | 424 mOnContentSizeChangedHelper.waitForCallback(contentSizeChangeCallCount); |
| 424 | 425 |
| 425 // As a result of calling the onSizeChanged method the layout size shoul
d be updated to | 426 // As a result of calling the onSizeChanged method the layout size shoul
d be updated to |
| 426 // match the width of the webview and the text we previously loaded shou
ld reflow making the | 427 // match the width of the webview and the text we previously loaded shou
ld reflow making the |
| 427 // contents width match the WebView width. | 428 // contents width match the WebView width. |
| 428 assertEquals(expectedWidthCss, mOnContentSizeChangedHelper.getWidth()); | 429 assertEquals(expectedWidthCss, mOnContentSizeChangedHelper.getWidth()); |
| 429 assertTrue(mOnContentSizeChangedHelper.getHeight() < narrowLayoutHeight)
; | 430 assertTrue(mOnContentSizeChangedHelper.getHeight() < narrowLayoutHeight)
; |
| 430 assertTrue(mOnContentSizeChangedHelper.getHeight() > 0); | 431 assertTrue(mOnContentSizeChangedHelper.getHeight() > 0); |
| 431 } | 432 } |
| 432 } | 433 } |
| OLD | NEW |