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

Side by Side Diff: ash/system/ime/tray_ime_chromeos_unittest.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 months 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
« no previous file with comments | « ash/system/date/tray_date.h ('k') | ash/system/locale/locale_notification_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/system/ime/tray_ime_chromeos.h" 5 #include "ash/system/ime/tray_ime_chromeos.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/status_area_widget.h" 9 #include "ash/system/status_area_widget.h"
10 #include "ash/system/tray/system_tray_notifier.h" 10 #include "ash/system/tray/system_tray_notifier.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Returns the view in the detailed views scroll content at the provided 45 // Returns the view in the detailed views scroll content at the provided
46 // index. 46 // index.
47 views::View* GetScrollChildView(int index); 47 views::View* GetScrollChildView(int index);
48 48
49 // test::AshTestBase: 49 // test::AshTestBase:
50 void SetUp() override; 50 void SetUp() override;
51 void TearDown() override; 51 void TearDown() override;
52 52
53 private: 53 private:
54 scoped_ptr<TrayIME> tray_; 54 std::unique_ptr<TrayIME> tray_;
55 scoped_ptr<views::View> default_view_; 55 std::unique_ptr<views::View> default_view_;
56 scoped_ptr<views::View> detailed_view_; 56 std::unique_ptr<views::View> detailed_view_;
57 }; 57 };
58 58
59 void TrayIMETest::SetUpForStatusAreaWidget( 59 void TrayIMETest::SetUpForStatusAreaWidget(
60 StatusAreaWidget* status_area_widget) { 60 StatusAreaWidget* status_area_widget) {
61 tray_.reset(new TrayIME(status_area_widget->system_tray())); 61 tray_.reset(new TrayIME(status_area_widget->system_tray()));
62 default_view_.reset(tray_->CreateDefaultView( 62 default_view_.reset(tray_->CreateDefaultView(
63 StatusAreaWidgetTestHelper::GetUserLoginStatus())); 63 StatusAreaWidgetTestHelper::GetUserLoginStatus()));
64 detailed_view_.reset(tray_->CreateDetailedView( 64 detailed_view_.reset(tray_->CreateDetailedView(
65 StatusAreaWidgetTestHelper::GetUserLoginStatus())); 65 StatusAreaWidgetTestHelper::GetUserLoginStatus()));
66 } 66 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 toggle = GetScrollChildView(0); 152 toggle = GetScrollChildView(0);
153 // Clicking again should disable the keyboard. 153 // Clicking again should disable the keyboard.
154 tap = ui::GestureEvent(0, 0, 0, base::TimeDelta(), 154 tap = ui::GestureEvent(0, 0, 0, base::TimeDelta(),
155 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); 155 ui::GestureEventDetails(ui::ET_GESTURE_TAP));
156 toggle->OnGestureEvent(&tap); 156 toggle->OnGestureEvent(&tap);
157 EXPECT_FALSE(keyboard::IsKeyboardEnabled()); 157 EXPECT_FALSE(keyboard::IsKeyboardEnabled());
158 EXPECT_TRUE(default_view()->visible()); 158 EXPECT_TRUE(default_view()->visible());
159 } 159 }
160 160
161 } // namespace ash 161 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/date/tray_date.h ('k') | ash/system/locale/locale_notification_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698