diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 16:44:57 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-03 16:44:57 +0000 |
commit | 415ad48ad827f0a88645069f2bb731d497f5f23e (patch) | |
tree | a9efe67f99ae4625badca6c19848487e27bc5dad /chrome/test/automation/automation_proxy_uitest.cc | |
parent | bd745438c31d1646cfb1e99a419e7b17dc2b90d2 (diff) | |
download | chromium_src-415ad48ad827f0a88645069f2bb731d497f5f23e.zip chromium_src-415ad48ad827f0a88645069f2bb731d497f5f23e.tar.gz chromium_src-415ad48ad827f0a88645069f2bb731d497f5f23e.tar.bz2 |
This is the first of probably several patches trying to clean up the BlockedPopupContainer into something that can be cross-platform.
- BlokedPopupContainers are no longer ConstrainedWindows.
- There is now a cross platform base class that contains most of the model/controller logic. The view now inherits from it. This is an improvement.
Review URL: http://codereview.chromium.org/119006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/automation_proxy_uitest.cc')
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index cefef1fd..bb838dd 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -621,48 +621,9 @@ TEST_F(AutomationProxyTest, ConstrainedWindowTest) { ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); - int count; - ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); - - ASSERT_EQ(1, count); - - scoped_refptr<ConstrainedWindowProxy> cwindow = tab->GetConstrainedWindow(0); - ASSERT_TRUE(cwindow.get()); - - std::wstring title; - ASSERT_TRUE(cwindow->GetTitle(&title)); - std::wstring window_title = L"Pop-ups Blocked: 2"; - ASSERT_STREQ(window_title.c_str(), title.c_str()); + ASSERT_TRUE(tab->WaitForBlockedPopupCountToChangeTo(2, 5000)); } -TEST_F(AutomationProxyTest, CantEscapeByOnloadMoveto) { - scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); - ASSERT_TRUE(window.get()); - - scoped_refptr<TabProxy> tab(window->GetTab(0)); - ASSERT_TRUE(tab.get()); - - FilePath filename(test_data_directory_); - filename = filename.AppendASCII("constrained_files"); - filename = filename.AppendASCII("constrained_window_onload_moveto.html"); - - ASSERT_TRUE(tab->NavigateToURL(net::FilePathToFileURL(filename))); - - int count; - ASSERT_TRUE(tab->WaitForChildWindowCountToChange(0, &count, 5000)); - - ASSERT_EQ(1, count); - - scoped_refptr<ConstrainedWindowProxy> cwindow = tab->GetConstrainedWindow(0); - ASSERT_TRUE(cwindow.get()); - - gfx::Rect rect; - bool is_timeout = false; - ASSERT_TRUE(cwindow->GetBoundsWithTimeout(&rect, 1000, &is_timeout)); - ASSERT_FALSE(is_timeout); - ASSERT_NE(20, rect.x()); - ASSERT_NE(20, rect.y()); -} #endif // defined(OS_WIN) // TODO(port): Remove HWND if possible |