Index: third_party/WebKit/Source/modules/fetch/RequestTest.cpp |
diff --git a/third_party/WebKit/Source/modules/fetch/RequestTest.cpp b/third_party/WebKit/Source/modules/fetch/RequestTest.cpp |
index 0300d0945221ad8fc7a671d11caecb4e3a1ffa50..0c6fed467f3a947180208a17c16de4826a1d3af9 100644 |
--- a/third_party/WebKit/Source/modules/fetch/RequestTest.cpp |
+++ b/third_party/WebKit/Source/modules/fetch/RequestTest.cpp |
@@ -69,10 +69,12 @@ TEST_F(ServiceWorkerRequestTest, FromAndToWebRequest) |
const String referrer = "http://www.referrer.com/"; |
const WebReferrerPolicy referrerPolicy = WebReferrerPolicyAlways; |
const WebURLRequest::RequestContext context = WebURLRequest::RequestContextAudio; |
+ const WebURLRequest::FetchRequestMode mode = WebURLRequest::FetchRequestModeNavigate; |
webRequest.setURL(url); |
webRequest.setMethod(method); |
webRequest.setRequestContext(context); |
+ webRequest.setMode(mode); |
for (int i = 0; headers[i].key; ++i) |
webRequest.setHeader(WebString::fromUTF8(headers[i].key), WebString::fromUTF8(headers[i].value)); |
webRequest.setReferrer(referrer, referrerPolicy); |
@@ -83,6 +85,7 @@ TEST_F(ServiceWorkerRequestTest, FromAndToWebRequest) |
EXPECT_EQ(method, request->method()); |
EXPECT_EQ("audio", request->context()); |
EXPECT_EQ(referrer, request->referrer()); |
+ EXPECT_EQ("navigate", request->mode()); |
Headers* requestHeaders = request->headers(); |
@@ -104,6 +107,7 @@ TEST_F(ServiceWorkerRequestTest, FromAndToWebRequest) |
EXPECT_EQ(referrer, KURL(secondWebRequest.referrerUrl())); |
EXPECT_EQ(WebReferrerPolicyDefault, secondWebRequest.referrerPolicy()); |
EXPECT_EQ(webRequest.headers(), secondWebRequest.headers()); |
+ EXPECT_EQ(WebURLRequest::FetchRequestModeNoCORS, secondWebRequest.mode()); |
} |
TEST_F(ServiceWorkerRequestTest, ToWebRequestStripsURLFragment) |