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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc

Issue 2458073003: Modifies how Arc's throttle handles redirections (Closed)
Patch Set: Rebasing Created 4 years, 1 month 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/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
index 8a1b6a557ebf51df30d9116e732482c59cd73852..8b083e680322106c1ec74113c68d402cd719316a 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle_unittest.cc
@@ -63,6 +63,18 @@ TEST(ArcNavigationThrottleTest, TestShouldOverrideUrlLoading) {
GURL("http://www.google.com"), GURL("http://www.not-google.com/")));
EXPECT_TRUE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
GURL("http://www.not-google.com"), GURL("http://www.google.com/")));
+
+ // A navigation with neither an http nor https scheme cannot be overriden.
+ EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
+ GURL("chrome-extension://fake_document"), GURL("http://www.a.com")));
+ EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
+ GURL("http://www.a.com"), GURL("chrome-extension://fake_document")));
+ EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
+ GURL("chrome-extension://fake_document"), GURL("https://www.a.com")));
+ EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
+ GURL("https://www.a.com"), GURL("chrome-extension://fake_document")));
+ EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
+ GURL("chrome-extension://fake_a"), GURL("chrome-extension://fake_b")));
}
TEST(ArcNavigationThrottleTest, TestIsAppAvailable) {
« no previous file with comments | « chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698