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

Side by Side Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc

Issue 2166503003: Fix bluetooth adapter access in SystemTrayDelegateChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not check on InputMethodManager::Get. Created 4 years, 5 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
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 "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/system/date/date_default_view.h" 9 #include "ash/common/system/date/date_default_view.h"
10 #include "ash/common/system/date/date_view.h" 10 #include "ash/common/system/date/date_view.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 content::RunAllPendingInMessageLoop(); 118 content::RunAllPendingInMessageLoop();
119 AddUser(account_id2_.GetUserEmail()); 119 AddUser(account_id2_.GetUserEmail());
120 SetupUserProfile(account_id2_, false /* Use_24_hour_clock. */); 120 SetupUserProfile(account_id2_, false /* Use_24_hour_clock. */);
121 CreateDefaultView(); 121 CreateDefaultView();
122 EXPECT_EQ(base::k12HourClock, GetHourType()); 122 EXPECT_EQ(base::k12HourClock, GetHourType());
123 user_manager::UserManager::Get()->SwitchActiveUser(account_id1_); 123 user_manager::UserManager::Get()->SwitchActiveUser(account_id1_);
124 CreateDefaultView(); 124 CreateDefaultView();
125 EXPECT_EQ(base::k24HourClock, GetHourType()); 125 EXPECT_EQ(base::k24HourClock, GetHourType());
126 } 126 }
127 127
128 // Test that checking bluetooth status early on doesn't cause a crash.
129 IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest, BluetoothStatus) {
James Cook 2016/07/20 15:23:14 drive-by question: Any particular reason you added
msw 2016/07/20 16:43:19 Woops, I meant to delete this; thanks for catching
130 SystemTrayDelegateChromeOS delegate;
131 EXPECT_FALSE(delegate.GetBluetoothAvailable());
132 EXPECT_FALSE(delegate.GetBluetoothEnabled());
133 EXPECT_FALSE(delegate.IsBluetoothDiscovering());
134 }
135
128 // Makes sure that no notifications are shown when rotating the 136 // Makes sure that no notifications are shown when rotating the
129 // display on display settings URLs. 137 // display on display settings URLs.
130 IN_PROC_BROWSER_TEST_F(DisplayNotificationsTest, 138 IN_PROC_BROWSER_TEST_F(DisplayNotificationsTest,
131 TestDisplayOrientationChangeNotification) { 139 TestDisplayOrientationChangeNotification) {
132 // Open the display settings page. 140 // Open the display settings page.
133 ui_test_utils::NavigateToURL(browser(), 141 ui_test_utils::NavigateToURL(browser(),
134 GURL("chrome://settings-frame/display")); 142 GURL("chrome://settings-frame/display"));
135 // Rotate the display 90 degrees. 143 // Rotate the display 90 degrees.
136 UpdateDisplay("400x400/r"); 144 UpdateDisplay("400x400/r");
137 // Ensure that no notification was displayed. 145 // Ensure that no notification was displayed.
(...skipping 15 matching lines...) Expand all
153 161
154 UpdateDisplay("400x400"); 162 UpdateDisplay("400x400");
155 163
156 ui_test_utils::NavigateToURL(browser(), GURL("chrome://version")); 164 ui_test_utils::NavigateToURL(browser(), GURL("chrome://version"));
157 UpdateDisplay("400x400/r"); 165 UpdateDisplay("400x400/r");
158 // Ensure that there is a notification that is shown. 166 // Ensure that there is a notification that is shown.
159 EXPECT_FALSE(GetVisibleNotifications().empty()); 167 EXPECT_FALSE(GetVisibleNotifications().empty());
160 } 168 }
161 169
162 } // namespace chromeos 170 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698