summaryrefslogtreecommitdiffstats
path: root/chrome/browser/blocked_popup_container_interactive_uitest.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:14:41 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 22:14:41 +0000
commitfc2e0870089a2cf644e29ec14e58f3bc6168e591 (patch)
tree11cea988309da72f2efabb6bacbee60e07977c2d /chrome/browser/blocked_popup_container_interactive_uitest.cc
parent7bd394d220e29b212b9480cb8a7f4986cb8275ce (diff)
downloadchromium_src-fc2e0870089a2cf644e29ec14e58f3bc6168e591.zip
chromium_src-fc2e0870089a2cf644e29ec14e58f3bc6168e591.tar.gz
chromium_src-fc2e0870089a2cf644e29ec14e58f3bc6168e591.tar.bz2
More interactive test porting for Linux.
Also fix a bug in the Windows implementation of SendMouseMoveNotifyWhenDone where the task would never be run if the cursor was already in the destination position before the call. BUG=19076 BUG=19881 Review URL: http://codereview.chromium.org/174201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/blocked_popup_container_interactive_uitest.cc')
-rw-r--r--chrome/browser/blocked_popup_container_interactive_uitest.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/chrome/browser/blocked_popup_container_interactive_uitest.cc b/chrome/browser/blocked_popup_container_interactive_uitest.cc
index 44dabb3..874fd72 100644
--- a/chrome/browser/blocked_popup_container_interactive_uitest.cc
+++ b/chrome/browser/blocked_popup_container_interactive_uitest.cc
@@ -61,7 +61,7 @@ class BlockedPopupContainerInteractiveTest : public UITest {
scoped_refptr<TabProxy> tab_;
};
-TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_TestOpenAndResizeTo) {
+TEST_F(BlockedPopupContainerInteractiveTest, TestOpenAndResizeTo) {
NavigateMainTabTo(L"constrained_window_onload_resizeto.html");
SimulateClickInCenterOf(window_);
@@ -100,12 +100,17 @@ TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_TestOpenAndResizeTo) {
ASSERT_TRUE(popup_window->GetViewBoundsWithTimeout(
VIEW_ID_TAB_CONTAINER, &rect, false, 1000, &is_timeout));
ASSERT_FALSE(is_timeout);
- EXPECT_LT(rect.width(), 200);
EXPECT_LT(rect.height(), 200);
+#if defined(OS_LINUX)
+ // On Linux we may run in an environment where there is no window frame. In
+ // this case our width might be exactly 200. The height will still be less
+ // because we have to show the location bar.
+ EXPECT_LE(rect.width(), 200);
+#else
+ EXPECT_LT(rect.width(), 200);
+#endif
}
-// TODO(estade): port.
-#if !defined(OS_LINUX)
// Helper function used to get the number of blocked popups out of the window
// title.
bool ParseCountOutOfTitle(const std::wstring& title, int* output) {
@@ -128,7 +133,7 @@ bool ParseCountOutOfTitle(const std::wstring& title, int* output) {
// Tests that in the window.open() equivalent of a fork bomb, we stop building
// windows.
-TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_DontSpawnEndlessPopups) {
+TEST_F(BlockedPopupContainerInteractiveTest, DontSpawnEndlessPopups) {
NavigateMainTabTo(L"infinite_popups.html");
SimulateClickInCenterOf(window_);
@@ -171,7 +176,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_DontSpawnEndlessPopups) {
// Make sure that we refuse to close windows when a constrained popup is
// displayed.
-TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_WindowOpenWindowClosePopup) {
+TEST_F(BlockedPopupContainerInteractiveTest, WindowOpenWindowClosePopup) {
NavigateMainTabTo(L"openclose_main.html");
SimulateClickInCenterOf(window_);
@@ -207,7 +212,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, BlockAlertFromBlockedPopup) {
ASSERT_EQ(1, popup_count);
}
-TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_ShowAlertFromNormalPopup) {
+TEST_F(BlockedPopupContainerInteractiveTest, ShowAlertFromNormalPopup) {
NavigateMainTabTo(L"show_alert.html");
SimulateClickInCenterOf(window_);
@@ -228,7 +233,7 @@ TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_ShowAlertFromNormalPopup)
// Make sure that window focus works while creating a popup window so that we
// don't
-TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_DontBreakOnBlur) {
+TEST_F(BlockedPopupContainerInteractiveTest, DontBreakOnBlur) {
NavigateMainTabTo(L"window_blur_test.html");
SimulateClickInCenterOf(window_);
@@ -238,4 +243,3 @@ TEST_F(BlockedPopupContainerInteractiveTest, DISABLED_DontBreakOnBlur) {
// We popup shouldn't be closed by the onblur handler.
ASSERT_FALSE(automation()->WaitForWindowCountToBecome(1, 1500));
}
-#endif