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

Side by Side Diff: content/browser/bluetooth/bluetooth_device_chooser_controller_unittest.cc

Issue 2245603003: Add signal strength indicator icon to WebBluetooth chooser on non-Mac desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address more comments Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 namespace content {
9
10 class BluetoothDeviceChooserControllerTest : public testing::Test {};
11
12 TEST_F(BluetoothDeviceChooserControllerTest, CalculateSignalStrengthLevel) {
13 EXPECT_EQ(
14 0, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-128));
15 EXPECT_EQ(
16 0, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-100));
17 EXPECT_EQ(
18 0, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-89));
19 EXPECT_EQ(
20 1, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-88));
21 EXPECT_EQ(
22 1, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-78));
23 EXPECT_EQ(
24 2, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-77));
25 EXPECT_EQ(
26 2, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-67));
27 EXPECT_EQ(
28 3, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-66));
29 EXPECT_EQ(
30 3, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-56));
31 EXPECT_EQ(
32 4, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(-55));
33 EXPECT_EQ(
34 4, BluetoothDeviceChooserController::CalculateSignalStrengthLevel(127));
35 }
36
37 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/bluetooth/bluetooth_device_chooser_controller.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698