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

Side by Side Diff: chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm

Issue 2565813002: Create c/b/ui/cocoa/test and move test files to there (Closed)
Patch Set: Rebase Created 4 years 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
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 "chrome/browser/ui/cocoa/history_overlay_controller.h" 5 #import "chrome/browser/ui/cocoa/history_overlay_controller.h"
6 6
7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 7 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h"
8 8
9 class HistoryOverlayControllerTest : public CocoaTest { 9 class HistoryOverlayControllerTest : public CocoaTest {
10 public: 10 public:
11 void SetUp() override { 11 void SetUp() override {
12 CocoaTest::SetUp(); 12 CocoaTest::SetUp();
13 13
14 // The overlay controller shows the panel as a subview of the given view. 14 // The overlay controller shows the panel as a subview of the given view.
15 test_view_.reset([[NSView alloc] initWithFrame:NSMakeRect(10, 10, 10, 10)]); 15 test_view_.reset([[NSView alloc] initWithFrame:NSMakeRect(10, 10, 10, 10)]);
16 16
17 // We add it to the test_window for authenticity. 17 // We add it to the test_window for authenticity.
(...skipping 15 matching lines...) Expand all
33 base::scoped_nsobject<HistoryOverlayController> controller( 33 base::scoped_nsobject<HistoryOverlayController> controller(
34 [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]); 34 [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
35 [controller showPanelForView:test_view()]; 35 [controller showPanelForView:test_view()];
36 EXPECT_EQ(1u, [[test_view() subviews] count]); 36 EXPECT_EQ(1u, [[test_view() subviews] count]);
37 37
38 // We expect the view to be removed from its superview immediately 38 // We expect the view to be removed from its superview immediately
39 // after dismiss, even though it may still be animating a fade out. 39 // after dismiss, even though it may still be animating a fade out.
40 [controller dismiss]; 40 [controller dismiss];
41 EXPECT_EQ(0u, [[test_view() subviews] count]); 41 EXPECT_EQ(0u, [[test_view() subviews] count]);
42 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698