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