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

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

Issue 441343002: Revert 287747 "Make SingleThreadProxy a SchedulerClient" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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"
11 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
12 #include "base/logging.h" 11 #include "base/logging.h"
13 #include "base/strings/stringprintf.h" 12 #include "base/strings/stringprintf.h"
14 #include "content/public/common/content_switches.h"
15 #include "content/shell/renderer/test_runner/TestInterfaces.h" 13 #include "content/shell/renderer/test_runner/TestInterfaces.h"
16 #include "content/shell/renderer/test_runner/TestPlugin.h" 14 #include "content/shell/renderer/test_runner/TestPlugin.h"
17 #include "content/shell/renderer/test_runner/WebTestDelegate.h" 15 #include "content/shell/renderer/test_runner/WebTestDelegate.h"
18 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 16 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
19 #include "content/shell/renderer/test_runner/accessibility_controller.h" 17 #include "content/shell/renderer/test_runner/accessibility_controller.h"
20 #include "content/shell/renderer/test_runner/event_sender.h" 18 #include "content/shell/renderer/test_runner/event_sender.h"
21 #include "content/shell/renderer/test_runner/mock_color_chooser.h" 19 #include "content/shell/renderer/test_runner/mock_color_chooser.h"
22 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h" 20 #include "content/shell/renderer/test_runner/mock_screen_orientation_client.h"
23 #include "content/shell/renderer/test_runner/mock_web_push_client.h" 21 #include "content/shell/renderer/test_runner/mock_web_push_client.h"
24 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h" 22 #include "content/shell/renderer/test_runner/mock_web_speech_recognizer.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 return result; 305 return result;
308 } 306 }
309 } 307 }
310 308
311 WebTestProxyBase::WebTestProxyBase() 309 WebTestProxyBase::WebTestProxyBase()
312 : test_interfaces_(NULL), 310 : test_interfaces_(NULL),
313 delegate_(NULL), 311 delegate_(NULL),
314 web_widget_(NULL), 312 web_widget_(NULL),
315 spellcheck_(new SpellCheckClient(this)), 313 spellcheck_(new SpellCheckClient(this)),
316 chooser_count_(0) { 314 chooser_count_(0) {
317 // TODO(enne): using the scheduler introduces additional composite steps
318 // that create flakiness. This should go away eventually.
319 base::CommandLine::ForCurrentProcess()->AppendSwitch(
320 switches::kDisableSingleThreadProxyScheduler);
321 Reset(); 315 Reset();
322 } 316 }
323 317
324 WebTestProxyBase::~WebTestProxyBase() { 318 WebTestProxyBase::~WebTestProxyBase() {
325 test_interfaces_->windowClosed(this); 319 test_interfaces_->windowClosed(this);
326 // Tests must wait for readback requests to finish before notifying that 320 // Tests must wait for readback requests to finish before notifying that
327 // they are done. 321 // they are done.
328 CHECK_EQ(0u, composite_and_readback_callbacks_.size()); 322 CHECK_EQ(0u, composite_and_readback_callbacks_.size());
329 } 323 }
330 324
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1257 if (!push_client_.get()) 1251 if (!push_client_.get())
1258 push_client_.reset(new MockWebPushClient); 1252 push_client_.reset(new MockWebPushClient);
1259 return push_client_.get(); 1253 return push_client_.get();
1260 } 1254 }
1261 1255
1262 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { 1256 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() {
1263 return GetPushClientMock(); 1257 return GetPushClientMock();
1264 } 1258 }
1265 1259
1266 } // namespace content 1260 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/render_widget.cc ('k') | trunk/src/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