OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/test/ui_test_utils.h" | 5 #include "chrome/test/ui_test_utils.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 if (model->IsLoaded()) | 544 if (model->IsLoaded()) |
545 return; | 545 return; |
546 BookmarkLoadObserver observer; | 546 BookmarkLoadObserver observer; |
547 model->AddObserver(&observer); | 547 model->AddObserver(&observer); |
548 RunMessageLoop(); | 548 RunMessageLoop(); |
549 model->RemoveObserver(&observer); | 549 model->RemoveObserver(&observer); |
550 ASSERT_TRUE(model->IsLoaded()); | 550 ASSERT_TRUE(model->IsLoaded()); |
551 } | 551 } |
552 | 552 |
553 bool SendKeyPressSync(gfx::NativeWindow window, | 553 bool SendKeyPressSync(gfx::NativeWindow window, |
554 app::KeyboardCode key, | 554 base::KeyboardCode key, |
555 bool control, | 555 bool control, |
556 bool shift, | 556 bool shift, |
557 bool alt, | 557 bool alt, |
558 bool command) { | 558 bool command) { |
559 if (!ui_controls::SendKeyPressNotifyWhenDone( | 559 if (!ui_controls::SendKeyPressNotifyWhenDone( |
560 window, key, control, shift, alt, command, | 560 window, key, control, shift, alt, command, |
561 new MessageLoop::QuitTask())) { | 561 new MessageLoop::QuitTask())) { |
562 LOG(ERROR) << "ui_controls::SendKeyPressNotifyWhenDone failed"; | 562 LOG(ERROR) << "ui_controls::SendKeyPressNotifyWhenDone failed"; |
563 return false; | 563 return false; |
564 } | 564 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 675 |
676 TestWebSocketServer::~TestWebSocketServer() { | 676 TestWebSocketServer::~TestWebSocketServer() { |
677 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); | 677 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); |
678 cmd_line->AppendSwitchASCII("server", "stop"); | 678 cmd_line->AppendSwitchASCII("server", "stop"); |
679 cmd_line->AppendSwitch("chromium"); | 679 cmd_line->AppendSwitch("chromium"); |
680 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); | 680 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); |
681 base::LaunchApp(*cmd_line.get(), true, false, NULL); | 681 base::LaunchApp(*cmd_line.get(), true, false, NULL); |
682 } | 682 } |
683 | 683 |
684 } // namespace ui_test_utils | 684 } // namespace ui_test_utils |
OLD | NEW |