Skip to content
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

Merged
merged 11 commits into from Nov 7, 2016
Merged

Conversation

zakorgy
Copy link
Contributor

@zakorgy zakorgy commented Oct 25, 2016

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 errors
  • There are tests for these changes OR

This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @fitzgen: components/script/dom/bluetoothdevice.rs, components/script/dom/webidls/TestRunner.webidl, components/script/dom/webidls/Window.webidl, components/script/dom/window.rs, components/script/dom/testrunner.rs, components/script/dom/bluetooth.rs, components/script/dom/webidls/BluetoothDevice.webidl, components/script/dom/mod.rs, components/script/dom/bluetoothremotegattserver.rs, components/script/dom/bluetoothremotegattservice.rs, components/script/dom/bluetoothremotegattdescriptor.rs, components/script/dom/bluetoothremotegattcharacteristic.rs
  • @KiChjang: components/script/dom/bluetoothdevice.rs, components/net_traits/bluetooth_scanfilter.rs, components/net_traits/bluetooth_scanfilter.rs, components/script/dom/webidls/TestRunner.webidl, components/script/dom/webidls/Window.webidl, components/net/lib.rs, components/net/bluetooth_thread.rs, components/script/dom/window.rs, components/script/dom/testrunner.rs, components/script/dom/bluetooth.rs, components/net/Cargo.toml, components/script/dom/webidls/BluetoothDevice.webidl, components/script/dom/mod.rs, components/script/dom/bluetoothremotegattserver.rs, components/net/bluetooth_test.rs, components/script/dom/bluetoothremotegattservice.rs, components/net_traits/bluetooth_thread.rs, components/net_traits/bluetooth_thread.rs, components/script/dom/bluetoothremotegattdescriptor.rs, components/script/dom/bluetoothremotegattcharacteristic.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 25, 2016
@zakorgy
Copy link
Contributor Author

zakorgy commented Oct 25, 2016

r? @jdm

@highfive highfive assigned jdm and unassigned SimonSapin Oct 25, 2016
Copy link
Member

@jdm jdm left a 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 {
Copy link
Member

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 ||
Copy link
Member

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};
Copy link
Member

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"}
Copy link
Member

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.

@jdm jdm added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Oct 31, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 2, 2016
@jdm jdm added S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 2, 2016
@@ -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)",
Copy link
Member

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.

@jdm
Copy link
Member

jdm commented Nov 2, 2016

Other than that, this is good to merge after #13612.

@jdm jdm added the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Nov 2, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 2, 2016
@jdm jdm added S-needs-rebase There are merge conflict errors. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 2, 2016
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 4, 2016
@jdm jdm removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Nov 7, 2016
@zakorgy zakorgy changed the title [WIP] WebBluetooth fixes for the wpt tests WebBluetooth fixes for the wpt tests Nov 7, 2016
@zakorgy
Copy link
Contributor Author

zakorgy commented Nov 7, 2016

The last commit solves #14112.

@jdm
Copy link
Member

jdm commented Nov 7, 2016

@bors-servo: r+

@bors-servo
Copy link
Contributor

📌 Commit 91a0c4d has been approved by jdm

@highfive highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 7, 2016
@jdm jdm removed the S-blocked-on-external Something, somewhere else, needs to happen before this PR can be merged. label Nov 7, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 91a0c4d with merge eb2484f...

bors-servo pushed a commit that referenced this pull request Nov 7, 2016
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 -->
@bors-servo
Copy link
Contributor

@bors-servo bors-servo merged commit 91a0c4d into servo:master Nov 7, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants