Skip to content

Allow setting preferences to false in WPT tests#10204

Merged
bors-servo merged 1 commit intoservo:masterfrom
awalgarg:fix10161
Mar 26, 2016
Merged

Allow setting preferences to false in WPT tests#10204
bors-servo merged 1 commit intoservo:masterfrom
awalgarg:fix10161

Conversation

@awalgarg
Copy link
Copy Markdown
Contributor

First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.


This change is Reviewable

@highfive
Copy link
Copy Markdown

Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon.

@highfive
Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @jgraham: tests/wpt/mozilla/meta/mozilla/preferences.html.ini, tests/wpt/mozilla/tests/mozilla/preferences.html, tests/wpt/harness/wptrunner/executors/executorservo.py, tests/wpt/mozilla/meta/MANIFEST.json
  • @KiChjang: components/script/dom/testbinding.rs, components/script/dom/webidls/TestBinding.webidl

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 26, 2016
@jdm jdm assigned jdm and unassigned SimonSapin Mar 26, 2016
// on the resource path.
for pref in opt_match.opt_strs("pref").iter() {
prefs::set_pref(pref, PrefValue::Boolean(true));
let split: Vec<&str> = pref.split('=').collect();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should use splitn I guess? since the value itself might have an equal sign in it

Also, it should do it in a way that doesn't crash if the pref isn't formatted correctly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Manishearth fixed, thanks!

Also, it should do it in a way that doesn't crash if the pref isn't formatted correctly

Umm, example of a pref which will crash this presently?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, never mind.

But this still doesn't use splitn.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Manishearth
Copy link
Copy Markdown
Member

Could you squash the two commits?

@awalgarg
Copy link
Copy Markdown
Contributor Author

@Manishearth was planning to wait for further feedback, but sure, done :)

Thanks!

@Manishearth
Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo
Copy link
Copy Markdown
Contributor

📌 Commit b1ff30f has been approved by Manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 26, 2016
@bors-servo
Copy link
Copy Markdown
Contributor

⌛ Testing commit b1ff30f with merge 4cb626a...

bors-servo pushed a commit that referenced this pull request Mar 26, 2016
Allow setting preferences to false in WPT tests

First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10204)
<!-- Reviewable:end -->
@bors-servo
Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, gonk, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor

@jdm
Copy link
Copy Markdown
Member

jdm commented Mar 26, 2016

FYI: the changes to wpt/harness need to be made upstream in w3c/wptrunner since we do not have bidirectional sync with at repository.

@jgraham
Copy link
Copy Markdown
Contributor

jgraham commented Mar 26, 2016

It sort of feels like this should use @True and @False to represent boolean values. This will then still work once servo get typed prefs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants