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

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

Issue 382093002: WebTestProxy should explode if readback requests are unhandled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | 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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 : test_interfaces_(NULL), 312 : test_interfaces_(NULL),
313 delegate_(NULL), 313 delegate_(NULL),
314 web_widget_(NULL), 314 web_widget_(NULL),
315 spellcheck_(new SpellCheckClient(this)), 315 spellcheck_(new SpellCheckClient(this)),
316 chooser_count_(0) { 316 chooser_count_(0) {
317 Reset(); 317 Reset();
318 } 318 }
319 319
320 WebTestProxyBase::~WebTestProxyBase() { 320 WebTestProxyBase::~WebTestProxyBase() {
321 test_interfaces_->windowClosed(this); 321 test_interfaces_->windowClosed(this);
322 // Tests must wait for readback requests to finish before notifying that
323 // they are done.
324 CHECK_EQ(0u, composite_and_readback_callbacks_.size());
322 } 325 }
323 326
324 void WebTestProxyBase::SetInterfaces(WebTestInterfaces* interfaces) { 327 void WebTestProxyBase::SetInterfaces(WebTestInterfaces* interfaces) {
325 test_interfaces_ = interfaces->testInterfaces(); 328 test_interfaces_ = interfaces->testInterfaces();
326 test_interfaces_->windowOpened(this); 329 test_interfaces_->windowOpened(this);
327 } 330 }
328 331
329 void WebTestProxyBase::SetDelegate(WebTestDelegate* delegate) { 332 void WebTestProxyBase::SetDelegate(WebTestDelegate* delegate) {
330 delegate_ = delegate; 333 delegate_ = delegate;
331 spellcheck_->setDelegate(delegate); 334 spellcheck_->setDelegate(delegate);
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 if (!push_client_.get()) 1242 if (!push_client_.get())
1240 push_client_.reset(new MockWebPushClient); 1243 push_client_.reset(new MockWebPushClient);
1241 return push_client_.get(); 1244 return push_client_.get();
1242 } 1245 }
1243 1246
1244 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() { 1247 blink::WebPushClient* WebTestProxyBase::GetWebPushClient() {
1245 return GetPushClientMock(); 1248 return GetPushClientMock();
1246 } 1249 }
1247 1250
1248 } // namespace content 1251 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698