Commit 45e66c79 authored by scheib's avatar scheib Committed by Commit bot

bluetooth: web: Update Blacklist field trial with Cypress & FIDO services.

In preparation for deploying the Web Bluetooth Blacklist update via
field trial parameter this patch adds the payload to the
Field Trial Testing Config.

To support a browser test for this field trial parameter,
a test specific UUID is also added to the configs.

To enable readable comments in the json, the PRESUBMIT is
modified to accept comment keys.

BUG=570121, 643013

Review-Url: https://codereview.chromium.org/2306473002
Cr-Commit-Position: refs/heads/master@{#416332}
parent c6a6c934
......@@ -132,16 +132,15 @@ IN_PROC_BROWSER_TEST_F(WebBluetoothTest, BlacklistShouldBlock) {
EXPECT_CALL(*adapter, IsPresent()).WillRepeatedly(Return(true));
device::BluetoothAdapterFactory::SetAdapterForTesting(adapter);
std::map<std::string, std::string> params;
params["blacklist_additions"] = "ee01:e";
variations::AssociateVariationParams("WebBluetoothBlacklist", "TestGroup",
params);
base::FieldTrialList::CreateFieldTrial("WebBluetoothBlacklist", "TestGroup");
ASSERT_TRUE(base::FieldTrialList::TrialExists("WebBluetoothBlacklist"))
<< "ERROR: testing/variations/fieldtrial_testing_config_*.json must\n"
<< "include WebBluetoothBlacklist trial with the blacklist_additions\n"
<< "parameter including this test's random UUID 'ed5f25a4'.\n";
std::string rejection;
EXPECT_TRUE(content::ExecuteScriptAndExtractString(
web_contents_,
"navigator.bluetooth.requestDevice({filters: [{services: [0xee01]}]})"
"navigator.bluetooth.requestDevice({filters: [{services: [0xed5f25a4]}]})"
" .then(() => { domAutomationController.send('Success'); },"
" reason => {"
" domAutomationController.send(reason.name + ': ' + reason.message);"
......
......@@ -13,7 +13,17 @@ import sys
VALID_GROUP_KEYS = ['group_name',
'params',
'enable_features',
'disable_features']
'disable_features',
'//0',
'//1',
'//2',
'//3',
'//4',
'//5',
'//6',
'//7',
'//8',
'//9']
def PrettyPrint(contents):
"""Pretty prints a fieldtrial configuration.
......
......@@ -593,6 +593,17 @@
"group_name": "aggressive"
}
],
"WebBluetoothBlacklist": [
{
"//1": "The value 'ed5f25a4:e' is included for the",
"//2": "WebBluetoothTest BlacklistShouldBlock test.",
"//3": "TODO(643013): Remove other values in Chrome 55 or later.",
"group_name": "TestGroup",
"params": {
"blacklist_additions": "00060000:e,fffd:e,ed5f25a4:e"
}
}
],
"WebFontsInterventionV2": [
{
"group_name": "Enabled-slow2g"
......
......@@ -360,6 +360,17 @@
"group_name": "aggressive"
}
],
"WebBluetoothBlacklist": [
{
"//1": "The value 'ed5f25a4:e' is included for the",
"//2": "WebBluetoothTest BlacklistShouldBlock test.",
"//3": "TODO(643013): Remove other values in Chrome 55 or later.",
"group_name": "TestGroup",
"params": {
"blacklist_additions": "00060000:e,fffd:e,ed5f25a4:e"
}
}
],
"WebFontsInterventionV2": [
{
"group_name": "Enabled-slow2g"
......
......@@ -422,6 +422,17 @@
"group_name": "aggressive"
}
],
"WebBluetoothBlacklist": [
{
"//1": "The value 'ed5f25a4:e' is included for the",
"//2": "WebBluetoothTest BlacklistShouldBlock test.",
"//3": "TODO(643013): Remove other values in Chrome 55 or later.",
"group_name": "TestGroup",
"params": {
"blacklist_additions": "00060000:e,fffd:e,ed5f25a4:e"
}
}
],
"WebFontsInterventionV2": [
{
"group_name": "Enabled-slow2g"
......
......@@ -474,6 +474,17 @@
"group_name": "Enabled"
}
],
"WebBluetoothBlacklist": [
{
"//1": "The value 'ed5f25a4:e' is included for the",
"//2": "WebBluetoothTest BlacklistShouldBlock test.",
"//3": "TODO(643013): Remove other values in Chrome 55 or later.",
"group_name": "TestGroup",
"params": {
"blacklist_additions": "00060000:e,fffd:e,ed5f25a4:e"
}
}
],
"WebFontsInterventionV2": [
{
"group_name": "Enabled-slow2g"
......
......@@ -526,6 +526,17 @@
"group_name": "aggressive"
}
],
"WebBluetoothBlacklist": [
{
"//1": "The value 'ed5f25a4:e' is included for the",
"//2": "WebBluetoothTest BlacklistShouldBlock test.",
"//3": "TODO(643013): Remove other values in Chrome 55 or later.",
"group_name": "TestGroup",
"params": {
"blacklist_additions": "00060000:e,fffd:e,ed5f25a4:e"
}
}
],
"WebFontsInterventionV2": [
{
"group_name": "Enabled-slow2g"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment