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

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

Issue 2834013002: PlzNavigate: make MHTML iframe load working. (Closed)
Patch Set: 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
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 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("data://foo"))); 19 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("data://foo")));
20 EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar")));
carlosk 2017/05/03 16:56:49 nit: Please add a comment explaining why cid: and
arthursonzogni 2017/05/04 14:26:32 Yes, really good idea, especially for "data:". Don
20 21
21 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank"))); 22 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank")));
22 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc"))); 23 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc")));
23 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js"))); 24 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js")));
24 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar")));
25 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL())); 25 EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL()));
26 } 26 }
27 27
28 } // namespace content 28 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698