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: third_party/WebKit/Source/web/tests/FrameTestHelpers.cpp

Issue 1568433005: Platform WebUnitTestSupport onion soup: remove more indirect methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp ('k') | third_party/WebKit/Source/web/tests/MHTMLTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698