New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebBluetooth fixes for the wpt tests #13918
Conversation
Heads up! This PR modifies the following files:
|
r? @jdm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are largely fine.
pub fn get_name(&self) -> &str { | ||
&self.name | ||
pub fn get_name(&self) -> Option<&str> { | ||
match &self.name { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.name.as_ref().map(|s| s.as_str())
self.name_prefix.is_empty() && | ||
self.get_services().is_empty() && | ||
self.manufacturer_id.is_none() && | ||
self.service_data_uuid.is_empty()) || | ||
self.name.len() > MAX_NAME_LENGTH || | ||
self.name_prefix.len() > MAX_NAME_LENGTH | ||
self.get_name().unwrap_or("").len() > MAX_NAME_LENGTH || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines should be unindented by one, since they are not part of the subexpression.
@@ -12,6 +12,7 @@ use net_traits::bluetooth_thread::{BluetoothDescriptorMsg, BluetoothDescriptorsM | |||
use net_traits::bluetooth_thread::{BluetoothDeviceMsg, BluetoothError, BluetoothMethodMsg}; | |||
use net_traits::bluetooth_thread::{BluetoothResult, BluetoothServiceMsg, BluetoothServicesMsg}; | |||
use rand::{self, Rng}; | |||
use script::bluetooth_blacklist::{uuid_is_blacklisted, Blacklist}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These helpers need to move into net_traits instead.
@@ -34,6 +34,7 @@ plugins = {path = "../plugins"} | |||
profile_traits = {path = "../profile_traits"} | |||
rand = "0.3" | |||
rustc-serialize = "0.3" | |||
script = {path = "../script"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to find a way not to do this; it's useful for net to be able to build without depending on script.
8d73598
to
503202f
Compare
@@ -1526,6 +1525,7 @@ dependencies = [ | |||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", | |||
"msg 0.0.1", | |||
"num-traits 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", | |||
"regex 0.1.76 (registry+https://github.com/rust-lang/crates.io-index)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to run ./mach cargo-update -p net_traits
to ensure that ports/cef/Cargo.lock is updated too.
Other than that, this is good to merge after #13612. |
503202f
to
50556d8
Compare
…fix is longer than 29 bytes.
50556d8
to
e8c1c98
Compare
The last commit solves #14112. |
@bors-servo: r+ |
📌 Commit 91a0c4d has been approved by |
WebBluetooth fixes for the wpt tests <!-- Please describe your changes on the following line: --> Note: depends on #13612 WebBluetooth fixes for the failing wpt tests, excluding the `disconnect-during` tests cases, due to the lack of the event handling in the current implementation. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes OR <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13918) <!-- Reviewable:end -->
☀️ Test successful - arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev |
Note: depends on #13612
WebBluetooth fixes for the failing wpt tests, excluding the
disconnect-during
tests cases, due to the lack of the event handling in the current implementation../mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change is