summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 16:21:34 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-27 16:21:34 +0000
commit6a5670d2fa75f36a9a51eef48e1ed2bd710f36f8 (patch)
treeed4e2c28b39cf87b8dd73fc113ab4d35a7136e91 /chrome/test
parente1048992f130a71c329bd988048e103f5d5781e5 (diff)
downloadchromium_src-6a5670d2fa75f36a9a51eef48e1ed2bd710f36f8.zip
chromium_src-6a5670d2fa75f36a9a51eef48e1ed2bd710f36f8.tar.gz
chromium_src-6a5670d2fa75f36a9a51eef48e1ed2bd710f36f8.tar.bz2
Revert 30194 - Makes session restore on Chrome OS restore popups.
BUG=18862 TEST=none Review URL: http://codereview.chromium.org/337030 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/335047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_test_base.cc3
-rw-r--r--chrome/test/automation/automation_messages_internal.h10
-rw-r--r--chrome/test/automation/automation_proxy.cc6
-rw-r--r--chrome/test/automation/automation_proxy.h8
-rw-r--r--chrome/test/automation/browser_proxy.cc33
-rw-r--r--chrome/test/automation/browser_proxy.h11
6 files changed, 9 insertions, 62 deletions
diff --git a/chrome/test/automated_ui_tests/automated_ui_test_base.cc b/chrome/test/automated_ui_tests/automated_ui_test_base.cc
index 328a411..9880fd3 100644
--- a/chrome/test/automated_ui_tests/automated_ui_test_base.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_test_base.cc
@@ -261,8 +261,7 @@ bool AutomatedUITestBase::Home() {
bool AutomatedUITestBase::OpenAndActivateNewBrowserWindow(
scoped_refptr<BrowserProxy>* previous_browser) {
- if (!automation()->OpenNewBrowserWindow(BrowserProxy::TYPE_NORMAL,
- true /* SW_SHOWNORMAL */)) {
+ if (!automation()->OpenNewBrowserWindow(true /* SW_SHOWNORMAL */)) {
LogWarningMessage("failed_to_open_new_browser_window");
return false;
}
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index f9253c5..69e9c51 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -133,11 +133,6 @@ IPC_BEGIN_MESSAGES(Automation)
// request failed.
IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_TabCount, int, int)
- // This message requests the type of the window with the given handle. The
- // return value contains the type (Browser::Type), or -1 if the request
- // failed.
- IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_Type, int, int)
-
// This message requests the handle of the tab with the given (zero-based)
// index in the given app window. First parameter specifies the given window
// handle, second specifies the given tab_index. On error, the returned handle
@@ -369,9 +364,8 @@ IPC_BEGIN_MESSAGES(Automation)
int /* view_handle */)
// Opens a new browser window.
- IPC_SYNC_MESSAGE_ROUTED2_0(AutomationMsg_OpenNewBrowserWindow,
- int /* Type (Browser::Type) */,
- bool /* show */ )
+ IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_OpenNewBrowserWindow,
+ bool /* show */ )
// This message requests the handle (int64 app-unique identifier) of the
// current active top window. On error, the returned handle value is 0.
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 0a758a5..4658bf3 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -485,10 +485,8 @@ void AutomationProxy::InvalidateHandle(const IPC::Message& message) {
}
}
-bool AutomationProxy::OpenNewBrowserWindow(BrowserProxy::Type type,
- bool show) {
- return Send(new AutomationMsg_OpenNewBrowserWindow(0, static_cast<int>(type),
- show));
+bool AutomationProxy::OpenNewBrowserWindow(bool show) {
+ return Send(new AutomationMsg_OpenNewBrowserWindow(0, show));
}
scoped_refptr<TabProxy> AutomationProxy::CreateExternalTab(
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index 6825518..cf40606 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -17,7 +17,6 @@
#include "base/waitable_event.h"
#include "chrome/test/automation/automation_constants.h"
#include "chrome/test/automation/automation_handle_tracker.h"
-#include "chrome/test/automation/browser_proxy.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel_proxy.h"
#include "ipc/ipc_message.h"
@@ -87,9 +86,10 @@ class AutomationProxy : public IPC::Channel::Listener,
// Returns true if the load is successful.
bool WaitForInitialNewTabUILoad(int* load_time);
- // Open a new browser window of type |type|, returning true on success. |show|
- // identifies whether the window should be shown. Returns true on success.
- bool OpenNewBrowserWindow(BrowserProxy::Type type, bool show);
+ // Open a new browser window, returning true on success. |show|
+ // identifies whether the window should be shown.
+ // False likely indicates an IPC error.
+ bool OpenNewBrowserWindow(bool show);
// Fills the number of open browser windows into the given variable, returning
// true on success. False likely indicates an IPC error.
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index ad6c8ff..6543b26 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -175,39 +175,6 @@ bool BrowserProxy::GetTabCountWithTimeout(int* num_tabs, uint32 timeout_ms,
return succeeded;
}
-bool BrowserProxy::GetType(Type* type) const {
- if (!is_valid())
- return false;
-
- if (!type) {
- NOTREACHED();
- return false;
- }
-
- int type_as_int;
- bool succeeded = sender_->SendWithTimeout(new AutomationMsg_Type(
- 0, handle_, &type_as_int), base::kNoTimeout, NULL);
-
- switch (type_as_int) {
- case 0:
- *type = TYPE_NORMAL;
- break;
- case 1:
- *type = TYPE_POPUP;
- break;
- case 2:
- *type = TYPE_APP;
- break;
- case 3:
- *type = TYPE_APP_POPUP;
- break;
- default:
- return false;
- }
-
- return succeeded;
-}
-
bool BrowserProxy::ApplyAccelerator(int id) {
return RunCommandAsync(id);
}
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index 447a949..05b1b534 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -31,13 +31,6 @@ namespace gfx {
// any subsequent calls will return false immediately.
class BrowserProxy : public AutomationResourceProxy {
public:
- enum Type {
- TYPE_NORMAL = 0,
- TYPE_POPUP = 1,
- TYPE_APP = 2,
- TYPE_APP_POPUP = TYPE_APP | TYPE_POPUP,
- };
-
BrowserProxy(AutomationMessageSender* sender,
AutomationHandleTracker* tracker,
int handle)
@@ -91,10 +84,6 @@ class BrowserProxy : public AutomationResourceProxy {
bool GetTabCountWithTimeout(int* num_tabs, uint32 timeout_ms,
bool* is_timeout) const;
- // Returns the type of the given window. Returns true if the call was
- // successful.
- bool GetType(Type* type) const;
-
// Returns the TabProxy for the tab at the given index, transferring
// ownership of the pointer to the caller. On failure, returns NULL.
//