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). |