OLD | NEW |
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 #include "base/memory/scoped_nsobject.h" | 5 #include "base/memory/scoped_nsobject.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "chrome/browser/extensions/extension_pref_value_map.h" | 8 #include "chrome/browser/extensions/extension_pref_value_map.h" |
9 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" | 9 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" |
10 #include "chrome/browser/extensions/extension_prefs.h" | 10 #include "chrome/browser/extensions/extension_prefs.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 DISALLOW_COPY_AND_ASSIGN(ExtensionTestingProfile); | 69 DISALLOW_COPY_AND_ASSIGN(ExtensionTestingProfile); |
70 }; | 70 }; |
71 | 71 |
72 class ExtensionPopupControllerTest : public CocoaTest { | 72 class ExtensionPopupControllerTest : public CocoaTest { |
73 public: | 73 public: |
74 virtual void SetUp() { | 74 virtual void SetUp() { |
75 CocoaTest::SetUp(); | 75 CocoaTest::SetUp(); |
76 profile_.reset(new ExtensionTestingProfile()); | 76 profile_.reset(new ExtensionTestingProfile()); |
77 profile_->InitExtensionProfile(); | 77 profile_->InitExtensionProfile(); |
78 browser_.reset(new Browser(Browser::TYPE_TABBED, profile_.get())); | 78 browser_.reset( |
| 79 new Browser(Browser::CreateParams(profile_.get()))); |
79 [ExtensionPopupController showURL:GURL("http://google.com") | 80 [ExtensionPopupController showURL:GURL("http://google.com") |
80 inBrowser:browser_.get() | 81 inBrowser:browser_.get() |
81 anchoredAt:NSZeroPoint | 82 anchoredAt:NSZeroPoint |
82 arrowLocation:info_bubble::kTopRight | 83 arrowLocation:info_bubble::kTopRight |
83 devMode:NO]; | 84 devMode:NO]; |
84 } | 85 } |
85 virtual void TearDown() { | 86 virtual void TearDown() { |
86 profile_->ShutdownExtensionProfile(); | 87 profile_->ShutdownExtensionProfile(); |
87 [[ExtensionPopupController popup] close]; | 88 [[ExtensionPopupController popup] close]; |
88 CocoaTest::TearDown(); | 89 CocoaTest::TearDown(); |
89 } | 90 } |
90 | 91 |
91 protected: | 92 protected: |
92 scoped_ptr<Browser> browser_; | 93 scoped_ptr<Browser> browser_; |
93 scoped_ptr<ExtensionTestingProfile> profile_; | 94 scoped_ptr<ExtensionTestingProfile> profile_; |
94 }; | 95 }; |
95 | 96 |
96 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) { | 97 TEST_F(ExtensionPopupControllerTest, DISABLED_Basics) { |
97 // TODO(andybons): Better mechanisms for mocking out the extensions service | 98 // TODO(andybons): Better mechanisms for mocking out the extensions service |
98 // and extensions for easy testing need to be implemented. | 99 // and extensions for easy testing need to be implemented. |
99 // http://crbug.com/28316 | 100 // http://crbug.com/28316 |
100 EXPECT_TRUE([ExtensionPopupController popup]); | 101 EXPECT_TRUE([ExtensionPopupController popup]); |
101 } | 102 } |
102 | 103 |
103 } // namespace | 104 } // namespace |
OLD | NEW |