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

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

Issue 1170503003: Remove resource type-specific fetching logic from ResourceFetcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Null-check Document::loader() before calling startPreload() Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.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 6574 matching lines...) Expand 10 before | Expand all | Expand 10 after
6585 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", tru e, &webFrameClient); 6585 webViewHelper.initializeAndLoad(m_baseURL + "link-manifest-change.html", tru e, &webFrameClient);
6586 6586
6587 EXPECT_EQ(14, webFrameClient.manifestChangeCount()); 6587 EXPECT_EQ(14, webFrameClient.manifestChangeCount());
6588 } 6588 }
6589 6589
6590 static ResourcePtr<Resource> fetchManifest(Document* document, const KURL& url) 6590 static ResourcePtr<Resource> fetchManifest(Document* document, const KURL& url)
6591 { 6591 {
6592 FetchRequest fetchRequest = FetchRequest(ResourceRequest(url), FetchInitiato rInfo()); 6592 FetchRequest fetchRequest = FetchRequest(ResourceRequest(url), FetchInitiato rInfo());
6593 fetchRequest.mutableResourceRequest().setRequestContext(WebURLRequest::Reque stContextManifest); 6593 fetchRequest.mutableResourceRequest().setRequestContext(WebURLRequest::Reque stContextManifest);
6594 6594
6595 return document->fetcher()->fetchSynchronously(fetchRequest); 6595 return RawResource::fetchSynchronously(fetchRequest, document->fetcher());
6596 } 6596 }
6597 6597
6598 TEST_P(ParameterizedWebFrameTest, ManifestFetch) 6598 TEST_P(ParameterizedWebFrameTest, ManifestFetch)
6599 { 6599 {
6600 registerMockedHttpURLLoad("foo.html"); 6600 registerMockedHttpURLLoad("foo.html");
6601 registerMockedHttpURLLoad("link-manifest-fetch.json"); 6601 registerMockedHttpURLLoad("link-manifest-fetch.json");
6602 6602
6603 FrameTestHelpers::WebViewHelper webViewHelper(this); 6603 FrameTestHelpers::WebViewHelper webViewHelper(this);
6604 webViewHelper.initializeAndLoad(m_baseURL + "foo.html"); 6604 webViewHelper.initializeAndLoad(m_baseURL + "foo.html");
6605 Document* document = toWebLocalFrameImpl(webViewHelper.webViewImpl()->mainFr ame())->frame()->document(); 6605 Document* document = toWebLocalFrameImpl(webViewHelper.webViewImpl()->mainFr ame())->frame()->document();
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
7727 TEST_F(WebFrameTest, OrientationFrameDetach) 7727 TEST_F(WebFrameTest, OrientationFrameDetach)
7728 { 7728 {
7729 RuntimeEnabledFeatures::setOrientationEventEnabled(true); 7729 RuntimeEnabledFeatures::setOrientationEventEnabled(true);
7730 registerMockedHttpURLLoad("orientation-frame-detach.html"); 7730 registerMockedHttpURLLoad("orientation-frame-detach.html");
7731 FrameTestHelpers::WebViewHelper webViewHelper; 7731 FrameTestHelpers::WebViewHelper webViewHelper;
7732 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "orie ntation-frame-detach.html", true); 7732 WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(m_baseURL + "orie ntation-frame-detach.html", true);
7733 webViewImpl->mainFrameImpl()->sendOrientationChangeEvent(); 7733 webViewImpl->mainFrameImpl()->sendOrientationChangeEvent();
7734 } 7734 }
7735 7735
7736 } // namespace blink 7736 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/xml/parser/XMLDocumentParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698