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

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

Issue 2761993002: cros: Eliminate bluetooth methods from SystemTrayDelegate (Closed)
Patch Set: review comments 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 ba48d99e9b4e2815009cad796e706ab11d89c401..a64eb66e65d4eb7e6d5e960d9c495791bfed8220 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
@@ -12,7 +12,6 @@
#include "ash/common/system/date/tray_date.h"
#include "ash/common/system/date/tray_system_info.h"
#include "ash/common/system/tray/system_tray.h"
-#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "base/macros.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
@@ -26,11 +25,6 @@
#include "components/prefs/pref_service.h"
#include "components/user_manager/user_manager.h"
#include "content/public/test/test_utils.h"
-#include "device/bluetooth/dbus/bluez_dbus_manager.h"
-#include "device/bluetooth/dbus/fake_bluetooth_adapter_client.h"
-
-using bluez::BluezDBusManager;
-using bluez::FakeBluetoothAdapterClient;
namespace chromeos {
@@ -117,49 +111,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::Shell::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