Chromium Code Reviews| Index: ui/app_list/cocoa/app_list_view_window_unittest.mm |
| diff --git a/ui/app_list/cocoa/app_list_view_window_unittest.mm b/ui/app_list/cocoa/app_list_view_window_unittest.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6948809f0e7c970a078669492195040a6c21df1d |
| --- /dev/null |
| +++ b/ui/app_list/cocoa/app_list_view_window_unittest.mm |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "base/memory/scoped_nsobject.h" |
| +#import "testing/gtest_mac.h" |
| +#import "ui/app_list/cocoa/app_list_view_window.h" |
| +#import "ui/base/test/ui_cocoa_test_helper.h" |
| + |
| +// Unit test harness for Cocoa-specific interactions with the app_list. |
| +class AppListViewWindowTest : public ui::CocoaTest { |
| + public: |
| + AppListViewWindowTest() { |
| + Init(); |
| + window_.reset([[AppListViewWindow alloc] initAsBubble]); |
| + } |
| + |
| + scoped_nsobject<AppListViewWindow> window_; |
|
sail
2013/01/10 00:12:49
should be protected
tapted
2013/01/10 04:56:13
Done.
|
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(AppListViewWindowTest); |
| +}; |
| + |
| +// Test showing, hiding and closing the AppListViewWindow with no content. |
| +TEST_F(AppListViewWindowTest, ShowHideCloseRelease) { |
| + [window_ makeKeyAndOrderFront:nil]; |
| + [window_ close]; |
| + [window_ setReleasedWhenClosed:YES]; |
| + [window_ close]; |
| + window_.reset(); |
| +} |