summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 18:43:26 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 18:43:26 +0000
commit40dddd98e0001614e641052fc5bc9a0c68dfc129 (patch)
tree6a20c07ce11fa32e5daefbece32658d707dde4b0 /chrome/test/ui
parenta54e1291617e5cedb17feca98562b2e4f316f354 (diff)
downloadchromium_src-40dddd98e0001614e641052fc5bc9a0c68dfc129.zip
chromium_src-40dddd98e0001614e641052fc5bc9a0c68dfc129.tar.gz
chromium_src-40dddd98e0001614e641052fc5bc9a0c68dfc129.tar.bz2
This is a simple integration test that loads a simple nexe and verifies that Javascript can communicate with it. The required html, javascript and nexe files are checked in into the NaCl tree.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28796 Review URL: http://codereview.chromium.org/272005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.cc8
-rw-r--r--chrome/test/ui/ui_test.h4
2 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc
index 10f8b58..e028d14c 100644
--- a/chrome/test/ui/ui_test.cc
+++ b/chrome/test/ui/ui_test.cc
@@ -307,6 +307,11 @@ static void RunCommand(const CommandLine& cmd_line) {
}
void UITest::StartHttpServer(const FilePath& root_directory) {
+ StartHttpServerWithPort(root_directory, L"");
+}
+
+void UITest::StartHttpServerWithPort(const FilePath& root_directory,
+ const std::wstring& port) {
scoped_ptr<CommandLine> cmd_line(CreateHttpServerCommandLine());
ASSERT_TRUE(cmd_line.get());
cmd_line->AppendSwitchWithValue("server", "start");
@@ -321,6 +326,9 @@ void UITest::StartHttpServer(const FilePath& root_directory) {
cmd_line->AppendSwitch("run_background");
#endif
+ if (!port.empty()) {
+ cmd_line->AppendSwitchWithValue("port", port);
+ }
RunCommand(*cmd_line.get());
}
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 2ed3cf4..165d9e5 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -446,6 +446,10 @@ class UITest : public testing::Test {
// Synchronously launches local http server normally used to run LayoutTests.
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 StopHttpServer();
private: