summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:12:59 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 20:12:59 +0000
commit345dd30a55dd5219c39a31df9621e715a8947924 (patch)
tree3562329aa4aac7361ff092ffb4976d28c59944a1 /chrome
parentf278f74b49f068b3bc1de49a0d90b33cb0d5c005 (diff)
downloadchromium_src-345dd30a55dd5219c39a31df9621e715a8947924.zip
chromium_src-345dd30a55dd5219c39a31df9621e715a8947924.tar.gz
chromium_src-345dd30a55dd5219c39a31df9621e715a8947924.tar.bz2
Reverts menu patch.
BUG=none TEST=none TBR=ben@chromium.org Review URL: http://codereview.chromium.org/173508 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/bookmark_bar_view_test.cc21
-rw-r--r--chrome/chrome.gyp23
-rw-r--r--chrome/test/interactive_ui/view_event_test_base.cc14
3 files changed, 10 insertions, 48 deletions
diff --git a/chrome/browser/views/bookmark_bar_view_test.cc b/chrome/browser/views/bookmark_bar_view_test.cc
index 751a1ec..3d683f6 100644
--- a/chrome/browser/views/bookmark_bar_view_test.cc
+++ b/chrome/browser/views/bookmark_bar_view_test.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/keyboard_codes.h"
#include "base/string_util.h"
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -68,7 +67,7 @@ class TestingPageNavigator : public PageNavigator {
class BookmarkBarViewEventTestBase : public ViewEventTestBase {
public:
BookmarkBarViewEventTestBase()
- : ViewEventTestBase(), model_(NULL), bb_view_(NULL) {
+ : ViewEventTestBase(), bb_view_(NULL), model_(NULL) {
}
virtual void SetUp() {
@@ -747,7 +746,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a down event, which should select the first item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_DOWN, false, false, false,
+ NULL, VK_DOWN, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step3));
}
@@ -760,7 +759,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a key down event, which should select the next item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_DOWN, false, false, false,
+ NULL, VK_DOWN, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step4));
}
@@ -773,7 +772,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a right arrow to force the menu to open.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_RIGHT, false, false, false,
+ NULL, VK_RIGHT, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step5));
}
@@ -789,7 +788,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a left arrow to close the submenu.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_LEFT, false, false, false,
+ NULL, VK_LEFT, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step6));
}
@@ -804,7 +803,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a down arrow to wrap back to f1a
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_DOWN, false, false, false,
+ NULL, VK_DOWN, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step7));
}
@@ -817,7 +816,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send enter, which should select the item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_RETURN, false, false, false,
+ NULL, VK_RETURN, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step8));
}
@@ -866,7 +865,7 @@ class BookmarkBarViewTest11 : public BookmarkBarViewEventTestBase {
void Step3() {
// Send escape so that the context menu hides.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_ESCAPE, false, false, false,
+ NULL, VK_ESCAPE, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest11::Step4));
}
@@ -953,7 +952,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
void Step4() {
// Press tab to give focus to the cancel button.
- ui_controls::SendKeyPress(NULL, base::VKEY_TAB, false, false, false);
+ ui_controls::SendKeyPress(NULL, VK_TAB, false, false, false);
// For some reason return isn't processed correctly unless we delay.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -963,7 +962,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
void Step5() {
// And press enter so that the cancel button is selected.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, base::VKEY_RETURN, false, false, false,
+ NULL, VK_RETURN, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest12::Step6));
}
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index a684bfb..9df51aeb 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -5124,29 +5124,6 @@
'dependencies': [
'../views/views.gyp:views',
],
- 'sources/': [
- ['include', 'browser/views/bookmark_bar_view_test.cc'],
- ['include', 'test/interactive_ui/view_event_test_base.cc'],
- ['include', 'test/interactive_ui/view_event_test_base.h'],
- ],
- 'sources': [
- 'app/chrome_dll.rc',
- 'test/data/resource.rc',
-
- # TODO: It would be nice to have these pulled in
- # automatically from direct_dependent_settings in
- # their various targets (net.gyp:net_resources, etc.),
- # but that causes errors in other targets when
- # resulting .res files get referenced multiple times.
- '<(SHARED_INTERMEDIATE_DIR)/chrome/browser_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome/common_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/chrome/renderer_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
-
- 'tools/build/win/precompiled_wtl.h',
- 'tools/build/win/precompiled_wtl.cc',
- ],
}],
['OS=="mac"', {
'sources!': [
diff --git a/chrome/test/interactive_ui/view_event_test_base.cc b/chrome/test/interactive_ui/view_event_test_base.cc
index 24db9c5..a1203d5 100644
--- a/chrome/test/interactive_ui/view_event_test_base.cc
+++ b/chrome/test/interactive_ui/view_event_test_base.cc
@@ -4,9 +4,7 @@
#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"
@@ -52,11 +50,9 @@ 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.
@@ -65,24 +61,16 @@ 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() {
@@ -101,9 +89,7 @@ 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();