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

Side by Side Diff: chrome/browser/chromeos/arc/arc_navigation_throttle_unittest.cc

Issue 2471783005: Modifies how Arc's throttle handles redirections (Closed)
Patch Set: Documenting differences on M-55 implementation. 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/arc/arc_navigation_throttle.h" 5 #include "chrome/browser/chromeos/arc/arc_navigation_throttle.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "url/gurl.h" 7 #include "url/gurl.h"
8 8
9 namespace arc { 9 namespace arc {
10 10
(...skipping 18 matching lines...) Expand all
29 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( 29 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
30 GURL("http://a.google.com/"), GURL())); 30 GURL("http://a.google.com/"), GURL()));
31 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( 31 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
32 GURL(), GURL())); 32 GURL(), GURL()));
33 33
34 // A navigation not within the same domain can be overridden. 34 // A navigation not within the same domain can be overridden.
35 EXPECT_TRUE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( 35 EXPECT_TRUE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
36 GURL("http://www.google.com"), GURL("http://www.not-google.com/"))); 36 GURL("http://www.google.com"), GURL("http://www.not-google.com/")));
37 EXPECT_TRUE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( 37 EXPECT_TRUE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
38 GURL("http://www.not-google.com"), GURL("http://www.google.com/"))); 38 GURL("http://www.not-google.com"), GURL("http://www.google.com/")));
39
40 // A navigation with neither an http nor https scheme cannot be overriden.
41 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
42 GURL("chrome-extension://fake_document"), GURL("http://www.a.com")));
43 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
44 GURL("http://www.a.com"), GURL("chrome-extension://fake_document")));
45 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
46 GURL("chrome-extension://fake_document"), GURL("https://www.a.com")));
47 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
48 GURL("https://www.a.com"), GURL("chrome-extension://fake_document")));
49 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting(
50 GURL("chrome-extension://fake_a"), GURL("chrome-extension://fake_b")));
39 } 51 }
40 52
41 } // namespace arc 53 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_navigation_throttle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698