| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 : m_client(client) | 78 : m_client(client) |
| 79 { | 79 { |
| 80 } | 80 } |
| 81 | 81 |
| 82 void run() override | 82 void run() override |
| 83 { | 83 { |
| 84 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(
); | 84 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(
); |
| 85 if (m_client->isLoading()) | 85 if (m_client->isLoading()) |
| 86 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_F
ROM_HERE, new ServeAsyncRequestsTask(m_client)); | 86 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_F
ROM_HERE, new ServeAsyncRequestsTask(m_client)); |
| 87 else | 87 else |
| 88 Platform::current()->unitTestSupport()->exitRunLoop(); | 88 testing::exitRunLoop(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 TestWebFrameClient* const m_client; | 92 TestWebFrameClient* const m_client; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 void pumpPendingRequests(WebFrame* frame) | 95 void pumpPendingRequests(WebFrame* frame) |
| 96 { | 96 { |
| 97 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE
, new ServeAsyncRequestsTask(testClientForFrame(frame))); | 97 Platform::current()->currentThread()->taskRunner()->postTask(BLINK_FROM_HERE
, new ServeAsyncRequestsTask(testClientForFrame(frame))); |
| 98 Platform::current()->unitTestSupport()->enterRunLoop(); | 98 testing::enterRunLoop(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 class LoadTask : public WebTaskRunner::Task { | 101 class LoadTask : public WebTaskRunner::Task { |
| 102 public: | 102 public: |
| 103 LoadTask(WebFrame* frame, const WebURLRequest& request) | 103 LoadTask(WebFrame* frame, const WebURLRequest& request) |
| 104 : m_frame(frame) | 104 : m_frame(frame) |
| 105 , m_request(request) | 105 , m_request(request) |
| 106 { | 106 { |
| 107 } | 107 } |
| 108 | 108 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 355 } |
| 356 | 356 |
| 357 void TestWebViewClient::initializeLayerTreeView() | 357 void TestWebViewClient::initializeLayerTreeView() |
| 358 { | 358 { |
| 359 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); | 359 m_layerTreeView = adoptPtr(Platform::current()->unitTestSupport()->createLay
erTreeViewForTesting()); |
| 360 ASSERT(m_layerTreeView); | 360 ASSERT(m_layerTreeView); |
| 361 } | 361 } |
| 362 | 362 |
| 363 } // namespace FrameTestHelpers | 363 } // namespace FrameTestHelpers |
| 364 } // namespace blink | 364 } // namespace blink |
| OLD | NEW |