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

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: Improving the WillRedirectRequest() code comments 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
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..a44b65c3963a4a984c056491a8e41f862686e0a9 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(GURL("chrome-extension://fake_document"),
Yusuke Sato 2016/10/31 21:27:09 ArcNavigationThrottle::ShouldOverrideUrlLoadingFor
djacobo_ 2016/10/31 21:56:38 Done.
+ GURL("http://www.a.com"));
+ EXPECT_FALSE(GURL("http://www.a.com"),
+ GURL("chrome-extension://fake_document"));
+ EXPECT_FALSE(GURL("chrome-extension://fake_document"),
+ GURL("https://www.a.com"));
+ EXPECT_FALSE(GURL("https://www.a.com"),
+ GURL("chrome-extension://fake_document"));
+ EXPECT_FALSE(GURL("chrome-extension://fake_a"),
+ GURL("chrome-extension://fake_b"));
}
TEST(ArcNavigationThrottleTest, TestIsAppAvailable) {

Powered by Google App Engine
This is Rietveld 408576698