OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015, Google Inc. All rights reserved. | 2 * Copyright (c) 2015, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 resourceRequest.setFrameType(frameType); | 238 resourceRequest.setFrameType(frameType); |
239 | 239 |
240 fetchContext->modifyRequestForCSP(resourceRequest); | 240 fetchContext->modifyRequestForCSP(resourceRequest); |
241 | 241 |
242 EXPECT_EQ(expectedURL.getString(), resourceRequest.url().getString()); | 242 EXPECT_EQ(expectedURL.getString(), resourceRequest.url().getString()); |
243 EXPECT_EQ(expectedURL.protocol(), resourceRequest.url().protocol()); | 243 EXPECT_EQ(expectedURL.protocol(), resourceRequest.url().protocol()); |
244 EXPECT_EQ(expectedURL.host(), resourceRequest.url().host()); | 244 EXPECT_EQ(expectedURL.host(), resourceRequest.url().host()); |
245 EXPECT_EQ(expectedURL.port(), resourceRequest.url().port()); | 245 EXPECT_EQ(expectedURL.port(), resourceRequest.url().port()); |
246 EXPECT_EQ(expectedURL.hasPort(), resourceRequest.url().hasPort()); | 246 EXPECT_EQ(expectedURL.hasPort(), resourceRequest.url().hasPort()); |
247 EXPECT_EQ(expectedURL.path(), resourceRequest.url().path()); | 247 EXPECT_EQ(expectedURL.path(), resourceRequest.url().path()); |
| 248 EXPECT_EQ(document->getInsecureRequestPolicy(), |
| 249 resourceRequest.getInsecureRequestPolicy()); |
248 } | 250 } |
249 | 251 |
250 void expectUpgradeInsecureRequestHeader(const char* input, | 252 void expectUpgradeInsecureRequestHeader(const char* input, |
251 WebURLRequest::FrameType frameType, | 253 WebURLRequest::FrameType frameType, |
252 bool shouldPrefer) { | 254 bool shouldPrefer) { |
253 KURL inputURL(ParsedURLString, input); | 255 KURL inputURL(ParsedURLString, input); |
254 | 256 |
255 ResourceRequest resourceRequest(inputURL); | 257 ResourceRequest resourceRequest(inputURL); |
256 resourceRequest.setRequestContext(WebURLRequest::RequestContextScript); | 258 resourceRequest.setRequestContext(WebURLRequest::RequestContextScript); |
257 resourceRequest.setFrameType(frameType); | 259 resourceRequest.setFrameType(frameType); |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
901 setFilterPolicy(WebDocumentSubresourceFilter::WouldDisallow); | 903 setFilterPolicy(WebDocumentSubresourceFilter::WouldDisallow); |
902 | 904 |
903 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequest()); | 905 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequest()); |
904 EXPECT_EQ(0, getFilteredLoadCallCount()); | 906 EXPECT_EQ(0, getFilteredLoadCallCount()); |
905 | 907 |
906 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequestPreload()); | 908 EXPECT_EQ(ResourceRequestBlockedReason::None, canRequestPreload()); |
907 EXPECT_EQ(0, getFilteredLoadCallCount()); | 909 EXPECT_EQ(0, getFilteredLoadCallCount()); |
908 } | 910 } |
909 | 911 |
910 } // namespace blink | 912 } // namespace blink |
OLD | NEW |