diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 14:25:36 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-19 14:25:36 +0000 |
commit | 0d411416a2899c54a22227a64d3c810632779786 (patch) | |
tree | 1e1e061aad669c6261fe83dc9ede3157bd7a8b6d | |
parent | 135f59435e8aa4ee4ef60014569ab50fd5ff7775 (diff) | |
download | chromium_src-0d411416a2899c54a22227a64d3c810632779786.zip chromium_src-0d411416a2899c54a22227a64d3c810632779786.tar.gz chromium_src-0d411416a2899c54a22227a64d3c810632779786.tar.bz2 |
[Mac][MC] Fix bustage from various refactorings.
BUG=179904
TEST=Compile locally. Still waiting for the bots to be updated.
Review URL: https://chromiumcodereview.appspot.com/14141003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195181 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ui/message_center/cocoa/notification_controller_unittest.mm | 15 | ||||
-rw-r--r-- | ui/message_center/test/run_all_unittests.cc | 19 |
2 files changed, 20 insertions, 14 deletions
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm index ef304cb..24543cf 100644 --- a/ui/message_center/cocoa/notification_controller_unittest.mm +++ b/ui/message_center/cocoa/notification_controller_unittest.mm @@ -16,7 +16,7 @@ namespace { -class MockMessageCenter : public FakeMessageCenter { +class MockMessageCenter : public message_center::FakeMessageCenter { public: MockMessageCenter() : last_removed_by_user_(false), @@ -26,7 +26,8 @@ class MockMessageCenter : public FakeMessageCenter { virtual void RemoveNotification(const std::string& id, bool by_user) OVERRIDE { last_removed_id_ = id; - last_removed_by_user_ = by_user_; + last_removed_by_user_ = by_user; + ++remove_count_; } const std::string& last_removed_id() const { return last_removed_id_; } @@ -82,7 +83,7 @@ TEST_F(NotificationControllerTest, BasicLayout) { scoped_nsobject<MCNotificationController> controller( [[MCNotificationController alloc] initWithNotification:notification.get() - changeObserver:NULL]); + messageCenter:NULL]); [controller view]; EXPECT_EQ(TestIcon(), [[controller iconView] image]); @@ -108,7 +109,7 @@ TEST_F(NotificationControllerTest, OverflowText) { NULL)); scoped_nsobject<MCNotificationController> controller( [[MCNotificationController alloc] initWithNotification:notification.get() - changeObserver:NULL]); + messageCenter:NULL]); [controller view]; EXPECT_GT(NSHeight([[controller view] frame]), @@ -132,9 +133,9 @@ TEST_F(NotificationControllerTest, Close) { messageCenter:&messageCenter]); [controller view]; - EXPECT_TRUE(1, messageCenter.remove_count()); + [[controller closeButton] performClick:nil]; + + EXPECT_EQ(1, messageCenter.remove_count()); EXPECT_EQ("an_id", messageCenter.last_removed_id()); EXPECT_TRUE(messageCenter.last_removed_by_user()); - - [[controller closeButton] performClick:nil]; } diff --git a/ui/message_center/test/run_all_unittests.cc b/ui/message_center/test/run_all_unittests.cc index c69a901..0c2e56a 100644 --- a/ui/message_center/test/run_all_unittests.cc +++ b/ui/message_center/test/run_all_unittests.cc @@ -4,16 +4,18 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" -#include "base/test/test_suite.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" #include "ui/compositor/compositor_setup.h" #include "ui/compositor/test/compositor_test_support.h" +#include "ui/test/test_suite.h" #include "ui/views/view.h" -class MessageCenterTestSuite : public base::TestSuite { +class MessageCenterTestSuite : public ui::test::UITestSuite { public: - MessageCenterTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} + MessageCenterTestSuite(int argc, char** argv) + : ui::test::UITestSuite(argc, argv) { + } protected: virtual void Initialize() OVERRIDE; @@ -24,17 +26,20 @@ class MessageCenterTestSuite : public base::TestSuite { }; void MessageCenterTestSuite::Initialize() { - base::TestSuite::Initialize(); - - ui::RegisterPathProvider(); - ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); + ui::test::UITestSuite::Initialize(); +#if !defined(OS_MACOSX) ui::CompositorTestSupport::Initialize(); ui::SetupTestCompositor(); +#endif } void MessageCenterTestSuite::Shutdown() { + ui::test::UITestSuite::Shutdown(); + +#if !defined(OS_MACOSX) ui::CompositorTestSupport::Terminate(); +#endif } int main(int argc, char** argv) { |