| OLD | NEW |
| 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/ui/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 |
| 11 TEST(ArcNavigationThrottleTest, TestShouldOverrideUrlLoading) { | 11 TEST(ArcNavigationThrottleTest, TestShouldOverrideUrlLoading) { |
| 12 // A navigation within the same domain shouldn't be overridden. | 12 // A navigation within the same domain shouldn't be overridden. |
| 13 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( | 13 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( |
| 14 GURL("http://google.com"), GURL("http://google.com/"))); | 14 GURL("http://google.com"), GURL("http://google.com/"))); |
| 15 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( | 15 EXPECT_FALSE(ArcNavigationThrottle::ShouldOverrideUrlLoadingForTesting( |
| (...skipping 16 matching lines...) Expand all Loading... |
| 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 } | 39 } |
| 40 | 40 |
| 41 } // namespace arc | 41 } // namespace arc |
| OLD | NEW |