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

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

Issue 2348853002: Prevent navigations within fullscreen webapps from being intercepted. (Closed)
Patch Set: Address comments Created 4 years, 3 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 | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java ('k') | no next file » | 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/externalnav/ExternalNavigationHandlerTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
index 3bea81f392f9bc798997b7c9878cafdc97d5b0e2..bcc50938e902953b54ba6bfcb853ee29f13eba90 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
@@ -229,6 +229,14 @@ public class ExternalNavigationHandlerTest extends NativeLibraryTestBase {
}
@SmallTest
+ public void testInWebapp() {
+ // Don't override if the URL is within the current webapp scope.
+ mDelegate.setIsWithinCurrentWebappScope(true);
+ checkUrl("http://youtube.com/")
+ .expecting(OverrideUrlLoadingResult.NO_OVERRIDE, IGNORE);
+ }
+
+ @SmallTest
public void testWtai() {
// Start the telephone application with the given number.
checkUrl("wtai://wp/mc;0123456789")
@@ -995,6 +1003,11 @@ public class ExternalNavigationHandlerTest extends NativeLibraryTestBase {
}
@Override
+ public boolean isWithinCurrentWebappScope(String url) {
+ return mIsWithinCurrentWebappScope;
+ }
+
+ @Override
public int countSpecializedHandlers(List<ResolveInfo> resolveInfos) {
return getSpecializedHandlers(resolveInfos).size();
}
@@ -1120,6 +1133,10 @@ public class ExternalNavigationHandlerTest extends NativeLibraryTestBase {
mIsChromeAppInForeground = value;
}
+ public void setIsWithinCurrentWebappScope(boolean value) {
+ mIsWithinCurrentWebappScope = value;
+ }
+
public Intent startActivityIntent = null;
public boolean startIncognitoIntentCalled = false;
@@ -1129,6 +1146,7 @@ public class ExternalNavigationHandlerTest extends NativeLibraryTestBase {
private String mNewUrlAfterClobbering;
private String mReferrerUrlForClobbering;
public boolean mIsChromeAppInForeground = true;
+ public boolean mIsWithinCurrentWebappScope;
public boolean shouldRequestFileAccess;
public boolean startFileIntentCalled;
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698