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/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #include "chrome/browser/ui/browser_tabstrip.h" | 10 #include "chrome/browser/ui/browser_tabstrip.h" |
11 #import "chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.h" | 11 #import "chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.h" |
12 #import "chrome/browser/ui/cocoa/applescript/constants_applescript.h" | 12 #import "chrome/browser/ui/cocoa/applescript/constants_applescript.h" |
13 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" | 13 #import "chrome/browser/ui/cocoa/applescript/window_applescript.h" |
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
15 #include "chrome/test/base/in_process_browser_test.h" | 15 #include "chrome/test/base/in_process_browser_test.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "testing/gtest_mac.h" | 17 #include "testing/gtest_mac.h" |
18 #include "ui/gfx/size.h" | 18 #include "ui/gfx/geometry/size.h" |
19 | 19 |
20 typedef InProcessBrowserTest BrowserCrApplicationAppleScriptTest; | 20 typedef InProcessBrowserTest BrowserCrApplicationAppleScriptTest; |
21 | 21 |
22 // Create windows of different |Type|. | 22 // Create windows of different |Type|. |
23 IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest, Creation) { | 23 IN_PROC_BROWSER_TEST_F(BrowserCrApplicationAppleScriptTest, Creation) { |
24 // Create additional |Browser*| objects of different type. | 24 // Create additional |Browser*| objects of different type. |
25 Profile* profile = browser()->profile(); | 25 Profile* profile = browser()->profile(); |
26 Browser* b1 = | 26 Browser* b1 = |
27 new Browser(Browser::CreateParams(Browser::TYPE_POPUP, profile, | 27 new Browser(Browser::CreateParams(Browser::TYPE_POPUP, profile, |
28 browser()->host_desktop_type())); | 28 browser()->host_desktop_type())); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 for (BookmarkFolderAppleScript* bookmarkFolder in bookmarkFolders) { | 107 for (BookmarkFolderAppleScript* bookmarkFolder in bookmarkFolders) { |
108 EXPECT_EQ(NSApp, | 108 EXPECT_EQ(NSApp, |
109 [bookmarkFolder container]); | 109 [bookmarkFolder container]); |
110 EXPECT_NSEQ(AppleScript::kBookmarkFoldersProperty, | 110 EXPECT_NSEQ(AppleScript::kBookmarkFoldersProperty, |
111 [bookmarkFolder containerProperty]); | 111 [bookmarkFolder containerProperty]); |
112 } | 112 } |
113 | 113 |
114 EXPECT_NSEQ(@"Other Bookmarks", [[NSApp otherBookmarks] title]); | 114 EXPECT_NSEQ(@"Other Bookmarks", [[NSApp otherBookmarks] title]); |
115 EXPECT_NSEQ(@"Bookmarks Bar", [[NSApp bookmarksBar] title]); | 115 EXPECT_NSEQ(@"Bookmarks Bar", [[NSApp bookmarksBar] title]); |
116 } | 116 } |
OLD | NEW |