diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:05:11 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:05:11 +0000 |
commit | 9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff (patch) | |
tree | 11e6d28d263457e00395401c938ff5fb45d6eba6 /chrome/test | |
parent | 6920f5ac0d0ea336b79f02b5d36751d1043ace29 (diff) | |
download | chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.zip chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.tar.gz chromium_src-9c9c761a2e070a8a6eb00f22a4365fc6cc2e1eff.tar.bz2 |
Removes entirely dead code paths related to ConstrainedWindows.
- Removes parts of the interface that probably made sense at some time, but now only have a DLOG(INFO) as their implementation. Also remove their callers.
- Remove all usage of the ConstrainedWindowProxy interface in the automation system. It was *never* used.
- Rename constrianed_window_impl_interactive_uitests.cc to blocked_popup_container_interactive_uitest.cc. The test case hasn't tested code in constrained_window_impl.cc since the rewrite of the blocked popup system back last autumn.
Review URL: http://codereview.chromium.org/125160
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18498 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--[-rwxr-xr-x] | chrome/test/automation/automation_messages_internal.h | 24 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 3 | ||||
-rw-r--r-- | chrome/test/automation/constrained_window_proxy.cc | 44 | ||||
-rw-r--r-- | chrome/test/automation/constrained_window_proxy.h | 34 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 28 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 7 |
6 files changed, 1 insertions, 139 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 91961cf..4367a46 100755..100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -244,22 +244,6 @@ IPC_BEGIN_MESSAGES(Automation) int /* tab_handle */, int /* constrained_window_count */) - // This message requests the handle of the constrained window with the given - // (zero-based) index in the given tab. First parameter specifies the given - // tab handle, second specifies the given child_index. On error, the returned - // handle value is 0. - IPC_SYNC_MESSAGE_ROUTED2_1(AutomationMsg_ConstrainedWindow, - int, /* window_handle */ - int, /* child_index */ - int) /* constrained_handle */ - - // This message requests the the title of the constrained window with the - // given handle. The return value contains the size of the title string and - // title string. On error, this value should be -1 and empty string. Note - // that the title can be empty in which case the size would be 0. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_ConstrainedTitle, int, - int, std::wstring) - // This message requests the bounds of the specified View element in // window coordinates. // Request: @@ -667,14 +651,6 @@ IPC_BEGIN_MESSAGES(Automation) // exist. IPC_SYNC_MESSAGE_ROUTED0_1(AutomationMsg_LastActiveBrowserWindow, int) - // This message requests the bounds of a constrained window (relative to its - // containing TabContents). On an internal error, the boolean in the result - // will be set to false. - IPC_SYNC_MESSAGE_ROUTED1_2(AutomationMsg_ConstrainedWindowBounds, - int /* tab_handle */, - bool /* the requested window exists */, - gfx::Rect /* constrained_window_count */) - // This message notifies the AutomationProvider to save the page with given // handle. The first parameter is the handle to the tab resource. The second // parameter is the main HTML file name. The third parameter is the directory diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index 611eab5..eb6140a 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -17,7 +17,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/json_value_serializer.h" #include "chrome/test/automation/automation_proxy_uitest.h" -#include "chrome/test/automation/constrained_window_proxy.h" #include "chrome/test/automation/browser_proxy.h" #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/window_proxy.h" @@ -622,7 +621,7 @@ TEST_F(AutomationProxyTest3, FrameDocumentCanBeAccessed) { // TODO(port): Need to port constrained_window_proxy.* first. #if defined(OS_WIN) -TEST_F(AutomationProxyTest, ConstrainedWindowTest) { +TEST_F(AutomationProxyTest, BlockedPopupTest) { scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); ASSERT_TRUE(window.get()); diff --git a/chrome/test/automation/constrained_window_proxy.cc b/chrome/test/automation/constrained_window_proxy.cc deleted file mode 100644 index fd78c5b..0000000 --- a/chrome/test/automation/constrained_window_proxy.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "constrained_window_proxy.h" - -#include "chrome/test/automation/automation_messages.h" -#include "chrome/test/automation/automation_proxy.h" - -bool ConstrainedWindowProxy::GetTitle(std::wstring* title) const { - if (!is_valid()) - return false; - - if (!title) { - NOTREACHED(); - return false; - } - - int title_size_response = -1; - - sender_->Send(new AutomationMsg_ConstrainedTitle(0, handle_, - &title_size_response, - title)); - return title_size_response >= 0; -} - -bool ConstrainedWindowProxy::GetBoundsWithTimeout(gfx::Rect* bounds, - uint32 timeout_ms, - bool* is_timeout) { - if (!is_valid()) - return false; - - if (!bounds) { - NOTREACHED(); - return false; - } - - bool result = false; - - sender_->SendWithTimeout(new AutomationMsg_ConstrainedWindowBounds( - 0, handle_, &result, bounds), timeout_ms, NULL); - - return result; -} diff --git a/chrome/test/automation/constrained_window_proxy.h b/chrome/test/automation/constrained_window_proxy.h deleted file mode 100644 index cb0ff59..0000000 --- a/chrome/test/automation/constrained_window_proxy.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_TEST_AUTOMATION_CONSTRAINED_WINDOW_PROXY_H__ -#define CHROME_TEST_AUTOMATION_CONSTRAINED_WINDOW_PROXY_H__ - -#include <string> - -#include "chrome/test/automation/automation_handle_tracker.h" - -namespace gfx { -class Rect; -} - -class ConstrainedWindowProxy : public AutomationResourceProxy { -public: - ConstrainedWindowProxy(AutomationMessageSender* sender, - AutomationHandleTracker* tracker, - int handle) - : AutomationResourceProxy(tracker, sender, handle) {} - - virtual ~ConstrainedWindowProxy() {} - - bool GetTitle(std::wstring* title) const; - bool GetBoundsWithTimeout(gfx::Rect* bounds, - uint32 timeout_ms, - bool* is_timeout); - -private: - DISALLOW_EVIL_CONSTRUCTORS(ConstrainedWindowProxy); -}; - -#endif // CHROME_TEST_AUTOMATION_CONSTRAINED_WINDOW_PROXY_H__ diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index f81e23b..dea3a54 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -11,7 +11,6 @@ #include "chrome/test/automation/automation_constants.h" #include "chrome/test/automation/automation_messages.h" #include "chrome/test/automation/automation_proxy.h" -#include "chrome/test/automation/constrained_window_proxy.h" #include "googleurl/src/gurl.h" bool TabProxy::GetTabTitle(std::wstring* title) const { @@ -324,33 +323,6 @@ bool TabProxy::GetConstrainedWindowCount(int* count) const { 0, handle_, count)); } -scoped_refptr<ConstrainedWindowProxy> TabProxy::GetConstrainedWindow( - int window_index) const { - if (!is_valid()) - return NULL; - - int handle = 0; - if (!sender_->Send(new AutomationMsg_ConstrainedWindow(0, handle_, - window_index, - &handle))) - return NULL; - - if (handle == 0) - return NULL; - - ConstrainedWindowProxy* w = static_cast<ConstrainedWindowProxy*>( - tracker_->GetResource(handle)); - if (!w) { - w = new ConstrainedWindowProxy(sender_, tracker_, handle); - w->AddRef(); - } - - // Since there is no scoped_refptr::attach. - scoped_refptr<ConstrainedWindowProxy> result; - result.swap(&w); - return result; -} - bool TabProxy::WaitForChildWindowCountToChange(int count, int* new_count, int wait_timeout) { int intervals = std::min(wait_timeout/automation::kSleepTime, 1); diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 5366119..0f7bcc5 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -21,7 +21,6 @@ #include "chrome/test/automation/automation_constants.h" #include "chrome/test/automation/automation_handle_tracker.h" -class ConstrainedWindowProxy; class GURL; class Value; namespace IPC { @@ -55,12 +54,6 @@ class TabProxy : public AutomationResourceProxy { // Gets the number of constrained window for this tab. bool GetConstrainedWindowCount(int* count) const; - // Gets the proxy object for constrained window within this tab. Ownership - // for the returned object is transfered to the caller. Returns NULL on - // failure. - scoped_refptr<ConstrainedWindowProxy> GetConstrainedWindow( - int window_index) const; - // Executes a javascript in a frame's context whose xpath is provided as the // first parameter and extract the values from the resulting json string. // Examples: |