diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-09 19:48:37 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-09 19:48:37 +0000 |
commit | 2879092e01ea4ebb93c1b80925c81e059b24607b (patch) | |
tree | 53638b170c3c9c3146d13238d1ed20993cdb4257 /chrome/test/ui | |
parent | 12a6f036f3859f88b439dba009172f5c1dd03dc9 (diff) | |
download | chromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.zip chromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.tar.gz chromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.tar.bz2 |
Changing ForwardMessageToExternalHost to postMessage and passing a proper
MessageEvent object to the onmessage handler.
Also adding support for origin and target parameters. The origin parameter is
implicit but target can be specified when calling postMessage. If no target
is specified we default to "*".
At the moment I'm only allowing target == "*" messages to pass through since
I haven't implemented support for matching more complicated patterns :)
Review URL: http://codereview.chromium.org/40128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 7 | ||||
-rw-r--r-- | chrome/test/ui/ui_test.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 1861626..d9920c5 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -211,9 +211,14 @@ void UITest::InitializeTimeouts() { } } +AutomationProxy* UITest::CreateAutomationProxy(int execution_timeout) { + // By default we create a plain vanilla AutomationProxy. + return new AutomationProxy(execution_timeout); +} + void UITest::LaunchBrowserAndServer() { // Set up IPC testing interface server. - server_.reset(new AutomationProxy(command_execution_timeout_ms_)); + server_.reset(CreateAutomationProxy(command_execution_timeout_ms_)); LaunchBrowser(launch_arguments_, clear_profile_); if (wait_for_initial_loads_) diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index 794391b..2bd3b9e 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -71,6 +71,9 @@ class UITest : public testing::Test { // Launches the browser and IPC testing server. void LaunchBrowserAndServer(); + // Overridable so that derived classes can provide their own AutomationProxy. + virtual AutomationProxy* CreateAutomationProxy(int execution_timeout); + // Closes the browser and IPC testing server. void CloseBrowserAndServer(); |