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

Side by Side Diff: content/shell/renderer/test_runner/web_test_proxy.cc

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scoped_abort_remaining_swap_promises.h Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/test/web_layer_tree_view_impl_for_testing.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/renderer/test_runner/web_test_proxy.h" 5 #include "content/shell/renderer/test_runner/web_test_proxy.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "content/public/common/content_switches.h"
13 #include "content/shell/renderer/test_runner/TestPlugin.h" 15 #include "content/shell/renderer/test_runner/TestPlugin.h"
14 #include "content/shell/renderer/test_runner/WebTestDelegate.h" 16 #include "content/shell/renderer/test_runner/WebTestDelegate.h"
15 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 17 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
16 #include "content/shell/renderer/test_runner/accessibility_controller.h" 18 #include "content/shell/renderer/test_runner/accessibility_controller.h"
17 #include "content/shell/renderer/test_runner/event_sender.h" 19 #include "content/shell/renderer/test_runner/event_sender.h"
18 #include "content/shell/renderer/test_runner/mock_color_chooser.h" 20 #include "content/shell/renderer/test_runner/mock_color_chooser.h"
19 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" 21 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
20 #include "content/shell/renderer/test_runner/mock_web_push_client.h" 22 #include "content/shell/renderer/test_runner/mock_web_push_client.h"
21 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" 23 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h"
22 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h" 24 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 return result; 308 return result;
307 } 309 }
308 } 310 }
309 311
310 WebTestProxyBase::WebTestProxyBase() 312 WebTestProxyBase::WebTestProxyBase()
311 : test_interfaces_(NULL), 313 : test_interfaces_(NULL),
312 delegate_(NULL), 314 delegate_(NULL),
313 web_widget_(NULL), 315 web_widget_(NULL),
314 spellcheck_(new SpellCheckClient(this)), 316 spellcheck_(new SpellCheckClient(this)),
315 chooser_count_(0) { 317 chooser_count_(0) {
318 // TODO(enne): using the scheduler introduces additional composite steps
319 // that create flakiness. This should go away eventually.
320 base::CommandLine::ForCurrentProcess()->AppendSwitch(
321 switches::kDisableSingleThreadProxyScheduler);
316 Reset(); 322 Reset();
317 } 323 }
318 324
319 WebTestProxyBase::~WebTestProxyBase() { 325 WebTestProxyBase::~WebTestProxyBase() {
320 test_interfaces_->WindowClosed(this); 326 test_interfaces_->WindowClosed(this);
321 // Tests must wait for readback requests to finish before notifying that 327 // Tests must wait for readback requests to finish before notifying that
322 // they are done. 328 // they are done.
323 CHECK_EQ(0u, composite_and_readback_callbacks_.size()); 329 CHECK_EQ(0u, composite_and_readback_callbacks_.size());
324 } 330 }
325 331
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 if (!push_client_.get()) 1260 if (!push_client_.get())
1255 push_client_.reset(new MockWebPushClient); 1261 push_client_.reset(new MockWebPushClient);
1256 return push_client_.get(); 1262 return push_client_.get();
1257 } 1263 }
1258 1264
1259 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { 1265 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() {
1260 return GetPushClientMock(); 1266 return GetPushClientMock();
1261 } 1267 }
1262 1268
1263 } // namespace content 1269 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | content/test/web_layer_tree_view_impl_for_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698