Commit fb8e0241 authored by Reilly Grant's avatar Reilly Grant Committed by Chromium LUCI CQ

Re-enable BluetoothShellApiTest.ApiSanityCheck

This change re-enables BluetoothShellApiTest.ApiSanityCheck on macOS
and Chrome OS. To fix the flake observed on macOS the resource bundle
for extensions_browsertest now includes the Bluetooth strings.

Without these strings if a Bluetooth device is discovered there will
be a DCHECK failure because the string needed to localize the device
is missing from the resource bundle used for tests.

Bug: 711484, 1165955
Change-Id: I8636feaff5180fd536f254f841dab89b2d5cc3b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628246
Auto-Submit: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: default avatarFinnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843490}
parent 17b8e4fc
......@@ -177,6 +177,7 @@ repack("shell_and_test_pak") {
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/content/dev_ui_content_resources.pak",
"$root_gen_dir/content/shell/shell_resources.pak",
"$root_gen_dir/device/bluetooth/strings/bluetooth_strings_en-US.pak",
"$root_gen_dir/extensions/extensions_browser_resources_100_percent.pak",
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_resources.pak",
......@@ -199,6 +200,7 @@ repack("shell_and_test_pak") {
"//content:dev_ui_content_resources",
"//content/browser/devtools:devtools_resources",
"//content/shell:resources",
"//device/bluetooth/strings",
"//extensions/shell:resources",
"//extensions/strings",
"//mojo/public/js:resources",
......
......@@ -7,12 +7,6 @@
using BluetoothShellApiTest = extensions::ShellApiTest;
// TODO(crbug.com/1165955): this test flakes on Mac ASAN
#if defined(OS_MAC)
#define MAYBE_ApiSanityCheck DISABLED_ApiSanityCheck
#else
#define MAYBE_ApiSanityCheck ApiSanityCheck
#endif
IN_PROC_BROWSER_TEST_F(BluetoothShellApiTest, MAYBE_ApiSanityCheck) {
IN_PROC_BROWSER_TEST_F(BluetoothShellApiTest, ApiSanityCheck) {
ASSERT_TRUE(RunAppTest("api_test/bluetooth"));
}
......@@ -18,22 +18,19 @@ function bluetoothSanityCheck() {
'AB:CD:EF:01:23:45', chrome.test.callbackFail('Invalid device'));
chrome.bluetooth.getDevices(chrome.test.callback());
// TODO(michaelpg): Re-enable on Chrome OS after crbug.com/711484 is fixed.
if (!/CrOS/.test(navigator.userAgent)) {
var startDiscoveryCallback = chrome.test.callbackAdded();
chrome.bluetooth.startDiscovery(function() {
// Ignore errors.
chrome.runtime.lastError;
startDiscoveryCallback();
});
var startDiscoveryCallback = chrome.test.callbackAdded();
chrome.bluetooth.startDiscovery(function() {
// Ignore errors.
chrome.runtime.lastError;
startDiscoveryCallback();
});
var stopDiscoveryCallback = chrome.test.callbackAdded();
chrome.bluetooth.stopDiscovery(function() {
// Ignore errors.
chrome.runtime.lastError;
stopDiscoveryCallback();
});
}
var stopDiscoveryCallback = chrome.test.callbackAdded();
chrome.bluetooth.stopDiscovery(function() {
// Ignore errors.
chrome.runtime.lastError;
stopDiscoveryCallback();
});
}
chrome.app.runtime.onLaunched.addListener(function() {
......
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