summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/toolbar_view_unittest.mm
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 20:39:08 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 20:39:08 +0000
commitfa8b44910eb051f9a6d9bb7955afa8e0b6482268 (patch)
treead7c1e9277dcf75a30d2200814abb69efaee1427 /chrome/browser/cocoa/toolbar_view_unittest.mm
parent84dac073861918b2cc7e741e7ee1d5d7acc248e8 (diff)
downloadchromium_src-fa8b44910eb051f9a6d9bb7955afa8e0b6482268.zip
chromium_src-fa8b44910eb051f9a6d9bb7955afa8e0b6482268.tar.gz
chromium_src-fa8b44910eb051f9a6d9bb7955afa8e0b6482268.tar.bz2
Prevent mouse down events on the toolbar view from moving the parent window.
BUG=19305 (http://crbug.com/19305) TEST=Click and drag on the toolbar background and ensure that the window isn't moved. Review URL: http://codereview.chromium.org/164528 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/toolbar_view_unittest.mm')
-rw-r--r--chrome/browser/cocoa/toolbar_view_unittest.mm22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/browser/cocoa/toolbar_view_unittest.mm b/chrome/browser/cocoa/toolbar_view_unittest.mm
index c8e8930..19eac0c 100644
--- a/chrome/browser/cocoa/toolbar_view_unittest.mm
+++ b/chrome/browser/cocoa/toolbar_view_unittest.mm
@@ -2,4 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// This file is intentionally empty; there is no code in ToolbarView to test.
+#include "base/scoped_nsobject.h"
+#import "chrome/browser/cocoa/cocoa_test_helper.h"
+#import "chrome/browser/cocoa/toolbar_view.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+class ToolbarViewTest : public testing::Test {
+ public:
+ CocoaTestHelper cocoa_helper_;
+ scoped_nsobject<ToolbarView> view_;
+};
+
+// This class only needs to do one thing: prevent mouse down events from moving
+// the parent window around.
+TEST_F(ToolbarViewTest, CanDragWindow) {
+ view_.reset([[ToolbarView alloc] init]);
+ EXPECT_FALSE([view_.get() mouseDownCanMoveWindow]);
+}
+
+} // namespace