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

Unified Diff: third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp

Issue 2126753003: `about:blank` is not mixed content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 | « third_party/WebKit/Source/core/loader/MixedContentChecker.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
index 291c92f4a160b7302ea61452dbb5df5a6bff4b64..6e1ea8399e6143df76aacdc4b976db34b376d320 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
@@ -28,6 +28,7 @@ TEST(MixedContentCheckerTest, IsMixedContent)
{"http://example.com/foo", "http://example.com/foo", false},
{"http://example.com/foo", "https://example.com/foo", false},
{"http://example.com/foo", "data:text/html,<p>Hi!</p>", false},
+ {"http://example.com/foo", "about:blank", false},
{"https://example.com/foo", "https://example.com/foo", false},
{"https://example.com/foo", "wss://example.com/foo", false},
{"https://example.com/foo", "data:text/html,<p>Hi!</p>", false},
@@ -42,15 +43,12 @@ TEST(MixedContentCheckerTest, IsMixedContent)
{"https://example.com/foo", "http://localhost/", true},
};
- for (size_t i = 0; i < WTF_ARRAY_LENGTH(cases); ++i) {
- const char* origin = cases[i].origin;
- const char* target = cases[i].target;
- bool expectation = cases[i].expectation;
-
- KURL originUrl(KURL(), origin);
+ for (const auto& test : cases) {
+ SCOPED_TRACE(::testing::Message() << "Origin: " << test.origin << ", Target: " << test.target << ", Expectation: " << test.expectation);
+ KURL originUrl(KURL(), test.origin);
RefPtr<SecurityOrigin> securityOrigin(SecurityOrigin::create(originUrl));
- KURL targetUrl(KURL(), target);
- EXPECT_EQ(expectation, MixedContentChecker::isMixedContent(securityOrigin.get(), targetUrl)) << "Origin: " << origin << ", Target: " << target << ", Expectation: " << expectation;
+ KURL targetUrl(KURL(), test.target);
+ EXPECT_EQ(test.expectation, MixedContentChecker::isMixedContent(securityOrigin.get(), targetUrl));
}
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/MixedContentChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698