diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 02:36:38 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 02:36:38 +0000 |
commit | 64b31ba0bc8d530b6a900f0fcf84e23da65bc883 (patch) | |
tree | f6649711ebe6e0096bf0a902fda28d4a153d7f29 /chrome/test/automated_ui_tests | |
parent | a8b1bc7935276f4c004ac4cffefa50f45a47c9ed (diff) | |
download | chromium_src-64b31ba0bc8d530b6a900f0fcf84e23da65bc883.zip chromium_src-64b31ba0bc8d530b6a900f0fcf84e23da65bc883.tar.gz chromium_src-64b31ba0bc8d530b6a900f0fcf84e23da65bc883.tar.bz2 |
GTK: First cut at tab dragging automation.
Also make tab dragging slightly more robust.
I tried really hard to avoid hackiness, but after many hours of wrestling with gtk and X, this is the best I could do. The main point of contention is that GTK (and our tab dragging code in particular) seems to be able to get X into a state where gdk_display_warp_pointer() doesn't send back any events (although it does move the X pointer). I tried to fix our code directly, but decided it was GTK that was broken. So I faked some mouse motion events to prod the tab dragging into working. This approach does not appear to be flaky, and is actually closer to the event stream that occurs when a user drags a tab than the obvious approach would be. (The tests themselves are somewhat flaky, but only due to WaitForURLDisplayedForTab() flakiness, which is a separate issue I'll look at later. The tests aren't on any buildbot for now so I'd like to leave them enabled.)
BUG=22182
TEST=--gtest_filter=AutomatedUITest.Drag*
Review URL: http://codereview.chromium.org/218017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automated_ui_tests')
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_test_base.cc | 6 | ||||
-rw-r--r-- | chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc | 10 |
2 files changed, 6 insertions, 10 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 81ed10e..9880fd3 100644 --- a/chrome/test/automated_ui_tests/automated_ui_test_base.cc +++ b/chrome/test/automated_ui_tests/automated_ui_test_base.cc @@ -17,12 +17,14 @@ AutomatedUITestBase::AutomatedUITestBase() {} AutomatedUITestBase::~AutomatedUITestBase() {} -void AutomatedUITestBase::LogErrorMessage(const std::string& error) {} +void AutomatedUITestBase::LogErrorMessage(const std::string& error) { +} void AutomatedUITestBase::LogWarningMessage(const std::string& warning) { } -void AutomatedUITestBase::LogInfoMessage(const std::string& info) {} +void AutomatedUITestBase::LogInfoMessage(const std::string& info) { +} void AutomatedUITestBase::SetUp() { UITest::SetUp(); diff --git a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc index f7ac5fc..e1d2e64 100644 --- a/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc +++ b/chrome/test/automated_ui_tests/automated_ui_test_interactive_test.cc @@ -7,12 +7,6 @@ #include "chrome/test/automation/tab_proxy.h" #include "chrome/test/ui/ui_test.h" -#if defined(OS_WINDOWS) -#define MAYBE(x) x -#else -#define MAYBE(x) DISABLED_##x -#endif - namespace { bool WaitForURLDisplayedForTab(BrowserProxy* browser, int tab_index, @@ -32,7 +26,7 @@ bool WaitForURLDisplayedForTab(BrowserProxy* browser, int tab_index, } // namespace -TEST_F(AutomatedUITestBase, MAYBE(DragOut)) { +TEST_F(AutomatedUITestBase, DragOut) { int tab_count; active_browser()->GetTabCount(&tab_count); ASSERT_EQ(1, tab_count); @@ -54,7 +48,7 @@ TEST_F(AutomatedUITestBase, MAYBE(DragOut)) { ASSERT_EQ(2, window_count); } -TEST_F(AutomatedUITestBase, MAYBE(DragLeftRight)) { +TEST_F(AutomatedUITestBase, DragLeftRight) { int tab_count; active_browser()->GetTabCount(&tab_count); ASSERT_EQ(1, tab_count); |