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

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

Issue 171079: more linux automation porting: SendKeyPressNotifyWhenDone... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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 | Annotate | Revision Log
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/logging.h" 10 #include "base/logging.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/rand_util.h" 12 #include "base/rand_util.h"
12 #include "base/string_util.h" 13 #include "base/string_util.h"
13 #include "base/sys_info.h" 14 #include "base/sys_info.h"
14 #include "base/time.h" 15 #include "base/time.h"
15 #include "chrome/app/chrome_dll_resource.h" 16 #include "chrome/app/chrome_dll_resource.h"
16 #include "chrome/browser/browser_process.h" 17 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/character_encoding.h" 18 #include "chrome/browser/character_encoding.h"
18 #include "chrome/browser/view_ids.h" 19 #include "chrome/browser/view_ids.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 482
482 bool AutomatedUITest::OpenViewPasswordsDialog() { 483 bool AutomatedUITest::OpenViewPasswordsDialog() {
483 return RunCommandAsync(IDC_VIEW_PASSWORDS); 484 return RunCommandAsync(IDC_VIEW_PASSWORDS);
484 } 485 }
485 486
486 bool AutomatedUITest::Options() { 487 bool AutomatedUITest::Options() {
487 return RunCommandAsync(IDC_OPTIONS); 488 return RunCommandAsync(IDC_OPTIONS);
488 } 489 }
489 490
490 bool AutomatedUITest::PressDownArrow() { 491 bool AutomatedUITest::PressDownArrow() {
491 return SimulateKeyPressInActiveWindow(VK_DOWN, 0); 492 return SimulateKeyPressInActiveWindow(base::VKEY_DOWN, 0);
492 } 493 }
493 494
494 bool AutomatedUITest::PressEnterKey() { 495 bool AutomatedUITest::PressEnterKey() {
495 return SimulateKeyPressInActiveWindow(VK_RETURN, 0); 496 return SimulateKeyPressInActiveWindow(base::VKEY_RETURN, 0);
496 } 497 }
497 498
498 bool AutomatedUITest::PressEscapeKey() { 499 bool AutomatedUITest::PressEscapeKey() {
499 return SimulateKeyPressInActiveWindow(VK_ESCAPE, 0); 500 return SimulateKeyPressInActiveWindow(base::VKEY_ESCAPE, 0);
500 } 501 }
501 502
502 bool AutomatedUITest::PressPageDown() { 503 bool AutomatedUITest::PressPageDown() {
503 return SimulateKeyPressInActiveWindow(VK_PRIOR, 0); 504 return SimulateKeyPressInActiveWindow(base::VKEY_PRIOR, 0);
504 } 505 }
505 506
506 bool AutomatedUITest::PressPageUp() { 507 bool AutomatedUITest::PressPageUp() {
507 return SimulateKeyPressInActiveWindow(VK_NEXT, 0); 508 return SimulateKeyPressInActiveWindow(base::VKEY_NEXT, 0);
508 } 509 }
509 510
510 bool AutomatedUITest::PressSpaceBar() { 511 bool AutomatedUITest::PressSpaceBar() {
511 return SimulateKeyPressInActiveWindow(VK_SPACE, 0); 512 return SimulateKeyPressInActiveWindow(base::VKEY_SPACE, 0);
512 } 513 }
513 514
514 bool AutomatedUITest::PressTabKey() { 515 bool AutomatedUITest::PressTabKey() {
515 return SimulateKeyPressInActiveWindow(VK_TAB, 0); 516 return SimulateKeyPressInActiveWindow(base::VKEY_TAB, 0);
516 } 517 }
517 518
518 bool AutomatedUITest::PressUpArrow() { 519 bool AutomatedUITest::PressUpArrow() {
519 return SimulateKeyPressInActiveWindow(VK_UP, 0); 520 return SimulateKeyPressInActiveWindow(base::VKEY_UP, 0);
520 } 521 }
521 522
522 bool AutomatedUITest::SelectNextTab() { 523 bool AutomatedUITest::SelectNextTab() {
523 return RunCommandAsync(IDC_SELECT_NEXT_TAB); 524 return RunCommandAsync(IDC_SELECT_NEXT_TAB);
524 } 525 }
525 526
526 bool AutomatedUITest::SelectPreviousTab() { 527 bool AutomatedUITest::SelectPreviousTab() {
527 return RunCommandAsync(IDC_SELECT_PREVIOUS_TAB); 528 return RunCommandAsync(IDC_SELECT_PREVIOUS_TAB);
528 } 529 }
529 530
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 } 781 }
781 } 782 }
782 783
783 TEST_F(AutomatedUITest, TheOneAndOnlyTest) { 784 TEST_F(AutomatedUITest, TheOneAndOnlyTest) {
784 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); 785 const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
785 if (parsed_command_line.HasSwitch(kReproSwitch)) 786 if (parsed_command_line.HasSwitch(kReproSwitch))
786 RunReproduction(); 787 RunReproduction();
787 else 788 else
788 RunAutomatedUITest(); 789 RunAutomatedUITest();
789 } 790 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_bar_view_test.cc ('k') | chrome/test/automation/automation_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698