| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/common/navigation_params.h" |
| 6 |
| 7 #include "content/public/common/browser_side_navigation_policy.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "url/gurl.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 TEST(NavigationParamsTest, ShouldMakeNetworkRequestForURL) { |
| 14 if (!IsBrowserSideNavigationEnabled()) |
| 15 return; |
| 16 |
| 17 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("http://foo/bar.html"))); |
| 18 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("https://foo/bar.html"))); |
| 19 |
| 20 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("data://foo"))); |
| 21 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank"))); |
| 22 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc"))); |
| 23 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js"))); |
| 24 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar"))); |
| 25 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL())); |
| 26 } |
| 27 |
| 28 } // namespace content |
| OLD | NEW |