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

Unified Diff: content/common/navigation_params_unittest.cc

Issue 2098543003: PlzNavigate: Handle navigation within MHTML documents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cid_scheme
Patch Set: Make component build work Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/navigation_params_unittest.cc
diff --git a/content/common/navigation_params_unittest.cc b/content/common/navigation_params_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0dec5df6b9efb805fcdad522afbbf4604f12db48
--- /dev/null
+++ b/content/common/navigation_params_unittest.cc
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/common/navigation_params.h"
+
+#include "content/public/common/browser_side_navigation_policy.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
+
+namespace content {
+
+TEST(NavigationParamsTest, ShouldMakeNetworkRequestForURL) {
+ if (!IsBrowserSideNavigationEnabled())
+ return;
+
+ EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("http://foo/bar.html")));
+ EXPECT_TRUE(ShouldMakeNetworkRequestForURL(GURL("https://foo/bar.html")));
+
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("data://foo")));
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:blank")));
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("about:srcdoc")));
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("javascript://foo.js")));
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL("cid:foo@bar")));
+ EXPECT_FALSE(ShouldMakeNetworkRequestForURL(GURL()));
+}
+
+} // namespace content
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698