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

Unified Diff: chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc

Issue 2761993002: cros: Eliminate bluetooth methods from SystemTrayDelegate (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
diff --git a/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
index 6e45b847b35af1f7e8ef3c7d4bbf5092f7c5a7ef..4ba93f02ecc57531cce6d121cd521e52fa2fe676 100644
--- a/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
+++ b/chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc
@@ -117,50 +117,4 @@ IN_PROC_BROWSER_TEST_F(SystemTrayDelegateChromeOSTest,
EXPECT_EQ(base::k24HourClock, GetHourType());
}
-using SystemTrayDelegateBluetoothTest = InProcessBrowserTest;
-
-// Tests basic functionality of the Bluetooth interface.
-// TODO(jamescook): Delete this test when TrayBluetoothHelper moves to ash.
-// http://crbug.com/660043
-IN_PROC_BROWSER_TEST_F(SystemTrayDelegateBluetoothTest, Basics) {
- // Set Bluetooth discovery simulation delay to 0 so the test doesn't have to
- // wait or use timers.
- FakeBluetoothAdapterClient* adapter_client =
- static_cast<FakeBluetoothAdapterClient*>(
- BluezDBusManager::Get()->GetBluetoothAdapterClient());
- adapter_client->SetSimulationIntervalMs(0);
-
- ash::SystemTrayDelegate* delegate =
- ash::WmShell::Get()->system_tray_delegate();
- EXPECT_TRUE(delegate->GetBluetoothAvailable());
- EXPECT_FALSE(delegate->GetBluetoothEnabled());
- EXPECT_FALSE(delegate->GetBluetoothDiscovering());
- EXPECT_FALSE(delegate->IsBluetoothDiscovering());
-
- ash::BluetoothDeviceList devices;
- delegate->GetAvailableBluetoothDevices(&devices);
- // The devices are fake in tests, so don't assume any particular number.
- EXPECT_FALSE(devices.empty());
-
- // Turn Bluetooth on.
- delegate->ToggleBluetooth();
- content::RunAllPendingInMessageLoop();
- EXPECT_TRUE(delegate->GetBluetoothEnabled());
-
- delegate->BluetoothStartDiscovering();
- content::RunAllPendingInMessageLoop();
- EXPECT_TRUE(delegate->GetBluetoothDiscovering());
- EXPECT_TRUE(delegate->IsBluetoothDiscovering());
-
- delegate->BluetoothStopDiscovering();
- content::RunAllPendingInMessageLoop();
- EXPECT_FALSE(delegate->GetBluetoothDiscovering());
- EXPECT_FALSE(delegate->IsBluetoothDiscovering());
-
- // Turn Bluetooth off.
- delegate->ToggleBluetooth();
- content::RunAllPendingInMessageLoop();
- EXPECT_FALSE(delegate->GetBluetoothEnabled());
-}
-
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698