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

Side by Side Diff: content/shell/browser/webkit_test_controller.cc

Issue 162903002: Remove WebKitTestController::TimeoutHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/shell/browser/webkit_test_controller.h ('k') | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/webkit_test_controller.h" 5 #include "content/shell/browser/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 450 }
451 } 451 }
452 452
453 void WebKitTestController::OnGpuProcessCrashed( 453 void WebKitTestController::OnGpuProcessCrashed(
454 base::TerminationStatus exit_code) { 454 base::TerminationStatus exit_code) {
455 DCHECK(CalledOnValidThread()); 455 DCHECK(CalledOnValidThread());
456 printer_->AddErrorMessage("#CRASHED - gpu"); 456 printer_->AddErrorMessage("#CRASHED - gpu");
457 DiscardMainWindow(); 457 DiscardMainWindow();
458 } 458 }
459 459
460 void WebKitTestController::TimeoutHandler() {
461 DCHECK(CalledOnValidThread());
462 printer_->AddErrorMessage(
463 "FAIL: Timed out waiting for notifyDone to be called");
464 DiscardMainWindow();
465 }
466
467 void WebKitTestController::DiscardMainWindow() { 460 void WebKitTestController::DiscardMainWindow() {
468 // If we're running a test, we need to close all windows and exit the message 461 // If we're running a test, we need to close all windows and exit the message
469 // loop. Otherwise, we're already outside of the message loop, and we just 462 // loop. Otherwise, we're already outside of the message loop, and we just
470 // discard the main window. 463 // discard the main window.
471 WebContentsObserver::Observe(NULL); 464 WebContentsObserver::Observe(NULL);
472 if (test_phase_ != BETWEEN_TESTS) { 465 if (test_phase_ != BETWEEN_TESTS) {
473 Shell::CloseAllWindows(); 466 Shell::CloseAllWindows();
474 base::MessageLoop::current()->PostTask(FROM_HERE, 467 base::MessageLoop::current()->PostTask(FROM_HERE,
475 base::MessageLoop::QuitClosure()); 468 base::MessageLoop::QuitClosure());
476 test_phase_ = CLEAN_UP; 469 test_phase_ = CLEAN_UP;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 printer_->AddErrorMessage( 674 printer_->AddErrorMessage(
682 base::StringPrintf(" Number of live documents: %d", 675 base::StringPrintf(" Number of live documents: %d",
683 result.number_of_live_documents)); 676 result.number_of_live_documents));
684 printer_->AddErrorMessage( 677 printer_->AddErrorMessage(
685 base::StringPrintf(" Number of live nodes: %d", 678 base::StringPrintf(" Number of live nodes: %d",
686 result.number_of_live_nodes)); 679 result.number_of_live_nodes));
687 DiscardMainWindow(); 680 DiscardMainWindow();
688 } 681 }
689 682
690 } // namespace content 683 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/browser/webkit_test_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698