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

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

Issue 180036: Make download items drag sources on OS X. (Closed)
Patch Set: comments Created 10 years, 11 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/download_item_button.mm ('k') | chrome/browser/cocoa/download_item_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/download_item_button_unittest.mm
diff --git a/chrome/browser/cocoa/download_item_button_unittest.mm b/chrome/browser/cocoa/download_item_button_unittest.mm
new file mode 100644
index 0000000000000000000000000000000000000000..d5a1b54a51f987c2c86b3a2f019c3f6d4af0d6e2
--- /dev/null
+++ b/chrome/browser/cocoa/download_item_button_unittest.mm
@@ -0,0 +1,21 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/scoped_nsobject.h"
+#import "chrome/browser/cocoa/download_item_button.h"
+#import "chrome/browser/cocoa/cocoa_test_helper.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+
+// Make sure nothing leaks.
+TEST(DownloadItemButtonTest, Create) {
+ scoped_nsobject<DownloadItemButton> button;
+ button.reset([[DownloadItemButton alloc]
+ initWithFrame:NSMakeRect(0,0,500,500)]);
+
+ // Test setter
+ FilePath path("foo");
+ [button.get() setDownload:path];
+ EXPECT_EQ(path.value(), [button.get() download].value());
+}
« no previous file with comments | « chrome/browser/cocoa/download_item_button.mm ('k') | chrome/browser/cocoa/download_item_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698