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

Unified Diff: Source/web/tests/WebDocumentTest.cpp

Issue 1305253012: Allow 'chrome-extension:' URLs to bypass content settings (1/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/web/WebSecurityPolicy.cpp ('k') | public/web/WebSecurityPolicy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebDocumentTest.cpp
diff --git a/Source/web/tests/WebDocumentTest.cpp b/Source/web/tests/WebDocumentTest.cpp
index 6d8008f451d3a4497b00314c7ac806b17a28a3e6..ca1f19a87fd75f6b3b9e04988231243699e77e9a 100644
--- a/Source/web/tests/WebDocumentTest.cpp
+++ b/Source/web/tests/WebDocumentTest.cpp
@@ -12,11 +12,12 @@
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLLinkElement.h"
-#include "core/style/ComputedStyle.h"
#include "core/page/Page.h"
+#include "core/style/ComputedStyle.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/Color.h"
#include "platform/testing/URLTestHelpers.h"
+#include "platform/weborigin/SchemeRegistry.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "web/tests/FrameTestHelpers.h"
#include <gtest/gtest.h>
@@ -296,4 +297,15 @@ TEST_F(WebDocumentFirstPartyTest, NestedData)
ASSERT_EQ(SecurityOrigin::urlWithUniqueSecurityOrigin(), nestedDocument()->firstPartyForCookies());
}
+TEST_F(WebDocumentFirstPartyTest, NestedOriginAInOriginBWithFirstPartyOverride)
+{
+ load(nestedOriginAInOriginB);
+
+ SchemeRegistry::registerURLSchemeAsFirstPartyWhenTopLevel("http");
+
+ ASSERT_EQ(toOriginA(nestedOriginAInOriginB), topDocument()->firstPartyForCookies());
+ ASSERT_EQ(toOriginA(nestedOriginAInOriginB), nestedDocument()->firstPartyForCookies());
+ ASSERT_EQ(toOriginA(nestedOriginAInOriginB), nestedNestedDocument()->firstPartyForCookies());
+}
+
} // namespace blink
« no previous file with comments | « Source/web/WebSecurityPolicy.cpp ('k') | public/web/WebSecurityPolicy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698