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

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: Asynchronous BeginMainFrame 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
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/MockWebSpeechRecognizer.h" 15 #include "content/shell/renderer/test_runner/MockWebSpeechRecognizer.h"
14 #include "content/shell/renderer/test_runner/SpellCheckClient.h" 16 #include "content/shell/renderer/test_runner/SpellCheckClient.h"
15 #include "content/shell/renderer/test_runner/TestCommon.h" 17 #include "content/shell/renderer/test_runner/TestCommon.h"
16 #include "content/shell/renderer/test_runner/TestInterfaces.h" 18 #include "content/shell/renderer/test_runner/TestInterfaces.h"
17 #include "content/shell/renderer/test_runner/TestPlugin.h" 19 #include "content/shell/renderer/test_runner/TestPlugin.h"
18 #include "content/shell/renderer/test_runner/WebTestDelegate.h" 20 #include "content/shell/renderer/test_runner/WebTestDelegate.h"
19 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 21 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
20 #include "content/shell/renderer/test_runner/accessibility_controller.h" 22 #include "content/shell/renderer/test_runner/accessibility_controller.h"
21 #include "content/shell/renderer/test_runner/event_sender.h" 23 #include "content/shell/renderer/test_runner/event_sender.h"
22 #include "content/shell/renderer/test_runner/mock_color_chooser.h" 24 #include "content/shell/renderer/test_runner/mock_color_chooser.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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 if (!push_client_.get()) 1263 if (!push_client_.get())
1258 push_client_.reset(new MockWebPushClient); 1264 push_client_.reset(new MockWebPushClient);
1259 return push_client_.get(); 1265 return push_client_.get();
1260 } 1266 }
1261 1267
1262 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { 1268 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() {
1263 return GetPushClientMock(); 1269 return GetPushClientMock();
1264 } 1270 }
1265 1271
1266 } // namespace content 1272 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698