Revert of Update V8 to version 4.4.24. (patchset #1 id:1 of https://codereview.chromi...
[chromium-blink-merge.git] / content / browser / web_contents / web_contents_view_mac_unittest.mm
blob8c009eafbd84b95c3d75412d9331fb572e821bb1
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "content/browser/web_contents/web_contents_view_mac.h"
7 #include "base/mac/scoped_nsobject.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h"
10 #import "ui/gfx/test/ui_cocoa_test_helper.h"
12 namespace {
14 class WebContentsViewCocoaTest : public ui::CocoaTest {
17 TEST_F(WebContentsViewCocoaTest, NonWebDragSourceTest) {
18   base::scoped_nsobject<WebContentsViewCocoa> view(
19       [[WebContentsViewCocoa alloc] init]);
21   // Tests that |draggingSourceOperationMaskForLocal:| returns the expected mask
22   // when dragging without a WebDragSource - i.e. when |startDragWithDropData:|
23   // hasn't yet been called. Dragging a file from the downloads manager, for
24   // example, requires this to work.
25   EXPECT_EQ(NSDragOperationCopy,
26       [view draggingSourceOperationMaskForLocal:YES]);
27   EXPECT_EQ(NSDragOperationCopy,
28       [view draggingSourceOperationMaskForLocal:NO]);
31 }  // namespace