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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2741753003: Remove mutableResourceRequest() by FetchRequest::setRequestContext() (Closed)
Patch Set: fix Created 3 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/platform/loader/testing/MockResource.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 8236 matching lines...) Expand 10 before | Expand all | Expand 10 after
8247 FrameTestHelpers::WebViewHelper webViewHelper; 8247 FrameTestHelpers::WebViewHelper webViewHelper;
8248 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", true, 8248 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", true,
8249 &webFrameClient); 8249 &webFrameClient);
8250 8250
8251 EXPECT_EQ(14, webFrameClient.manifestChangeCount()); 8251 EXPECT_EQ(14, webFrameClient.manifestChangeCount());
8252 } 8252 }
8253 8253
8254 static Resource* fetchManifest(Document* document, const KURL& url) { 8254 static Resource* fetchManifest(Document* document, const KURL& url) {
8255 FetchRequest fetchRequest = 8255 FetchRequest fetchRequest =
8256 FetchRequest(ResourceRequest(url), FetchInitiatorInfo()); 8256 FetchRequest(ResourceRequest(url), FetchInitiatorInfo());
8257 fetchRequest.mutableResourceRequest().setRequestContext( 8257 fetchRequest.setRequestContext(WebURLRequest::RequestContextManifest);
8258 WebURLRequest::RequestContextManifest);
8259 8258
8260 return RawResource::fetchSynchronously(fetchRequest, document->fetcher()); 8259 return RawResource::fetchSynchronously(fetchRequest, document->fetcher());
8261 } 8260 }
8262 8261
8263 TEST_P(ParameterizedWebFrameTest, ManifestFetch) { 8262 TEST_P(ParameterizedWebFrameTest, ManifestFetch) {
8264 registerMockedHttpURLLoad("foo.html"); 8263 registerMockedHttpURLLoad("foo.html");
8265 registerMockedHttpURLLoad("link-manifest-fetch.json"); 8264 registerMockedHttpURLLoad("link-manifest-fetch.json");
8266 8265
8267 FrameTestHelpers::WebViewHelper webViewHelper; 8266 FrameTestHelpers::WebViewHelper webViewHelper;
8268 webViewHelper.initializeAndLoad(m_baseURL + "foo.html"); 8267 webViewHelper.initializeAndLoad(m_baseURL + "foo.html");
(...skipping 3140 matching lines...) Expand 10 before | Expand all | Expand 10 after
11409 FrameTestHelpers::WebViewHelper openerHelper; 11408 FrameTestHelpers::WebViewHelper openerHelper;
11410 openerHelper.initialize(false, nullptr, &openerWebViewClient); 11409 openerHelper.initialize(false, nullptr, &openerWebViewClient);
11411 FrameTestHelpers::WebViewHelper helper; 11410 FrameTestHelpers::WebViewHelper helper;
11412 helper.initializeWithOpener(openerHelper.webView()->mainFrame()); 11411 helper.initializeWithOpener(openerHelper.webView()->mainFrame());
11413 11412
11414 openerHelper.reset(); 11413 openerHelper.reset();
11415 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener()); 11414 EXPECT_EQ(nullptr, helper.webView()->mainFrameImpl()->opener());
11416 } 11415 }
11417 11416
11418 } // namespace blink 11417 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/testing/MockResource.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698