| Index: android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
|
| index f4ba4d4e549923194a46785b198eb82c581aa384..1c8de1313b6da958a31eba86e9728179c2a88e6b 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java
|
| @@ -243,7 +243,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
|
|
|
| @SmallTest
|
| @Feature({"AndroidWebView"})
|
| - public void testPreferredSizeUpdateWhenDetached() throws Throwable {
|
| + public void testSizeUpdateWhenDetached() throws Throwable {
|
| final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| final AwTestContainerView testContainerView = createDetachedTestContainerViewOnMainSync(
|
| contentsClient);
|
| @@ -258,6 +258,35 @@ public class AndroidViewIntegrationTest extends AwTestBase {
|
|
|
| @SmallTest
|
| @Feature({"AndroidWebView"})
|
| + public void testAbsolutePositionContributesToContentSize() throws Throwable {
|
| + final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| + final AwTestContainerView testContainerView = createDetachedTestContainerViewOnMainSync(
|
| + contentsClient);
|
| + assertZeroHeight(testContainerView);
|
| +
|
| + final int widthCss = 142;
|
| + final int heightCss = 180;
|
| +
|
| + final String htmlData = CommonResources.makeHtmlPageFrom(
|
| + "<style type=\"text/css\">" +
|
| + "body { margin:0px; padding:0px; } " +
|
| + "div { " +
|
| + "position: absolute; " +
|
| + "width:" + widthCss + "px; " +
|
| + "height:" + heightCss + "px; " +
|
| + "background-color: red; " +
|
| + "} " +
|
| + "</style>", "<div>a</div>");
|
| +
|
| + final int contentSizeChangeCallCount = mOnContentSizeChangedHelper.getCallCount();
|
| + loadDataAsync(testContainerView.getAwContents(), htmlData, "text/html", false);
|
| +
|
| + waitForContentSizeToChangeTo(mOnContentSizeChangedHelper, contentSizeChangeCallCount,
|
| + widthCss, heightCss);
|
| + }
|
| +
|
| + @SmallTest
|
| + @Feature({"AndroidWebView"})
|
| public void testViewSizedCorrectlyInWrapContentMode() throws Throwable {
|
| final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| final AwTestContainerView testContainerView = createCustomTestContainerViewOnMainSync(
|
|
|