forked from chromium/chromium
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Switch to the (old) new way of doing file promising"
This reverts commit 4278cdb. # Conflicts: # content/app_shim_remote_cocoa/web_drag_source_mac.mm
- Loading branch information
Showing
6 changed files
with
197 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
content/browser/web_contents/web_contents_view_mac_unittest.mm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2012 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import "content/browser/web_contents/web_contents_view_mac.h" | ||
|
||
#include "base/mac/scoped_nsobject.h" | ||
#import "content/app_shim_remote_cocoa/web_contents_view_cocoa.h" | ||
#include "content/public/browser/web_contents.h" | ||
#include "content/public/test/test_renderer_host.h" | ||
#include "testing/gtest/include/gtest/gtest.h" | ||
#include "testing/gtest_mac.h" | ||
#include "testing/platform_test.h" | ||
#include "ui/base/test/cocoa_helper.h" | ||
#import "ui/base/test/cocoa_helper.h" | ||
|
||
namespace content { | ||
|
||
namespace { | ||
|
||
class WebContentsNSViewTest : public ui::CocoaTest {}; | ||
|
||
} // namespace | ||
|
||
TEST_F(WebContentsNSViewTest, NonWebDragSourceTest) { | ||
// The designated initializer is private but init should be fine in this case. | ||
base::scoped_nsobject<WebContentsViewCocoa> view( | ||
[[WebContentsViewCocoa alloc] init]); | ||
|
||
// Tests that |draggingSourceOperationMaskForLocal:| returns the expected mask | ||
// when dragging without a WebDragSource - i.e. when |startDragWithDropData:| | ||
// hasn't yet been called. Dragging a file from the downloads manager, for | ||
// example, requires this to work. | ||
EXPECT_EQ(NSDragOperationCopy, | ||
[view draggingSourceOperationMaskForLocal:YES]); | ||
EXPECT_EQ(NSDragOperationCopy, | ||
[view draggingSourceOperationMaskForLocal:NO]); | ||
} | ||
|
||
} // namespace content |
Oops, something went wrong.