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

Unified Diff: content/browser/bluetooth/bluetooth_blacklist_unittest.cc

Issue 1737423002: bluetooth: Add Web Bluetooth blacklist checks to readValue & writeValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-blacklist-char-
Patch Set: addressed ortuno Created 4 years, 10 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: content/browser/bluetooth/bluetooth_blacklist_unittest.cc
diff --git a/content/browser/bluetooth/bluetooth_blacklist_unittest.cc b/content/browser/bluetooth/bluetooth_blacklist_unittest.cc
index 5c9b67410f7e138dbef9ce681f790dca37b22fa4..5aad7369d6b4b81e50f6973a087075c40233835d 100644
--- a/content/browser/bluetooth/bluetooth_blacklist_unittest.cc
+++ b/content/browser/bluetooth/bluetooth_blacklist_unittest.cc
@@ -243,7 +243,7 @@ TEST_F(BluetoothBlacklistTest, VerifyDefaultBlacklistSize) {
BluetoothBlacklist& blacklist = BluetoothBlacklist::Get();
// When adding items to the blacklist the new values should be added in the
// tests below for each exclusion type.
- EXPECT_EQ(6u, blacklist.size());
+ EXPECT_EQ(9u, blacklist.size());
}
TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeList) {
@@ -253,6 +253,8 @@ TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeList) {
EXPECT_TRUE(blacklist.IsExcluded(BluetoothUUID("1812")));
EXPECT_TRUE(blacklist.IsExcluded(BluetoothUUID("2a03")));
EXPECT_TRUE(blacklist.IsExcluded(BluetoothUUID("2a25")));
+ EXPECT_TRUE(blacklist.IsExcluded(
+ BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c")));
}
TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeReadList) {
@@ -262,6 +264,12 @@ TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeReadList) {
EXPECT_TRUE(blacklist.IsExcludedFromReads(BluetoothUUID("1812")));
EXPECT_TRUE(blacklist.IsExcludedFromReads(BluetoothUUID("2a03")));
EXPECT_TRUE(blacklist.IsExcludedFromReads(BluetoothUUID("2a25")));
+ EXPECT_TRUE(blacklist.IsExcludedFromReads(
+ BluetoothUUID("bad1c9a2-9a5b-4015-8b60-1579bbbf2135")));
+ EXPECT_TRUE(blacklist.IsExcludedFromReads(
+ BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c")));
+ EXPECT_TRUE(blacklist.IsExcludedFromReads(
+ BluetoothUUID("bad3ec61-3cc3-4954-9702-7977df514114")));
}
TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeWriteList) {
@@ -274,6 +282,8 @@ TEST_F(BluetoothBlacklistTest, VerifyDefaultExcludeWriteList) {
EXPECT_TRUE(blacklist.IsExcludedFromWrites(BluetoothUUID("2a25")));
EXPECT_TRUE(blacklist.IsExcludedFromWrites(BluetoothUUID("2902")));
EXPECT_TRUE(blacklist.IsExcludedFromWrites(BluetoothUUID("2903")));
+ EXPECT_TRUE(blacklist.IsExcludedFromWrites(
+ BluetoothUUID("bad2ddcf-60db-45cd-bef9-fd72b153cf7c")));
}
} // namespace content
« no previous file with comments | « content/browser/bluetooth/bluetooth_blacklist.cc ('k') | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698