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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java

Issue 1056913008: Carry over a user gesture bit for all the non-main frame request types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Carry over user gesture bit for all non-main frame request types Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java
index 7d77bec4e28b574337e325091824046d368bf7e5..7980c4d26322ae0605274c1883e9296e724b4d3a 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/InterceptNavigationDelegateTest.java
@@ -34,6 +34,8 @@ public class InterceptNavigationDelegateTest extends ChromeShellTestBase {
BASE_URL + "navigation_from_xhr_callback_and_short_timeout.html";
private static final String NAVIGATION_FROM_XHR_CALLBACK_AND_LONG_TIMEOUT_PAGE =
BASE_URL + "navigation_from_xhr_callback_and_long_timeout.html";
+ private static final String NAVIGATION_FROM_IMAGE_ONLOAD_PAGE =
+ BASE_URL + "navigation_from_image_onload.html";
private static final long DEFAULT_MAX_TIME_TO_WAIT_IN_MS = 3000;
private static final long LONG_MAX_TIME_TO_WAIT_IN_MS = 20000;
@@ -136,4 +138,15 @@ public class InterceptNavigationDelegateTest extends ChromeShellTestBase {
assertEquals(false, mHistory.get(1).hasUserGesture);
assertEquals(false, mHistory.get(1).hasUserGestureCarryover);
}
+
+ @SmallTest
+ public void testNavigationFromImageOnLoad() throws InterruptedException {
+ loadUrlWithSanitization(TestHttpServerClient.getUrl(NAVIGATION_FROM_IMAGE_ONLOAD_PAGE));
+ assertEquals(1, mHistory.size());
+
+ TouchCommon.singleClickView(mActivity.getActiveTab().getView(), 25, 25);
+ waitTillExpectedCallsComplete(2, DEFAULT_MAX_TIME_TO_WAIT_IN_MS);
+ assertEquals(false, mHistory.get(1).hasUserGesture);
+ assertEquals(true, mHistory.get(1).hasUserGestureCarryover);
+ }
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698