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

Side by Side Diff: third_party/WebKit/Source/core/exported/WebAssociatedURLLoaderImplTest.cpp

Issue 2940863005: Move loading methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Fixing build problems introduced by rebasing... Created 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "public/web/WebAssociatedURLLoader.h" 31 #include "public/web/WebAssociatedURLLoader.h"
32 32
33 #include <memory> 33 #include <memory>
34 #include "core/frame/FrameTestHelpers.h" 34 #include "core/frame/FrameTestHelpers.h"
35 #include "core/frame/WebLocalFrameBase.h"
35 #include "platform/testing/URLTestHelpers.h" 36 #include "platform/testing/URLTestHelpers.h"
36 #include "platform/testing/UnitTestHelpers.h" 37 #include "platform/testing/UnitTestHelpers.h"
37 #include "platform/wtf/PtrUtil.h" 38 #include "platform/wtf/PtrUtil.h"
38 #include "platform/wtf/text/CString.h" 39 #include "platform/wtf/text/CString.h"
39 #include "platform/wtf/text/WTFString.h" 40 #include "platform/wtf/text/WTFString.h"
40 #include "public/platform/Platform.h" 41 #include "public/platform/Platform.h"
41 #include "public/platform/WebString.h" 42 #include "public/platform/WebString.h"
42 #include "public/platform/WebThread.h" 43 #include "public/platform/WebThread.h"
43 #include "public/platform/WebURL.h" 44 #include "public/platform/WebURL.h"
44 #include "public/platform/WebURLLoaderMockFactory.h" 45 #include "public/platform/WebURLLoaderMockFactory.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 EXPECT_TRUE(expected_loader_); 231 EXPECT_TRUE(expected_loader_);
231 expected_loader_->LoadAsynchronously(request, this); 232 expected_loader_->LoadAsynchronously(request, this);
232 ServeRequests(); 233 ServeRequests();
233 EXPECT_TRUE(did_receive_response_); 234 EXPECT_TRUE(did_receive_response_);
234 EXPECT_TRUE(did_receive_data_); 235 EXPECT_TRUE(did_receive_data_);
235 EXPECT_TRUE(did_finish_loading_); 236 EXPECT_TRUE(did_finish_loading_);
236 237
237 return !actual_response_.HttpHeaderField(header_name_string).IsEmpty(); 238 return !actual_response_.HttpHeaderField(header_name_string).IsEmpty();
238 } 239 }
239 240
240 WebFrame* MainFrame() const { return helper_.WebView()->MainFrame(); } 241 WebLocalFrameBase* MainFrame() const {
242 return helper_.WebView()->MainFrameImpl();
243 }
241 244
242 protected: 245 protected:
243 String frame_file_path_; 246 String frame_file_path_;
244 FrameTestHelpers::WebViewHelper helper_; 247 FrameTestHelpers::WebViewHelper helper_;
245 248
246 std::unique_ptr<WebAssociatedURLLoader> expected_loader_; 249 std::unique_ptr<WebAssociatedURLLoader> expected_loader_;
247 WebURLResponse actual_response_; 250 WebURLResponse actual_response_;
248 WebURLResponse expected_response_; 251 WebURLResponse expected_response_;
249 WebURLRequest expected_new_request_; 252 WebURLRequest expected_new_request_;
250 WebURLResponse expected_redirect_response_; 253 WebURLResponse expected_redirect_response_;
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 expected_loader_->LoadAsynchronously(request, this); 666 expected_loader_->LoadAsynchronously(request, this);
664 ServeRequests(); 667 ServeRequests();
665 EXPECT_TRUE(did_receive_response_); 668 EXPECT_TRUE(did_receive_response_);
666 EXPECT_TRUE(did_receive_data_); 669 EXPECT_TRUE(did_receive_data_);
667 EXPECT_TRUE(did_finish_loading_); 670 EXPECT_TRUE(did_finish_loading_);
668 671
669 EXPECT_FALSE(actual_response_.HttpHeaderField(header_name_string).IsEmpty()); 672 EXPECT_FALSE(actual_response_.HttpHeaderField(header_name_string).IsEmpty());
670 } 673 }
671 674
672 } // namespace blink 675 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698