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

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: 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
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 }; 107 };
108 108
109 void pumpPendingRequests(WebFrame* frame) 109 void pumpPendingRequests(WebFrame* frame)
110 { 110 {
111 Platform::current()->currentThread()->postTask(new ServeAsyncRequestsTask(te stClientForFrame(frame))); 111 Platform::current()->currentThread()->postTask(new ServeAsyncRequestsTask(te stClientForFrame(frame)));
112 Platform::current()->currentThread()->enterRunLoop(); 112 Platform::current()->currentThread()->enterRunLoop();
113 } 113 }
114 114
115 class LoadTask : public WebThread::Task { 115 class LoadTask : public WebThread::Task {
116 public: 116 public:
117 LoadTask(WebFrame* frame, const WebURLRequest& request) 117 LoadTask(WebFrame* frame, WebURLRequest& request)
118 : m_frame(frame) 118 : m_frame(frame)
119 , m_request(request) 119 , m_request(request)
120 { 120 {
121 m_request.initializeForMainResource(!m_frame->parent());
121 } 122 }
122 123
123 virtual void run() OVERRIDE 124 virtual void run() OVERRIDE
124 { 125 {
125 m_frame->loadRequest(m_request); 126 m_frame->loadRequest(m_request);
126 } 127 }
127 128
128 private: 129 private:
129 WebFrame* const m_frame; 130 WebFrame* const m_frame;
130 const WebURLRequest m_request; 131 WebURLRequest m_request;
131 }; 132 };
132 133
133 class LoadHTMLStringTask : public WebThread::Task { 134 class LoadHTMLStringTask : public WebThread::Task {
134 public: 135 public:
135 LoadHTMLStringTask(WebFrame* frame, const std::string& html, const WebURL& b aseURL) 136 LoadHTMLStringTask(WebFrame* frame, const std::string& html, const WebURL& b aseURL)
136 : m_frame(frame) 137 : m_frame(frame)
137 , m_html(html) 138 , m_html(html)
138 , m_baseURL(baseURL) 139 , m_baseURL(baseURL)
139 { 140 {
140 } 141 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 331 }
331 332
332 void TestWebViewClient::initializeLayerTreeView() 333 void TestWebViewClient::initializeLayerTreeView()
333 { 334 {
334 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting()); 335 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay erTreeViewForTesting());
335 ASSERT(m_layerTreeView); 336 ASSERT(m_layerTreeView);
336 } 337 }
337 338
338 } // namespace FrameTestHelpers 339 } // namespace FrameTestHelpers
339 } // namespace blink 340 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698