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 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

highfive commented Oct 25, 2016

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
@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 left a comment

These changes are largely fine.

pub fn get_name(&self) -> &str {
&self.name
pub fn get_name(&self) -> Option<&str> {
match &self.name {

This comment has been minimized.

@jdm

jdm Oct 31, 2016

Member

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 ||

This comment has been minimized.

@jdm

jdm Oct 31, 2016

Member

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};

This comment has been minimized.

@jdm

jdm Oct 31, 2016

Member

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"}

This comment has been minimized.

@jdm

jdm Oct 31, 2016

Member

We need to find a way not to do this; it's useful for net to be able to build without depending on script.

@@ -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)",

This comment has been minimized.

@jdm

jdm Nov 2, 2016

Member

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.

@fokinv fokinv force-pushed the szeged:wpt-error-fixes branch from 503202f to 50556d8 Nov 2, 2016
@jdm jdm added S-needs-rebase and removed S-awaiting-review labels Nov 2, 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
Copy link
Contributor

bors-servo commented Nov 7, 2016

📌 Commit 91a0c4d has been approved by jdm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 7, 2016

Testing commit 91a0c4d with merge eb2484f...

bors-servo added 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 commented Nov 7, 2016

@bors-servo bors-servo merged commit 91a0c4d into servo:master Nov 7, 2016
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.