summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 22:58:04 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-17 22:58:04 +0000
commit5ec00758316921011efd43acada189358aac0564 (patch)
treec5a8198778738601c9a7670967a74f90a6afe287 /ui
parentb7f2d4ef2b1e8d1b351846e25efbc339d5dcf0bc (diff)
downloadchromium_src-5ec00758316921011efd43acada189358aac0564.zip
chromium_src-5ec00758316921011efd43acada189358aac0564.tar.gz
chromium_src-5ec00758316921011efd43acada189358aac0564.tar.bz2
Reverting 137736 because 137059 broke the bookmark bubble. In particular, using the combo box.
Review URL: https://chromiumcodereview.appspot.com/10382227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/views/widget/widget.cc2
-rw-r--r--ui/views/widget/widget_unittest.cc35
2 files changed, 1 insertions, 36 deletions
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index e5f3072..ef990aa 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -518,7 +518,7 @@ void Widget::Show() {
native_widget_->Show();
}
- if (CanActivate() && close_on_deactivate_) {
+ if (close_on_deactivate_) {
// Set mouse capture on timeout in case this is called from a
// mouse pressed handler.
MessageLoopForUI::current()->PostTask(FROM_HERE, base::Bind(
diff --git a/ui/views/widget/widget_unittest.cc b/ui/views/widget/widget_unittest.cc
index ddda8f1..9716a6c 100644
--- a/ui/views/widget/widget_unittest.cc
+++ b/ui/views/widget/widget_unittest.cc
@@ -60,20 +60,6 @@ class NativeWidgetCapture : public NativeWidgetPlatform {
};
#endif
-class NonActivatableDelegate : public WidgetDelegateView {
- public:
- NonActivatableDelegate() {}
- virtual ~NonActivatableDelegate() {}
-
- // Overridden from WidgetDelegate.
- virtual bool CanActivate() const OVERRIDE {
- return false;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NonActivatableDelegate);
-};
-
// A typedef that inserts our mock-capture NativeWidget implementation for
// relevant platforms.
#if defined(USE_AURA)
@@ -337,27 +323,6 @@ TEST_F(WidgetTest, Visibility_ChildPopup) {
}
#endif
-TEST_F(WidgetTest, ActivationCapture) {
- Widget* first = CreateTopLevelPlatformWidget();
- first->Show();
- first->SetMouseCapture(NULL);
- RunPendingMessages();
- EXPECT_TRUE(WidgetHasMouseCapture(first));
-
- Widget* second = new Widget;
- Widget::InitParams params(Widget::InitParams::TYPE_BUBBLE);
- params.transparent = true;
- params.close_on_deactivate = true;
- params.delegate = new NonActivatableDelegate;
- second->Init(params);
- second->Show();
- RunPendingMessages();
- EXPECT_FALSE(WidgetHasMouseCapture(second));
-
- second->CloseNow();
- first->CloseNow();
-}
-
////////////////////////////////////////////////////////////////////////////////
// Widget ownership tests.
//