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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller_unittest.mm

Issue 10692195: Consolidate Browser Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 @end 42 @end
43 43
44 namespace keys = extension_manifest_keys; 44 namespace keys = extension_manifest_keys;
45 45
46 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest { 46 class ExtensionInstalledBubbleControllerTest : public CocoaProfileTest {
47 47
48 public: 48 public:
49 virtual void SetUp() { 49 virtual void SetUp() {
50 CocoaProfileTest::SetUp(); 50 CocoaProfileTest::SetUp();
51 ASSERT_TRUE(browser()); 51 ASSERT_TRUE(browser());
52 window_ = CreateBrowserWindow()->GetNativeWindow(); 52 window_ = browser()->window()->GetNativeWindow();
53 icon_ = LoadTestIcon(); 53 icon_ = LoadTestIcon();
54 } 54 }
55 55
56 // Load test icon from extension test directory. 56 // Load test icon from extension test directory.
57 SkBitmap LoadTestIcon() { 57 SkBitmap LoadTestIcon() {
58 FilePath path; 58 FilePath path;
59 PathService::Get(chrome::DIR_TEST_DATA, &path); 59 PathService::Get(chrome::DIR_TEST_DATA, &path);
60 path = path.AppendASCII("extensions").AppendASCII("icon1.png"); 60 path = path.AppendASCII("extensions").AppendASCII("icon1.png");
61 61
62 std::string file_contents; 62 std::string file_contents;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 // The bubble window goes from visible to not-visible. 223 // The bubble window goes from visible to not-visible.
224 EXPECT_TRUE([bubbleWindow isVisible]); 224 EXPECT_TRUE([bubbleWindow isVisible]);
225 [window_ close]; 225 [window_ close];
226 EXPECT_FALSE([bubbleWindow isVisible]); 226 EXPECT_FALSE([bubbleWindow isVisible]);
227 227
228 [[NSNotificationCenter defaultCenter] removeObserver:observer]; 228 [[NSNotificationCenter defaultCenter] removeObserver:observer];
229 229
230 // Check that the appropriate notification was received. 230 // Check that the appropriate notification was received.
231 EXPECT_OCMOCK_VERIFY(observer); 231 EXPECT_OCMOCK_VERIFY(observer);
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698