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

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

Issue 126453006: aw: Clean up android webview lint suppressions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove .class from suppression Created 6 years, 11 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/AwViewportTest.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwViewportTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwViewportTest.java
index ebac2f8204491b2dded6d68d2da84ab24c1cfdd9..416d34762b18db2ff7b6d4ec1e92706f60e01951 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwViewportTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwViewportTest.java
@@ -14,6 +14,11 @@ import org.chromium.content.browser.test.util.Criteria;
import org.chromium.content.browser.test.util.CriteriaHelper;
import org.chromium.ui.gfx.DeviceDisplayInfo;
+import java.util.Locale;
+
+/**
+ * Tests for usage and quirks of viewport related methods.
+ */
public class AwViewportTest extends AwTestBase {
@MediumTest
@@ -29,9 +34,9 @@ public class AwViewportTest extends AwTestBase {
final String pageTemplate = "<html><head>" +
"<meta name='viewport' content='width=device-width, target-densityDpi=%s' />" +
"</head><body onload='document.title=document.body.clientWidth'></body></html>";
- final String pageDeviceDpi = String.format(pageTemplate, "device-dpi");
- final String pageHighDpi = String.format(pageTemplate, "high-dpi");
- final String pageDpi100 = String.format(pageTemplate, "100");
+ final String pageDeviceDpi = String.format((Locale)null, pageTemplate, "device-dpi");
+ final String pageHighDpi = String.format((Locale)null, pageTemplate, "high-dpi");
+ final String pageDpi100 = String.format((Locale)null, pageTemplate, "100");
settings.setJavaScriptEnabled(true);
@@ -178,7 +183,7 @@ public class AwViewportTest extends AwTestBase {
final int pageWidth = 3000;
final float pageScale = 1.0f;
- final String page = String.format("<html><head>" +
+ final String page = String.format((Locale)null, "<html><head>" +
"<meta name='viewport' content='width=%d' />" +
"<meta name='viewport' content='initial-scale=%.1f' />" +
"<meta name='viewport' content='user-scalable=0' />" +
@@ -209,7 +214,7 @@ public class AwViewportTest extends AwTestBase {
CallbackHelper onPageFinishedHelper = contentClient.getOnPageFinishedHelper();
final int pageWidth = 3000;
- final String page = String.format("<html><head>" +
+ final String page = String.format((Locale)null, "<html><head>" +
"<meta name='viewport' content='width=device-width' />" +
"<meta name='viewport' content='width=%d' />" +
"</head><body onload='document.title=document.body.clientWidth'></body></html>",
@@ -238,8 +243,8 @@ public class AwViewportTest extends AwTestBase {
"</head><body>" +
"<div style='width:10000px;height:200px'>A big div</div>" +
"</body></html>";
- final String pageScale4 = String.format(pageTemplate, 4);
- final String page = String.format(pageTemplate, 1);
+ final String pageScale4 = String.format((Locale)null, pageTemplate, 4);
+ final String page = String.format((Locale)null, pageTemplate, 1);
// Page scale updates are asynchronous. There is an issue that we can't
// reliably check, whether the scale as NOT changed (i.e. remains to be 1.0).

Powered by Google App Engine
This is Rietveld 408576698