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

Side by Side Diff: Source/core/loader/FrameFetchContextTest.cpp

Issue 1235263002: UPGRADE: Rename the 'https' header. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Layouttest. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 { 97 {
98 KURL inputURL(ParsedURLString, input); 98 KURL inputURL(ParsedURLString, input);
99 99
100 FetchRequest fetchRequest = FetchRequest(ResourceRequest(inputURL), Fetc hInitiatorInfo()); 100 FetchRequest fetchRequest = FetchRequest(ResourceRequest(inputURL), Fetc hInitiatorInfo());
101 fetchRequest.mutableResourceRequest().setRequestContext(WebURLRequest::R equestContextScript); 101 fetchRequest.mutableResourceRequest().setRequestContext(WebURLRequest::R equestContextScript);
102 fetchRequest.mutableResourceRequest().setFrameType(frameType); 102 fetchRequest.mutableResourceRequest().setFrameType(frameType);
103 103
104 fetchContext->upgradeInsecureRequest(fetchRequest); 104 fetchContext->upgradeInsecureRequest(fetchRequest);
105 105
106 EXPECT_STREQ(shouldPrefer ? "1" : "", 106 EXPECT_STREQ(shouldPrefer ? "1" : "",
107 fetchRequest.resourceRequest().httpHeaderField("HTTPS").utf8().data( )); 107 fetchRequest.resourceRequest().httpHeaderField("Upgrade-Insecure-Req uests").utf8().data());
108 } 108 }
109 109
110 KURL secureURL; 110 KURL secureURL;
111 RefPtr<SecurityOrigin> exampleOrigin; 111 RefPtr<SecurityOrigin> exampleOrigin;
112 RefPtr<SecurityOrigin> secureOrigin; 112 RefPtr<SecurityOrigin> secureOrigin;
113 113
114 OwnPtr<DummyPageHolder> dummyPageHolder; 114 OwnPtr<DummyPageHolder> dummyPageHolder;
115 // We don't use the DocumentLoader directly in any tests, but need to keep i t around as long 115 // We don't use the DocumentLoader directly in any tests, but need to keep i t around as long
116 // as the ResourceFetcher and Document live due to indirect usage. 116 // as the ResourceFetcher and Document live due to indirect usage.
117 RefPtrWillBePersistent<DocumentLoader> documentLoader; 117 RefPtrWillBePersistent<DocumentLoader> documentLoader;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 preferences.setShouldSendDPR(true); 314 preferences.setShouldSendDPR(true);
315 preferences.setShouldSendResourceWidth(true); 315 preferences.setShouldSendResourceWidth(true);
316 preferences.setShouldSendViewportWidth(true); 316 preferences.setShouldSendViewportWidth(true);
317 document->setClientHintsPreferences(preferences); 317 document->setClientHintsPreferences(preferences);
318 expectHeader("http://www.example.com/1.gif", "DPR", true, "1"); 318 expectHeader("http://www.example.com/1.gif", "DPR", true, "1");
319 expectHeader("http://www.example.com/1.gif", "Width", true, "400", 400); 319 expectHeader("http://www.example.com/1.gif", "Width", true, "400", 400);
320 expectHeader("http://www.example.com/1.gif", "Viewport-Width", true, "500"); 320 expectHeader("http://www.example.com/1.gif", "Viewport-Width", true, "500");
321 } 321 }
322 322
323 } // namespace 323 } // namespace
OLDNEW
« Source/core/loader/FrameFetchContext.cpp ('K') | « Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698