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

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

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switched to constructors Created 6 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
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | 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) 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 WebViewClient* defaultWebViewClient() 199 WebViewClient* defaultWebViewClient()
200 { 200 {
201 DEFINE_STATIC_LOCAL(TestWebViewClient, client, ()); 201 DEFINE_STATIC_LOCAL(TestWebViewClient, client, ());
202 return &client; 202 return &client;
203 } 203 }
204 204
205 } // namespace 205 } // namespace
206 206
207 void loadFrame(WebFrame* frame, const std::string& url) 207 void loadFrame(WebFrame* frame, const std::string& url)
208 { 208 {
209 WebURLRequest urlRequest; 209 WebURLRequest urlRequest(URLTestHelpers::toKURL(url), true, !frame->parent() );
210 urlRequest.initialize();
211 urlRequest.setURL(URLTestHelpers::toKURL(url));
212 210
213 Platform::current()->currentThread()->postTask(new LoadTask(frame, urlReques t)); 211 Platform::current()->currentThread()->postTask(new LoadTask(frame, urlReques t));
214 pumpPendingRequests(frame); 212 pumpPendingRequests(frame);
215 } 213 }
216 214
217 void loadHTMLString(WebFrame* frame, const std::string& html, const WebURL& base URL) 215 void loadHTMLString(WebFrame* frame, const std::string& html, const WebURL& base URL)
218 { 216 {
219 Platform::current()->currentThread()->postTask(new LoadHTMLStringTask(frame, html, baseURL)); 217 Platform::current()->currentThread()->postTask(new LoadHTMLStringTask(frame, html, baseURL));
220 pumpPendingRequests(frame); 218 pumpPendingRequests(frame);
221 } 219 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 328 }
331 329
332 void TestWebViewClient::initializeLayerTreeView() 330 void TestWebViewClient::initializeLayerTreeView()
333 { 331 {
334 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 332 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
335 ASSERT(m_layerTreeView); 333 ASSERT(m_layerTreeView);
336 } 334 }
337 335
338 } // namespace FrameTestHelpers 336 } // namespace FrameTestHelpers
339 } // namespace blink 337 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698