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

Side by Side Diff: chrome/test/automated_ui_tests/automated_ui_tests.cc

Issue 174015: Add automation call to wait for multiple navigations. (Closed)
Patch Set: backwards compatibility, properly done Created 11 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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 <fstream> 5 #include <fstream>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/keyboard_codes.h" 9 #include "base/keyboard_codes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 if (DidCrash(false)) 616 if (DidCrash(false))
617 break; 617 break;
618 } 618 }
619 return DoAction("PressEscapeKey") && return_value; 619 return DoAction("PressEscapeKey") && return_value;
620 } 620 }
621 621
622 bool AutomatedUITest::ForceCrash() { 622 bool AutomatedUITest::ForceCrash() {
623 scoped_refptr<TabProxy> tab(GetActiveTab()); 623 scoped_refptr<TabProxy> tab(GetActiveTab());
624 GURL test_url("about:crash"); 624 GURL test_url("about:crash");
625 bool did_timeout; 625 bool did_timeout;
626 tab->NavigateToURLWithTimeout(test_url, kDebuggingTimeoutMsec, &did_timeout); 626 tab->NavigateToURLWithTimeout(test_url, 1, kDebuggingTimeoutMsec,
627 &did_timeout);
627 if (!did_timeout) { 628 if (!did_timeout) {
628 AddInfoAttribute("expected_crash"); 629 AddInfoAttribute("expected_crash");
629 return false; 630 return false;
630 } 631 }
631 return true; 632 return true;
632 } 633 }
633 634
634 bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) { 635 bool AutomatedUITest::SimulateKeyPressInActiveWindow(wchar_t key, int flags) {
635 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); 636 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
636 if (window.get() == NULL) { 637 if (window.get() == NULL) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 } 785 }
785 } 786 }
786 787
787 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 788 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
788 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 789 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
789 if (parsed_command_line.HasSwitch(kReproSwitch)) 790 if (parsed_command_line.HasSwitch(kReproSwitch))
790 RunReproduction(); 791 RunReproduction();
791 else 792 else
792 RunAutomatedUITest(); 793 RunAutomatedUITest();
793 } 794 }
OLDNEW
« no previous file with comments | « chrome/test/automated_ui_tests/automated_ui_test_base.cc ('k') | chrome/test/automation/automation_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698