diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 06:01:13 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-30 06:01:13 +0000 |
commit | 39b16c2480c50d79459bc79eaf82d51efdd619c1 (patch) | |
tree | 96df97922378d5e90bbfb58b9a2b7212569807b1 /chrome | |
parent | 0c605fe33535d66b6a0d45f9e32b9ca9ae1e1a5c (diff) | |
download | chromium_src-39b16c2480c50d79459bc79eaf82d51efdd619c1.zip chromium_src-39b16c2480c50d79459bc79eaf82d51efdd619c1.tar.gz chromium_src-39b16c2480c50d79459bc79eaf82d51efdd619c1.tar.bz2 |
Use an integer for the port parameter to the UI test HTTP server.
Review URL: http://codereview.chromium.org/2884054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/test/automation/extension_proxy_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/test/nacl/nacl_test.cc | 2 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.cc | 9 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 4 |
4 files changed, 8 insertions, 9 deletions
diff --git a/chrome/test/automation/extension_proxy_uitest.cc b/chrome/test/automation/extension_proxy_uitest.cc index a388bbf..992c22e 100644 --- a/chrome/test/automation/extension_proxy_uitest.cc +++ b/chrome/test/automation/extension_proxy_uitest.cc @@ -109,7 +109,7 @@ TEST_F(ExtensionProxyUITest, DISABLED_ExecuteBrowserActionInActiveTabAsync) { // The root directory for the http server does not matter in this case, // but we have to pick something. PathService::Get(chrome::DIR_TEST_DATA, &path); - StartHttpServerWithPort(path, L"1365"); + StartHttpServerWithPort(path, 1365); GURL localhost = GURL("http://localhost:1365"); NavigateToURL(localhost); diff --git a/chrome/test/nacl/nacl_test.cc b/chrome/test/nacl/nacl_test.cc index a2c0afb..ecad2e8 100644 --- a/chrome/test/nacl/nacl_test.cc +++ b/chrome/test/nacl/nacl_test.cc @@ -87,7 +87,7 @@ void NaClTest::SetUp() { UITest::SetUp(); - StartHttpServerWithPort(nacl_test_dir, L"5103"); + StartHttpServerWithPort(nacl_test_dir, 5103); } void NaClTest::TearDown() { diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index d088661..dde980e 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -327,11 +327,11 @@ static void RunCommand(const CommandLine& cmd_line) { } void UITestBase::StartHttpServer(const FilePath& root_directory) { - StartHttpServerWithPort(root_directory, L""); + StartHttpServerWithPort(root_directory, 0); } void UITestBase::StartHttpServerWithPort(const FilePath& root_directory, - const std::wstring& port) { + int port) { scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine()); ASSERT_TRUE(cmd_line.get()); cmd_line->AppendSwitchASCII("server", "start"); @@ -346,9 +346,8 @@ void UITestBase::StartHttpServerWithPort(const FilePath& root_directory, cmd_line->AppendSwitch("run_background"); #endif - if (!port.empty()) { - cmd_line->AppendSwitchWithValue("port", port); - } + if (port) + cmd_line->AppendSwitchASCII("port", IntToString(port)); RunCommand(*cmd_line.get()); } diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index 01e2e79..6a09a26 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -487,8 +487,8 @@ class UITestBase { void StartHttpServer(const FilePath& root_directory); // Launches local http server on the specified port. - void StartHttpServerWithPort(const FilePath& root_directory, - const std::wstring& port); + void StartHttpServerWithPort(const FilePath& root_directory, int port); + void StopHttpServer(); // Prints IO performance data for use by perf graphs. |