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

Side by Side Diff: content/common/navigation_params_unittest.cc

Issue 2834013002: PlzNavigate: make MHTML iframe load working. (Closed)
Patch Set: Addressed comments Created 3 years, 7 months 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | 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 "content/common/navigation_params.h" 5 #include "content/common/navigation_params.h"
6 6
7 #include "content/public/common/browser_side_navigation_policy.h" 7 #include "content/public/common/browser_side_navigation_policy.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 TEST(NavigationParamsTest, ShouldMakeNetworkRequestForURL) { 13 TEST(NavigationParamsTest, ShouldMakeNetworkRequestForURL) {
14 if (!IsBrowserSideNavigationEnabled()) 14 if (!IsBrowserSideNavigationEnabled())
15 return; 15 return;
16 16
17 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("http://foo/bar.html"))); 17 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("http://foo/bar.html")));
18 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("https://foo/bar.html"))); 18 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("https://foo/bar.html")));
19 // Even though a "data" url doesn't generate actual network requests. It is
nasko 2017/05/04 15:48:18 nit: "data:", since it is a scheme. "requests, it
arthursonzogni 2017/05/05 09:07:46 I will list some reasons why some data-urls requir
20 // handled by the network stack and so must return true for this check.
19 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("data://foo"))); 21 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("data://foo")));
20 22
21 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank"))); 23 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank")));
22 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc"))); 24 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc")));
23 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js"))); 25 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js")));
24 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar"))); 26 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar")));
25 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL())); 27 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL()));
26 } 28 }
27 29
28 } // namespace content 30 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698