Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AndroidViewIntegrationTest.java

Issue 663573002: Fix Java indentation issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 84278da95cafb4504db06acc25ebe25721547e5c..2930d39a91b3d146a42ae87dc703876fd459d6ea 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
@@ -47,22 +47,24 @@ public class AndroidViewIntegrationTest extends AwTestBase {
}
private OnContentSizeChangedHelper mOnContentSizeChangedHelper =
- new OnContentSizeChangedHelper();
+ new OnContentSizeChangedHelper();
private CallbackHelper mOnPageScaleChangedHelper = new CallbackHelper();
private class TestAwLayoutSizer extends AwLayoutSizer {
@Override
public void onContentSizeChanged(int widthCss, int heightCss) {
super.onContentSizeChanged(widthCss, heightCss);
- if (mOnContentSizeChangedHelper != null)
+ if (mOnContentSizeChangedHelper != null) {
mOnContentSizeChangedHelper.onContentSizeChanged(widthCss, heightCss);
+ }
}
@Override
public void onPageScaleChanged(float pageScaleFactor) {
super.onPageScaleChanged(pageScaleFactor);
- if (mOnPageScaleChangedHelper != null)
+ if (mOnPageScaleChangedHelper != null) {
mOnPageScaleChangedHelper.notifyCalled();
+ }
}
}
@@ -77,7 +79,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
}
final LinearLayout.LayoutParams mWrapContentLayoutParams =
- new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+ new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
private AwTestContainerView createCustomTestContainerViewOnMainSync(
final AwContentsClient awContentsClient, final int visibility) throws Exception {
@@ -191,7 +193,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
public void testDisconnectedViewLoadsContent() throws Throwable {
final TestAwContentsClient contentsClient = new TestAwContentsClient();
final AwTestContainerView testContainerView =
- createDetachedTestContainerViewOnMainSync(contentsClient);
+ createDetachedTestContainerViewOnMainSync(contentsClient);
assertZeroHeight(testContainerView);
final int contentSizeChangeCallCount = mOnContentSizeChangedHelper.getCallCount();
@@ -204,8 +206,7 @@ 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>";
+ if (heightPercent) content += "<div class=\"heightPercent\"></div>";
return CommonResources.makeHtmlPageFrom(
"<style type=\"text/css\">" +
"body { margin:0px; padding:0px; } " +
@@ -282,15 +283,15 @@ public class AndroidViewIntegrationTest extends AwTestBase {
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>");
+ "<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);
@@ -308,7 +309,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
assertZeroHeight(testContainerView);
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
final int contentWidthCss = 142;
final int contentHeightCss = 180;
@@ -316,7 +317,7 @@ public class AndroidViewIntegrationTest extends AwTestBase {
// In wrap-content mode the AwLayoutSizer will size the view to be as wide as the parent
// view.
final int expectedWidthCss =
- (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale);
+ (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale);
final int expectedHeightCss = contentHeightCss;
loadPageOfSizeAndWaitForSizeChange(testContainerView.getAwContents(),
@@ -336,13 +337,13 @@ public class AndroidViewIntegrationTest extends AwTestBase {
assertZeroHeight(testContainerView);
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
final int contentWidthCss = 142;
final int contentHeightCss = 180;
final int expectedWidthCss =
- (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale);
+ (int) Math.ceil(getRootLayoutWidthOnMainThread() / deviceDIPScale);
final int expectedHeightCss = contentHeightCss;
loadPageOfSizeAndWaitForSizeChange(testContainerView.getAwContents(),
@@ -362,15 +363,15 @@ public class AndroidViewIntegrationTest extends AwTestBase {
final AwContents awContents = testContainerView.getAwContents();
final double deviceDIPScale =
- DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
+ DeviceDisplayInfo.create(testContainerView.getContext()).getDIPScale();
final int physicalWidth = 600;
final int spanWidth = 42;
final int expectedWidthCss =
- (int) Math.ceil(physicalWidth / deviceDIPScale);
+ (int) Math.ceil(physicalWidth / deviceDIPScale);
StringBuilder htmlBuilder = new StringBuilder("<html><body style='margin:0px;'>");
final String spanBlock =
- "<span style='width: " + spanWidth + "px; display: inline-block;'>a</span>";
+ "<span style='width: " + spanWidth + "px; display: inline-block;'>a</span>";
for (int i = 0; i < 10; ++i) {
htmlBuilder.append(spanBlock);
}

Powered by Google App Engine
This is Rietveld 408576698