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

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

Issue 2050553003: Moves Blink mixed content enums and helper methods to public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor updates. 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
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 1ecc709dcb2504ba2ace8465af10451287eab01d..f6b321589abf41146c86bbf4e37581f080308a32 100644
--- a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
+++ b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
@@ -4,6 +4,7 @@
#include "core/loader/MixedContentChecker.h"
+#include "core/frame/Settings.h"
#include "core/loader/EmptyClients.h"
#include "core/testing/DummyPageHolder.h"
#include "platform/network/ResourceResponse.h"
@@ -53,20 +54,20 @@ TEST(MixedContentCheckerTest, ContextTypeForInspector)
ResourceRequest notMixedContent("https://example.test/foo.jpg");
notMixedContent.setFrameType(WebURLRequest::FrameTypeAuxiliary);
notMixedContent.setRequestContext(WebURLRequest::RequestContextScript);
- EXPECT_EQ(MixedContentChecker::ContextTypeNotMixedContent, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), notMixedContent));
+ EXPECT_EQ(WebMixedContent::ContextType::NotMixedContent, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), notMixedContent));
dummyPageHolder->frame().document()->setSecurityOrigin(SecurityOrigin::createFromString("https://example.test"));
- EXPECT_EQ(MixedContentChecker::ContextTypeNotMixedContent, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), notMixedContent));
+ EXPECT_EQ(WebMixedContent::ContextType::NotMixedContent, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), notMixedContent));
ResourceRequest blockableMixedContent("http://example.test/foo.jpg");
blockableMixedContent.setFrameType(WebURLRequest::FrameTypeAuxiliary);
blockableMixedContent.setRequestContext(WebURLRequest::RequestContextScript);
- EXPECT_EQ(MixedContentChecker::ContextTypeBlockable, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), blockableMixedContent));
+ EXPECT_EQ(WebMixedContent::ContextType::Blockable, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), blockableMixedContent));
ResourceRequest optionallyBlockableMixedContent("http://example.test/foo.jpg");
blockableMixedContent.setFrameType(WebURLRequest::FrameTypeAuxiliary);
blockableMixedContent.setRequestContext(WebURLRequest::RequestContextImage);
- EXPECT_EQ(MixedContentChecker::ContextTypeOptionallyBlockable, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), blockableMixedContent));
+ EXPECT_EQ(WebMixedContent::ContextType::OptionallyBlockable, MixedContentChecker::contextTypeForInspector(&dummyPageHolder->frame(), blockableMixedContent));
}
namespace {
@@ -101,7 +102,7 @@ TEST(MixedContentCheckerTest, HandleCertificateError)
ResourceResponse response2;
WebURLRequest::RequestContext requestContext = WebURLRequest::RequestContextImage;
- ASSERT_EQ(MixedContentChecker::ContextTypeOptionallyBlockable, MixedContentChecker::contextTypeFromContext(requestContext, &dummyPageHolder->frame()));
+ ASSERT_EQ(WebMixedContent::ContextType::OptionallyBlockable, WebMixedContent::contextTypeFromRequestContext(requestContext, dummyPageHolder->frame().settings()->strictMixedContentCheckingForPlugin()));
response2.setURL(displayedUrl);
response2.setSecurityInfo("security info2");
EXPECT_CALL(*client, didDisplayContentWithCertificateErrors(displayedUrl, response2.getSecurityInfo()));
« no previous file with comments | « third_party/WebKit/Source/core/loader/MixedContentChecker.cpp ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698