| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/mac/foundation_util.h" |
| 7 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_tabstrip.h" | 11 #include "chrome/browser/ui/browser_tabstrip.h" |
| 12 #include "chrome/browser/ui/cocoa/applescript/bookmark_folder_applescript.h" |
| 11 #import "chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.h" | 13 #import "chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.h" |
| 12 #import "chrome/browser/ui/cocoa/applescript/constants_applescript.h" | 14 #import "chrome/browser/ui/cocoa/applescript/constants_applescript.h" |
| 13 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" | 15 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" |
| 14 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 16 #include "chrome/browser/ui/cocoa/run_loop_testing.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 18 #include "testing/gtest_mac.h" | 20 #include "testing/gtest_mac.h" |
| 19 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
| 20 | 22 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 NSArray* bookmarkFolders = [NSApp bookmarkFolders]; | 105 NSArray* bookmarkFolders = [NSApp bookmarkFolders]; |
| 104 EXPECT_EQ(2U, [bookmarkFolders count]); | 106 EXPECT_EQ(2U, [bookmarkFolders count]); |
| 105 | 107 |
| 106 for (BookmarkFolderAppleScript* bookmarkFolder in bookmarkFolders) { | 108 for (BookmarkFolderAppleScript* bookmarkFolder in bookmarkFolders) { |
| 107 EXPECT_EQ(NSApp, | 109 EXPECT_EQ(NSApp, |
| 108 [bookmarkFolder container]); | 110 [bookmarkFolder container]); |
| 109 EXPECT_NSEQ(AppleScript::kBookmarkFoldersProperty, | 111 EXPECT_NSEQ(AppleScript::kBookmarkFoldersProperty, |
| 110 [bookmarkFolder containerProperty]); | 112 [bookmarkFolder containerProperty]); |
| 111 } | 113 } |
| 112 | 114 |
| 113 EXPECT_NSEQ(@"Other Bookmarks", [[NSApp otherBookmarks] title]); | 115 BookmarkFolderAppleScript* otherBookmarks = |
| 114 EXPECT_NSEQ(@"Bookmarks Bar", [[NSApp bookmarksBar] title]); | 116 base::mac::ObjCCast<BookmarkFolderAppleScript>([NSApp otherBookmarks]); |
| 117 EXPECT_NSEQ(@"Other Bookmarks", [otherBookmarks title]); |
| 118 BookmarkFolderAppleScript* bookmarksBar = |
| 119 base::mac::ObjCCast<BookmarkFolderAppleScript>([NSApp bookmarksBar]); |
| 120 EXPECT_NSEQ(@"Bookmarks Bar", [bookmarksBar title]); |
| 115 } | 121 } |
| OLD | NEW |