summaryrefslogtreecommitdiffstats
path: root/chrome/test/interactive_ui
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:51:02 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:51:02 +0000
commit40e59f901bc45d009b01b5252dc1e6140ba67642 (patch)
tree880793e36522e87653c88b867b6e166d2a8d33c2 /chrome/test/interactive_ui
parent34831e0d903dc77863f64096e73f136f4742269b (diff)
downloadchromium_src-40e59f901bc45d009b01b5252dc1e6140ba67642.zip
chromium_src-40e59f901bc45d009b01b5252dc1e6140ba67642.tar.gz
chromium_src-40e59f901bc45d009b01b5252dc1e6140ba67642.tar.bz2
Attempt 2 at landing bookmark menus.
The build breakage was the result of a bad ifdef in MenuController, specifically around the OnKeyDown method. BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/173517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/interactive_ui')
-rw-r--r--chrome/test/interactive_ui/view_event_test_base.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/test/interactive_ui/view_event_test_base.cc b/chrome/test/interactive_ui/view_event_test_base.cc
index a1203d5..24db9c5 100644
--- a/chrome/test/interactive_ui/view_event_test_base.cc
+++ b/chrome/test/interactive_ui/view_event_test_base.cc
@@ -4,7 +4,9 @@
#include "chrome/test/interactive_ui/view_event_test_base.h"
+#if defined(OS_WIN)
#include <ole2.h>
+#endif
#include "base/message_loop.h"
#include "chrome/browser/automation/ui_controls.h"
@@ -50,9 +52,11 @@ ViewEventTestBase::ViewEventTestBase() : window_(NULL), content_view_(NULL) { }
void ViewEventTestBase::Done() {
MessageLoop::current()->Quit();
+#if defined(OS_WIN)
// We need to post a message to tickle the Dispatcher getting called and
// exiting out of the nested loop. Without this the quit never runs.
PostMessage(window_->GetNativeWindow(), WM_USER, 0, 0);
+#endif
// If we're in a nested message loop, as is the case with menus, we need
// to quit twice. The second quit does that for us.
@@ -61,16 +65,24 @@ void ViewEventTestBase::Done() {
}
void ViewEventTestBase::SetUp() {
+#if defined(OS_WIN)
OleInitialize(NULL);
+#endif
window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(), this);
}
void ViewEventTestBase::TearDown() {
if (window_) {
+#if defined(OS_WIN)
DestroyWindow(window_->GetNativeWindow());
+#else
+ gtk_widget_destroy(GTK_WIDGET(window_->GetNativeWindow()));
+#endif
window_ = NULL;
}
+#if defined(OS_WIN)
OleUninitialize();
+#endif
}
views::View* ViewEventTestBase::GetContentsView() {
@@ -89,7 +101,9 @@ void ViewEventTestBase::StartMessageLoopAndRunTest() {
window_->Show();
// Make sure the window is the foreground window, otherwise none of the
// mouse events are going to be targeted correctly.
+#if defined(OS_WIN)
SetForegroundWindow(window_->GetNativeWindow());
+#endif
// Flush any pending events to make sure we start with a clean slate.
MessageLoop::current()->RunAllPending();