Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / download / download_item_button_unittest.mm
blobe6f07e9ff488d94b0be033a9a597b3b8f7d4d7d5
1 // Copyright (c) 2011 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 #include "base/mac/scoped_nsobject.h"
6 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
7 #import "chrome/browser/ui/cocoa/download/download_item_button.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "testing/platform_test.h"
11 // Make sure nothing leaks.
12 TEST(DownloadItemButtonTest, Create) {
13   base::scoped_nsobject<DownloadItemButton> button;
14   button.reset([[DownloadItemButton alloc]
15       initWithFrame:NSMakeRect(0,0,500,500)]);
17   // Test setter
18   base::FilePath path("foo");
19   [button.get() setDownload:path];
20   EXPECT_EQ(path.value(), [button.get() download].value());