From 8a22758ba43312c09a97f53449534c5f792941aa Mon Sep 17 00:00:00 2001 From: Garfield Tan <xutan@chromium.org> Date: Tue, 6 May 2025 15:17:44 -0700 Subject: [PATCH] serial: Enable Web Serial over Bluetooth on Android Intent to Ship link: https://groups.google.com/a/chromium.org/g/blink-dev/c/BqUGCcurReE Bug: 375245353 Test: Web Serial over Bluetooth is enabled. Change-Id: Idc72e3d5293042e939ad65631cc43571e4b2a51b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6513793 Reviewed-by: Jack Hsieh <chengweih@chromium.org> Commit-Queue: Garfield Tan <xutan@chromium.org> Cr-Commit-Position: refs/heads/main@{#1456641} --- device/base/features.cc | 2 +- .../serial/idlharness.https.any-expected.txt | 74 +------------------ .../idlharness.https.any.worker-expected.txt | 72 +----------------- 3 files changed, 5 insertions(+), 143 deletions(-) diff --git a/device/base/features.cc b/device/base/features.cc index 2565670c9b67a..2af045bec3eb7 100644 --- a/device/base/features.cc +++ b/device/base/features.cc @@ -41,7 +41,7 @@ BASE_FEATURE(kUncachedGattDiscoveryForGattConnection, // Serial. BASE_FEATURE(kBluetoothRfcommAndroid, "BluetoothRfcommAndroid", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_ANDROID) diff --git a/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any-expected.txt b/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any-expected.txt index a03b903bc0e1e..bf166f0dc7478 100644 --- a/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any-expected.txt +++ b/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any-expected.txt @@ -1,75 +1,5 @@ This is a testharness.js-based test. -Found 36 FAIL, 0 TIMEOUT, 0 NOTRUN. -[FAIL] Serial interface: existence and properties of interface object - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface object length - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface object name - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object's "constructor" property - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object's @@unscopables property - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: attribute onconnect - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: attribute ondisconnect - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: operation getPorts() - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: operation requestPort(optional SerialPortRequestOptions) - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial must be primary interface of navigator.serial - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Stringification of navigator.serial - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "onconnect" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "ondisconnect" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "getPorts()" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "requestPort(optional SerialPortRequestOptions)" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: calling requestPort(optional SerialPortRequestOptions) on navigator.serial with too few arguments must throw TypeError - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] SerialPort interface: existence and properties of interface object - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface object length - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface object name - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object's "constructor" property - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object's @@unscopables property - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute onconnect - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute ondisconnect - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing +Found 1 FAIL, 0 TIMEOUT, 0 NOTRUN. [FAIL] SerialPort interface: attribute connected - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute readable - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute writable - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation getInfo() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation open(SerialOptions) - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation setSignals(optional SerialOutputSignals) - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation getSignals() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation close() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation forget() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] Navigator interface: attribute serial - assert_true: The prototype object must have a property "serial" expected true got false -[FAIL] Navigator interface: navigator must inherit property "serial" with the proper type - assert_inherits: property "serial" not found in prototype chain + assert_true: The prototype object must have a property "connected" expected true got false Harness: the test ran to completion. diff --git a/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any.worker-expected.txt index eb94372719255..bf166f0dc7478 100644 --- a/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any.worker-expected.txt +++ b/third_party/blink/web_tests/platform/android/external/wpt/serial/idlharness.https.any.worker-expected.txt @@ -1,73 +1,5 @@ This is a testharness.js-based test. -Found 35 FAIL, 0 TIMEOUT, 0 NOTRUN. -[FAIL] Serial interface: existence and properties of interface object - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface object length - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface object name - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object's "constructor" property - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: existence and properties of interface prototype object's @@unscopables property - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: attribute onconnect - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: attribute ondisconnect - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: operation getPorts() - assert_own_property: self does not have own property "Serial" expected property "Serial" missing -[FAIL] Serial interface: member requestPort - Cannot use 'in' operator to search for 'requestPort' in undefined -[FAIL] Serial must be primary interface of navigator.serial - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Stringification of navigator.serial - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "onconnect" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "ondisconnect" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must inherit property "getPorts()" with the proper type - assert_equals: wrong typeof object expected "object" but got "undefined" -[FAIL] Serial interface: navigator.serial must not have property "requestPort" - Cannot use 'in' operator to search for 'requestPort' in undefined -[FAIL] SerialPort interface: existence and properties of interface object - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface object length - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface object name - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object's "constructor" property - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: existence and properties of interface prototype object's @@unscopables property - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute onconnect - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute ondisconnect - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing +Found 1 FAIL, 0 TIMEOUT, 0 NOTRUN. [FAIL] SerialPort interface: attribute connected - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute readable - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: attribute writable - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation getInfo() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation open(SerialOptions) - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation setSignals(optional SerialOutputSignals) - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation getSignals() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation close() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] SerialPort interface: operation forget() - assert_own_property: self does not have own property "SerialPort" expected property "SerialPort" missing -[FAIL] WorkerNavigator interface: attribute serial - assert_true: The prototype object must have a property "serial" expected true got false -[FAIL] WorkerNavigator interface: navigator must inherit property "serial" with the proper type - assert_inherits: property "serial" not found in prototype chain + assert_true: The prototype object must have a property "connected" expected true got false Harness: the test ran to completion.