Chromium Code Reviews| 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 2930d39a91b3d146a42ae87dc703876fd459d6ea..debd9b5dd3dd6b3a40c6a62c686cce4df8246705 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 |
| @@ -207,19 +207,18 @@ public class AndroidViewIntegrationTest extends AwTestBase { |
| private String makeHtmlPageOfSize(int widthCss, int heightCss, boolean heightPercent) { |
| String content = "<div class=\"normal\">a</div>"; |
| if (heightPercent) content += "<div class=\"heightPercent\"></div>"; |
| - return CommonResources.makeHtmlPageFrom( |
| - "<style type=\"text/css\">" + |
| - "body { margin:0px; padding:0px; } " + |
| - ".normal { " + |
| - "width:" + widthCss + "px; " + |
| - "height:" + heightCss + "px; " + |
| - "background-color: red; " + |
| - "} " + |
| - ".heightPercent { " + |
| - "height: 150%; " + |
| - "background-color: blue; " + |
| - "} " + |
| - "</style>", content); |
| + return CommonResources.makeHtmlPageFrom("<style type=\"text/css\">" |
| + + "body { margin:0px; padding:0px; } " |
| + + ".normal { " |
|
Ted C
2014/11/20 00:27:32
add leading spaces after the initial [+ "] to make
|
| + + "width:" + widthCss + "px; " |
| + + "height:" + heightCss + "px; " |
| + + "background-color: red; " |
| + + "} " |
| + + ".heightPercent { " |
| + + "height: 150%; " |
| + + "background-color: blue; " |
| + + "} " |
| + + "</style>", content); |
| } |
| private void waitForContentSizeToChangeTo(OnContentSizeChangedHelper helper, int callCount, |
| @@ -227,8 +226,8 @@ public class AndroidViewIntegrationTest extends AwTestBase { |
| final int maxSizeChangeNotificationsToWaitFor = 5; |
| for (int i = 1; i <= maxSizeChangeNotificationsToWaitFor; i++) { |
| helper.waitForCallback(callCount, i); |
| - if ((heightCss == -1 || helper.getHeight() == heightCss) && |
| - (widthCss == -1 || helper.getWidth() == widthCss)) { |
| + if ((heightCss == -1 || helper.getHeight() == heightCss) |
| + && (widthCss == -1 || helper.getWidth() == widthCss)) { |
| break; |
| } |
| // This means that we hit the max number of iterations but the expected contents size |
| @@ -282,16 +281,15 @@ public class AndroidViewIntegrationTest extends AwTestBase { |
| 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 String htmlData = CommonResources.makeHtmlPageFrom("<style type=\"text/css\">" |
| + + " body { margin:0px; padding:0px; } " |
| + + " div { " |
| + + " position: absolute; " |
|
Ted C
2014/11/20 00:27:32
like here :-)
|
| + + " 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); |