Index: android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java |
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java |
index ed6ca7182f7d40d918fb2ac9c65a145a6b3c0eae..af1ed2a76d48ec6742da5d944635345628d72197 100644 |
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java |
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java |
@@ -1350,15 +1350,20 @@ public class AwSettingsTest extends AwTestBase { |
} |
private String getData() { |
+ // Add a sequence number as a comment to ensure WebView does not do |
+ // something special for the same page load, for instance, restoring |
+ // user state like a scroll position. |
return "<html><head>" |
+ (mWithViewPortTag ? "<meta name='viewport' content='width=3000' />" : "") |
- + "</head>" |
- + "<body></body></html>"; |
+ + "</head><body><!-- " |
+ + mDataSequence++ |
+ + " --></body></html>"; |
Torne
2016/08/30 12:04:55
Could you explain why this is necessary? I don't e
Takashi Toyoshima
2016/08/31 06:31:18
Yes, my change intended to update the data URL for
|
} |
private final boolean mWithViewPortTag; |
private boolean mExpectScaleChange; |
private int mOnScaleChangedCallCount; |
+ private int mDataSequence; |
} |
class AwSettingsForceZeroLayoutHeightTestHelper extends AwSettingsTestHelper<Boolean> { |
@@ -2653,6 +2658,9 @@ public class AwSettingsTest extends AwTestBase { |
views.getContainer1(), views.getClient1())); |
} |
+ // Note: Following two tests that verify overview mode may fail on recent |
+ // Android versions. If these test fail on your device, please try running |
+ // on KitKat. It will work on SDK's emulator for both ARM and x86, too. |
bokan
2016/08/29 13:13:36
Why does the Android version have an effect here?
Takashi Toyoshima
2016/08/30 05:34:24
I actually quite not sure why this can not run on
Torne
2016/08/30 12:04:55
This comment is liable to be outdated and generall
Takashi Toyoshima
2016/08/31 06:31:18
Agreed. Filing a bug sounds a right solution here.
|
@SmallTest |
@Feature({"AndroidWebView", "Preferences"}) |
public void testLoadWithOverviewModeWithTwoViews() throws Throwable { |