Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4739)

Unified Diff: chrome/browser/cocoa/toolbar_view_unittest.mm

Issue 164528: Prevent mouse down events on the toolbar view from moving the parent window (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/toolbar_view.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/toolbar_view_unittest.mm
===================================================================
--- chrome/browser/cocoa/toolbar_view_unittest.mm (revision 23408)
+++ chrome/browser/cocoa/toolbar_view_unittest.mm (working copy)
@@ -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
« no previous file with comments | « chrome/browser/cocoa/toolbar_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698