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

Side by Side Diff: ash/common/system/tray/tray_details_view_unittest.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/common/system/tray/tray_details_view.cc ('k') | ash/common/system/tray/tray_empty.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 2013 The Chromium Authors. All rights reserved. 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 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/common/system/tray/tray_details_view.h" 5 #include "ash/common/system/tray/tray_details_view.h"
6 6
7 #include "ash/common/system/tray/hover_highlight_view.h" 7 #include "ash/common/system/tray/hover_highlight_view.h"
8 #include "ash/common/system/tray/special_popup_row.h" 8 #include "ash/common/system/tray/special_popup_row.h"
9 #include "ash/common/system/tray/system_tray_item.h" 9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "ash/common/system/tray/tray_popup_header_button.h" 10 #include "ash/common/system/tray/tray_popup_header_button.h"
(...skipping 29 matching lines...) Expand all
40 IDS_ASH_STATUS_TRAY_BLUETOOTH); 40 IDS_ASH_STATUS_TRAY_BLUETOOTH);
41 footer()->AddButton(tray_popup_header_button_); 41 footer()->AddButton(tray_popup_header_button_);
42 } 42 }
43 43
44 ~TestDetailsView() override {} 44 ~TestDetailsView() override {}
45 45
46 TrayPopupHeaderButton* tray_popup_header_button() { 46 TrayPopupHeaderButton* tray_popup_header_button() {
47 return tray_popup_header_button_; 47 return tray_popup_header_button_;
48 } 48 }
49 49
50 void FocusFooter() { 50 void FocusFooter() { footer()->content()->RequestFocus(); }
51 footer()->content()->RequestFocus();
52 }
53 51
54 // ViewClickListener: 52 // ViewClickListener:
55 void OnViewClicked(views::View* sender) override {} 53 void OnViewClicked(views::View* sender) override {}
56 54
57 // views::ButtonListener: 55 // views::ButtonListener:
58 void ButtonPressed(views::Button* sender, const ui::Event& event) override {} 56 void ButtonPressed(views::Button* sender, const ui::Event& event) override {}
59 57
60 private: 58 private:
61 TrayPopupHeaderButton* tray_popup_header_button_; 59 TrayPopupHeaderButton* tray_popup_header_button_;
62 60
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 109
112 HoverHighlightView* CreateAndShowHoverHighlightView() { 110 HoverHighlightView* CreateAndShowHoverHighlightView() {
113 SystemTray* tray = GetPrimarySystemTray(); 111 SystemTray* tray = GetPrimarySystemTray();
114 TestItem* test_item = new TestItem; 112 TestItem* test_item = new TestItem;
115 tray->AddTrayItem(test_item); 113 tray->AddTrayItem(test_item);
116 tray->ShowDefaultView(BUBBLE_CREATE_NEW); 114 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
117 RunAllPendingInMessageLoop(); 115 RunAllPendingInMessageLoop();
118 tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING); 116 tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING);
119 RunAllPendingInMessageLoop(); 117 RunAllPendingInMessageLoop();
120 118
121 return static_cast<HoverHighlightView*>(test_item->detailed_view()-> 119 return static_cast<HoverHighlightView*>(
122 footer()->content()); 120 test_item->detailed_view()->footer()->content());
123 } 121 }
124 122
125 TrayPopupHeaderButton* CreateAndShowTrayPopupHeaderButton() { 123 TrayPopupHeaderButton* CreateAndShowTrayPopupHeaderButton() {
126 SystemTray* tray = GetPrimarySystemTray(); 124 SystemTray* tray = GetPrimarySystemTray();
127 TestItem* test_item = new TestItem; 125 TestItem* test_item = new TestItem;
128 tray->AddTrayItem(test_item); 126 tray->AddTrayItem(test_item);
129 tray->ShowDefaultView(BUBBLE_CREATE_NEW); 127 tray->ShowDefaultView(BUBBLE_CREATE_NEW);
130 RunAllPendingInMessageLoop(); 128 RunAllPendingInMessageLoop();
131 tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING); 129 tray->ShowDetailedView(test_item, 0, true, BUBBLE_USE_EXISTING);
132 RunAllPendingInMessageLoop(); 130 RunAllPendingInMessageLoop();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 gfx::Rect bounds = button->GetBoundsInScreen(); 264 gfx::Rect bounds = button->GetBoundsInScreen();
267 gfx::Point initial_point(bounds.x() - 1, bounds.y()); 265 gfx::Point initial_point(bounds.x() - 1, bounds.y());
268 generator.set_current_location(initial_point); 266 generator.set_current_location(initial_point);
269 generator.MoveMouseBy(1, 0); 267 generator.MoveMouseBy(1, 0);
270 RunAllPendingInMessageLoop(); 268 RunAllPendingInMessageLoop();
271 EXPECT_TRUE(button->background()); 269 EXPECT_TRUE(button->background());
272 } 270 }
273 271
274 } // namespace test 272 } // namespace test
275 } // namespace ash 273 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_details_view.cc ('k') | ash/common/system/tray/tray_empty.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698