| 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.support.test.filters.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.util.CommonResources; | 15 import org.chromium.android_webview.test.util.CommonResources; |
| 16 import org.chromium.android_webview.test.util.GraphicsTestUtils; | 16 import org.chromium.android_webview.test.util.GraphicsTestUtils; |
| 17 import org.chromium.base.test.util.CallbackHelper; | 17 import org.chromium.base.test.util.CallbackHelper; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 mOnContentSizeChangedHelper.waitForCallback(contentSizeChangeCallCount); | 423 mOnContentSizeChangedHelper.waitForCallback(contentSizeChangeCallCount); |
| 424 | 424 |
| 425 // As a result of calling the onSizeChanged method the layout size shoul
d be updated to | 425 // 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 | 426 // match the width of the webview and the text we previously loaded shou
ld reflow making the |
| 427 // contents width match the WebView width. | 427 // contents width match the WebView width. |
| 428 assertEquals(expectedWidthCss, mOnContentSizeChangedHelper.getWidth()); | 428 assertEquals(expectedWidthCss, mOnContentSizeChangedHelper.getWidth()); |
| 429 assertTrue(mOnContentSizeChangedHelper.getHeight() < narrowLayoutHeight)
; | 429 assertTrue(mOnContentSizeChangedHelper.getHeight() < narrowLayoutHeight)
; |
| 430 assertTrue(mOnContentSizeChangedHelper.getHeight() > 0); | 430 assertTrue(mOnContentSizeChangedHelper.getHeight() > 0); |
| 431 } | 431 } |
| 432 } | 432 } |
| OLD | NEW |