OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |