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

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

Issue 1487343002: Set credentials mode "same-origin" when crossOrigin=anonymous is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/LinkLoaderTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
index c4b7570dcbde2bc0f1be1de694b37c88bb10512f..af95b4ff6ce5c94e411cad4c3bbda151ad16c688 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
@@ -106,7 +106,7 @@ TEST(LinkLoaderTest, Preload)
LinkLoader loader(&loaderClient);
KURL hrefURL = KURL(KURL(), testCase.href);
loader.loadLink(LinkRelAttribute("preload"),
- AtomicString(),
+ CrossOriginAttributeNotSet,
String(),
testCase.as,
hrefURL,
@@ -154,7 +154,7 @@ TEST(LinkLoaderTest, DNSPrefetch)
KURL hrefURL = KURL(KURL(ParsedURLStringTag(), String("http://example.com")), testCase.href);
NetworkHintsMock networkHints;
loader.loadLink(LinkRelAttribute("dns-prefetch"),
- AtomicString(),
+ CrossOriginAttributeNotSet,
String(),
String(),
hrefURL,
@@ -169,15 +169,15 @@ TEST(LinkLoaderTest, Preconnect)
{
struct {
const char* href;
- const char* crossOrigin;
+ CrossOriginAttributeValue crossOrigin;
const bool shouldLoad;
const bool isHTTPS;
const bool isCrossOrigin;
} cases[] = {
- {"http://example.com/", nullptr, true, false, false},
- {"https://example.com/", nullptr, true, true, false},
- {"http://example.com/", "anonymous", true, false, true},
- {"//example.com/", nullptr, true, false, false},
+ {"http://example.com/", CrossOriginAttributeNotSet, true, false, false},
+ {"https://example.com/", CrossOriginAttributeNotSet, true, true, false},
+ {"http://example.com/", CrossOriginAttributeAnonymous, true, false, true},
+ {"//example.com/", CrossOriginAttributeNotSet, true, false, false},
};
// Test the cases with a single header
« no previous file with comments | « third_party/WebKit/Source/core/loader/LinkLoader.cpp ('k') | third_party/WebKit/Source/core/loader/TextTrackLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698