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

Implement dom exception constructor #22480

Merged
merged 4 commits into from Mar 20, 2019

Conversation

Projects
None yet
8 participants
@cdeler
Copy link
Contributor

commented Dec 17, 2018

The constructor method was implemented

I have a question: should I edit ./mach test-wpt expectations?


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #22412
  • There are tests for these changes

This change is Reviewable

@highfive

This comment has been minimized.

Copy link

commented Dec 17, 2018

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

@highfive

This comment has been minimized.

Copy link

commented Dec 17, 2018

Heads up! This PR modifies the following files:

  • @asajeffrey: components/script/dom/webidls/DOMException.webidl, components/script/dom/domexception.rs
  • @KiChjang: components/script/dom/webidls/DOMException.webidl, components/script/dom/domexception.rs
@highfive

This comment has been minimized.

Copy link

commented Dec 17, 2018

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@jdm

This comment has been minimized.

Copy link
Member

commented Dec 17, 2018

Yes, you should follow https://github.com/servo/servo/blob/master/tests/wpt/README.md#updating-test-expectations and you can restrict the tests that are run to the directories that are known to use this.

@cdeler cdeler force-pushed the cdeler:implement-DOMException-constructor branch from 37fc164 to 83d318c Dec 17, 2018

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Dec 17, 2018

@jdm I've updated expectations for the tests, which are executed by ./mach test-wpt WebIDL

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Dec 21, 2018

@jdm @SimonSapin
Hello,
Do you have a chance to review the PR? May be I should change something?

@jdm jdm assigned jdm and unassigned SimonSapin Dec 21, 2018

@jdm jdm removed the S-awaiting-review label Dec 21, 2018

@jdm

jdm approved these changes Dec 21, 2018

Copy link
Member

left a comment

This looks like a sensible implementation of the specification. Thanks!

@jdm

This comment has been minimized.

Copy link
Member

commented Dec 22, 2018

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2018

📌 Commit 83d318c has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2018

⌛️ Testing commit 83d318c with merge 8c82cd9...

bors-servo added a commit that referenced this pull request Dec 22, 2018

Auto merge of #22480 - cdeler:implement-DOMException-constructor, r=jdm
Implement dom exception constructor

The constructor method was implemented

I have a question: should I edit `./mach test-wpt` expectations?

---
<!-- 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] These changes fix #22412
- [x] There are tests for these changes

<!-- 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/22480)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2018

💔 Test failed - mac-rel-wpt4

@jdm

This comment has been minimized.

Copy link
Member

commented Dec 22, 2018

These changes expose a problem with the upstream Bluetooth tests - they rely on a Chrome-only test feature.

@jdm

This comment has been minimized.

Copy link
Member

commented Dec 22, 2018

This actually comes from code that is supposed to deal with non-Chromium browsers: https://searchfox.org/mozilla-central/source/testing/web-platform/tests/bluetooth/resources/bluetooth-helpers.js#21-24
We should be able to fix this by changing the condition to if (!('Mojo' in this)) instead.

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Dec 22, 2018

Wilco

@CYBAI

This comment has been minimized.

Copy link
Collaborator

commented Dec 23, 2018

Could we do rebase instead of merge ?
btw, do you mind to squash these commit into one or two commits ? ( one for implementation of DOMException constructor and another one for updating test expectation; or, it's also fine to squash them into just one commit :) )

@jdm

This comment has been minimized.

Copy link
Member

commented Dec 23, 2018

I actually prefer to keep the commits together when possible. It makes sense to include the test result changes in the same commit as the code changes that caused them.

@cdeler cdeler force-pushed the cdeler:implement-DOMException-constructor branch from b3c7c2a to e55b76b Dec 23, 2018

@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

@bors-servo r+
Thanks!

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

📌 Commit 18fe572 has been approved by jdm

bors-servo added a commit that referenced this pull request Mar 20, 2019

Auto merge of #22480 - cdeler:implement-DOMException-constructor, r=jdm
Implement dom exception constructor

The constructor method was implemented

I have a question: should I edit `./mach test-wpt` expectations?

---
<!-- 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] These changes fix #22412
- [x] There are tests for these changes

<!-- 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/22480)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

⌛️ Testing commit 18fe572 with merge 1845f1a...

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

💔 Test failed - linux-rel-wpt

@highfive

This comment has been minimized.

Copy link

commented Mar 20, 2019

Test failures:

▶ ERROR [expected OK] /bluetooth/requestDevice/canonicalizeFilter/empty-services-member.https.html └ → ''
  ▶ ERROR [expected OK] /bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-name-unicode.https.html
  └   → ''

  ▶ ERROR [expected OK] /bluetooth/requestDevice/canonicalizeFilter/max-length-exceeded-namePrefix-unicode.https.html
  └   → ''

  ▶ ERROR [expected OK] /bluetooth/requestDevice/canonicalizeFilter/wrong-service-in-services-member.https.html
  └   → ''
@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Looks like four tests results need to have a toplevel expected: ERROR added.

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2019

@jdm
It's strange. When I run the tests locally, I've got:

(SRV) user ~/workspace/skv/servo % ./mach test-wpt --processes 1 --release --product=servodriver --headless /bluetooth/requestDevice/canonicalizeFilter                                
Running 19 tests in web-platform-tests

Unsupported test type wdspec for product servodriver
Ran 19 tests finished in 5.0 seconds.
  • 19 ran as expected. 0 tests skipped.
@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Hmm. I suspect that this code is racy in Servo; maybe the page finishes loading sometimes before the promise_test call is executed. I think we should modify that file to immediately call promise_test instead of calling it from a then() callback.

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2019

@jdm

Something like that?

function bluetooth_test(func, name, properties) {
      promise_test(t => Promise.resolve()
      // Trigger Chromium-specific setup.
      .then(performChromiumSetup)
      .then(() => func(t))
      .then(() => navigator.bluetooth.test.allResponsesConsumed())
      .then(consumed => assert_true(consumed)), name, properties);
}

I did it locally. Ran test a couple of times and got that /bluetooth/requestDevice/canonicalizeFilter tests can fail unexpectedly.

Maybe it would be better to turn them off?

UPD without the above changeset these tests also fail unexpectedly.

@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Humbug. Let's try disabling those tests in that case (disable: #23066 in the ini files) and see if that's enough to merge these changes.

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2019

@jdm

I'm sorry, looks like I don't understand you. Should I disable /bluetooth/requestDevice/canonicalizeFilter, also should I do that in this PR?

By the way:

I ran the tests

(SRV) user ~/workspace/skv/servo % ./mach test-wpt --processes 1 --release --product=servodriver --headless /bluetooth/requestDevice/canonicalizeFilter
Running 19 tests in web-platform-tests

Unsupported test type wdspec for product servodriver
  ▶ ERROR [expected OK] /bluetooth/requestDevice/canonicalizeFilter/filters-xor-acceptAllDevices.https.html
  └   → ''

Ran 19 tests finished in 6.0 seconds.
  • 18 ran as expected. 0 tests skipped.
  • 1 tests had errors unexpectedly

@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

Yes, let's try adding a __dir__.ini to tests/wpt/metadata/bluetooth/requestDevice/canonicalizeFilter/ which contains disable: #23066. This will cause all of those tests to be skipped.

@cdeler

This comment has been minimized.

Copy link
Contributor Author

commented Mar 20, 2019

@jdm

I did it (# is a special .ini character, so I escaped it). If test pass, I can squash commits.

@jdm

This comment has been minimized.

Copy link
Member

commented Mar 20, 2019

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

📌 Commit 76fed04 has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

⌛️ Testing commit 76fed04 with merge 6d308c3...

bors-servo added a commit that referenced this pull request Mar 20, 2019

Auto merge of #22480 - cdeler:implement-DOMException-constructor, r=jdm
Implement dom exception constructor

The constructor method was implemented

I have a question: should I edit `./mach test-wpt` expectations?

---
<!-- 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] These changes fix #22412
- [x] There are tests for these changes

<!-- 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/22480)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

commented Mar 20, 2019

@bors-servo bors-servo merged commit 76fed04 into servo:master Mar 20, 2019

3 of 4 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
Taskcluster (pull_request) TaskGroup: success
Details
Travis CI - Pull Request 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
You can’t perform that action at this time.