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

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

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // TODO(jamescook): Delete this test when TrayBluetoothHelper moves to ash. 123 // TODO(jamescook): Delete this test when TrayBluetoothHelper moves to ash.
124 // http://crbug.com/660043 124 // http://crbug.com/660043
125 IN_PROC_BROWSER_TEST_F(SystemTrayDelegateBluetoothTest, Basics) { 125 IN_PROC_BROWSER_TEST_F(SystemTrayDelegateBluetoothTest, Basics) {
126 // Set Bluetooth discovery simulation delay to 0 so the test doesn't have to 126 // Set Bluetooth discovery simulation delay to 0 so the test doesn't have to
127 // wait or use timers. 127 // wait or use timers.
128 FakeBluetoothAdapterClient* adapter_client = 128 FakeBluetoothAdapterClient* adapter_client =
129 static_cast<FakeBluetoothAdapterClient*>( 129 static_cast<FakeBluetoothAdapterClient*>(
130 BluezDBusManager::Get()->GetBluetoothAdapterClient()); 130 BluezDBusManager::Get()->GetBluetoothAdapterClient());
131 adapter_client->SetSimulationIntervalMs(0); 131 adapter_client->SetSimulationIntervalMs(0);
132 132
133 ash::SystemTrayDelegate* delegate = 133 ash::SystemTrayDelegate* delegate = ash::Shell::Get()->system_tray_delegate();
134 ash::WmShell::Get()->system_tray_delegate();
135 EXPECT_TRUE(delegate->GetBluetoothAvailable()); 134 EXPECT_TRUE(delegate->GetBluetoothAvailable());
136 EXPECT_FALSE(delegate->GetBluetoothEnabled()); 135 EXPECT_FALSE(delegate->GetBluetoothEnabled());
137 EXPECT_FALSE(delegate->GetBluetoothDiscovering()); 136 EXPECT_FALSE(delegate->GetBluetoothDiscovering());
138 EXPECT_FALSE(delegate->IsBluetoothDiscovering()); 137 EXPECT_FALSE(delegate->IsBluetoothDiscovering());
139 138
140 ash::BluetoothDeviceList devices; 139 ash::BluetoothDeviceList devices;
141 delegate->GetAvailableBluetoothDevices(&devices); 140 delegate->GetAvailableBluetoothDevices(&devices);
142 // The devices are fake in tests, so don't assume any particular number. 141 // The devices are fake in tests, so don't assume any particular number.
143 EXPECT_FALSE(devices.empty()); 142 EXPECT_FALSE(devices.empty());
144 143
(...skipping 12 matching lines...) Expand all
157 EXPECT_FALSE(delegate->GetBluetoothDiscovering()); 156 EXPECT_FALSE(delegate->GetBluetoothDiscovering());
158 EXPECT_FALSE(delegate->IsBluetoothDiscovering()); 157 EXPECT_FALSE(delegate->IsBluetoothDiscovering());
159 158
160 // Turn Bluetooth off. 159 // Turn Bluetooth off.
161 delegate->ToggleBluetooth(); 160 delegate->ToggleBluetooth();
162 content::RunAllPendingInMessageLoop(); 161 content::RunAllPendingInMessageLoop();
163 EXPECT_FALSE(delegate->GetBluetoothEnabled()); 162 EXPECT_FALSE(delegate->GetBluetoothEnabled());
164 } 163 }
165 164
166 } // namespace chromeos 165 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698