OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/memory/scoped_nsobject.h" |
| 6 #import "testing/gtest_mac.h" |
| 7 #import "ui/app_list/cocoa/app_list_view_window.h" |
| 8 #import "ui/base/test/ui_cocoa_test_helper.h" |
| 9 |
| 10 // Unit test harness for Cocoa-specific interactions with the app_list. |
| 11 class AppListViewWindowTest : public ui::CocoaTest { |
| 12 public: |
| 13 AppListViewWindowTest() { |
| 14 Init(); |
| 15 window_.reset([[AppListViewWindow alloc] initAsBubble]); |
| 16 } |
| 17 |
| 18 protected: |
| 19 scoped_nsobject<AppListViewWindow> window_; |
| 20 |
| 21 private: |
| 22 DISALLOW_COPY_AND_ASSIGN(AppListViewWindowTest); |
| 23 }; |
| 24 |
| 25 // Test showing, hiding and closing the AppListViewWindow with no content. |
| 26 TEST_F(AppListViewWindowTest, ShowHideCloseRelease) { |
| 27 [window_ makeKeyAndOrderFront:nil]; |
| 28 [window_ close]; |
| 29 [window_ setReleasedWhenClosed:YES]; |
| 30 [window_ close]; |
| 31 window_.reset(); |
| 32 } |
OLD | NEW |