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

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

Issue 3069014: Convert a bunch of easy AppendSwitchWithValue to *ASCII. (Closed)
Patch Set: fix Created 10 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) 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 newpath.append(dir.value()); 608 newpath.append(dir.value());
609 setenv(kPythonPath, newpath.c_str(), 1); 609 setenv(kPythonPath, newpath.c_str(), 1);
610 } 610 }
611 #endif 611 #endif
612 } 612 }
613 613
614 } // anonymous namespace 614 } // anonymous namespace
615 615
616 TestWebSocketServer::TestWebSocketServer(const FilePath& root_directory) { 616 TestWebSocketServer::TestWebSocketServer(const FilePath& root_directory) {
617 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); 617 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine());
618 cmd_line->AppendSwitchWithValue("server", "start"); 618 cmd_line->AppendSwitchASCII("server", "start");
619 cmd_line->AppendSwitch("chromium"); 619 cmd_line->AppendSwitch("chromium");
620 cmd_line->AppendSwitch("register_cygwin"); 620 cmd_line->AppendSwitch("register_cygwin");
621 cmd_line->AppendSwitchPath("root", root_directory); 621 cmd_line->AppendSwitchPath("root", root_directory);
622 temp_dir_.CreateUniqueTempDir(); 622 temp_dir_.CreateUniqueTempDir();
623 websocket_pid_file_ = temp_dir_.path().AppendASCII("websocket.pid"); 623 websocket_pid_file_ = temp_dir_.path().AppendASCII("websocket.pid");
624 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); 624 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_);
625 SetPythonPath(); 625 SetPythonPath();
626 base::LaunchApp(*cmd_line.get(), true, false, NULL); 626 base::LaunchApp(*cmd_line.get(), true, false, NULL);
627 } 627 }
628 628
(...skipping 25 matching lines...) Expand all
654 script_path = script_path.AppendASCII("Scripts"); 654 script_path = script_path.AppendASCII("Scripts");
655 script_path = script_path.AppendASCII("new-run-webkit-websocketserver"); 655 script_path = script_path.AppendASCII("new-run-webkit-websocketserver");
656 656
657 CommandLine* cmd_line = CreatePythonCommandLine(); 657 CommandLine* cmd_line = CreatePythonCommandLine();
658 cmd_line->AppendLooseValue(script_path.ToWStringHack()); 658 cmd_line->AppendLooseValue(script_path.ToWStringHack());
659 return cmd_line; 659 return cmd_line;
660 } 660 }
661 661
662 TestWebSocketServer::~TestWebSocketServer() { 662 TestWebSocketServer::~TestWebSocketServer() {
663 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); 663 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine());
664 cmd_line->AppendSwitchWithValue("server", "stop"); 664 cmd_line->AppendSwitchASCII("server", "stop");
665 cmd_line->AppendSwitch("chromium"); 665 cmd_line->AppendSwitch("chromium");
666 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); 666 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_);
667 base::LaunchApp(*cmd_line.get(), true, false, NULL); 667 base::LaunchApp(*cmd_line.get(), true, false, NULL);
668 } 668 }
669 669
670 } // namespace ui_test_utils 670 } // namespace ui_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698