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

DOMImplementation::createDocument should set content type based on namespace #10830

Merged
merged 1 commit into from Apr 29, 2016

Conversation

@cjkenn
Copy link
Contributor

cjkenn commented Apr 24, 2016

Set document content type based on the namespace.
Standard: https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Fixes #10743.


This change is Reviewable

@highfive
Copy link

highfive commented Apr 24, 2016

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

@highfive
Copy link

highfive commented Apr 24, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/domimplementation.rs
@cjkenn cjkenn changed the title DOMImplementation::createDocument should set content type based on namespace #10743 DOMImplementation::createDocument should set content type based on namespace Apr 24, 2016
@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 25, 2016

Thanks for your PR.

You'll need to update ./tests/wpt/metadata/dom/nodes/DOMImplementation-createDocument.html.ini (probably by removing it entirely).

-S-awaiting-review +S-needs-code-changes


Reviewed 1 of 1 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/dom/domimplementation.rs, line 76 [r2] (raw file):
Maybe move the DOMString::from call into the XMLDocument::new call, so this match just has the static strings.


Comments from Reviewable

@Ms2ger Ms2ger assigned Ms2ger and unassigned metajack Apr 25, 2016
@cjkenn
Copy link
Contributor Author

cjkenn commented Apr 25, 2016

Ahhh I didn't realize there was a config file for expected test failures. Since all the tests pass, I will remove it.


Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 26, 2016

Reviewed 3 of 3 files at r3.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/dom/domimplementation.rs, line 84 [r3] (raw file):
I'm sorry, I didn't explain that very well. I'd like you to write Some(DOMString::from(content_type)) here, and not change the XMLDocument::new API itself.


Comments from Reviewable

@cjkenn
Copy link
Contributor Author

cjkenn commented Apr 27, 2016

Review status: all files reviewed at latest revision, 1 unresolved discussion.


components/script/dom/domimplementation.rs, line 84 [r3] (raw file):
I really should have clarified that before I made the change! I did feel awkward doing it that way >_<


Comments from Reviewable

@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 27, 2016

Thanks! This is good to go once you squash the commits into one; let me know if you need help with that.

-S-awaiting-review +S-needs-squash


Reviewed 2 of 2 files at r4.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@cjkenn
Copy link
Contributor Author

cjkenn commented Apr 28, 2016

Squashed and ready to go!


Review status: all files reviewed at latest revision, all discussions resolved, some commit checks pending.


Comments from Reviewable

@KiChjang
Copy link
Member

KiChjang commented Apr 28, 2016

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Apr 28, 2016

📌 Commit fb1ac9c has been approved by Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Apr 28, 2016

Testing commit fb1ac9c with merge e28cab5...

bors-servo added a commit that referenced this pull request Apr 28, 2016
DOMImplementation::createDocument should set content type based on namespace

Set document content type based on the namespace.
Standard: https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Fixes #10743.

<!-- 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/10830)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 28, 2016

💔 Test failed - mac-rel-wpt

@highfive
Copy link

highfive commented Apr 28, 2016

  ▶ Unexpected subtest result in /dom/nodes/Document-contentType/contentType/createDocument.html:
  │ FAIL [expected PASS] document.implementation.createDocument: document.contentType === &#39;application/xml&#39;
  │   → assert_equals: expected &#34;application/xml&#34; but got &#34;application/xhtml+xml&#34;
  │ 
  │ @http://web-platform.test:8000/dom/nodes/Document-contentType/contentType/createDocument.html:3:3
  │ Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1397:20
  │ test@http://web-platform.test:8000/resources/testharness.js:495:9
  └ @http://web-platform.test:8000/dom/nodes/Document-contentType/contentType/createDocument.html:1:1
@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 28, 2016

You'll have to update tests/wpt/web-platform-tests/dom/nodes/Document-contentType/contentType/createDocument.html too.

[10743] Fix namespace in createDocument test

[10743] Remove test ini file, match returns static strings instead of DOMString.

[10743] Fix arguments to XMLDocument::new

Update failing test

[10743] Add content type to XmlDocument constructor based on namespace

[10743] Fix namespace in createDocument test

[10743] Remove test ini file, match returns static strings instead of DOMString.

[10743] Fix arguments to XMLDocument::new

Update failing test
@cjkenn cjkenn force-pushed the cjkenn:10743 branch from 5293892 to d9128fb Apr 29, 2016
@cjkenn
Copy link
Contributor Author

cjkenn commented Apr 29, 2016

Updated that test file and squashed again. I didn't run the full wpt-test suite, as I don't have enough time to wait for it (that or I cannot figure out how to run it faster). I checked a few tests in areas where they might fail because of this and they were passing, so hopefully there is no more failures...

@KiChjang
Copy link
Member

KiChjang commented Apr 29, 2016

@bors-servo r=Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2016

📌 Commit d9128fb has been approved by Ms2ger

@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2016

Testing commit d9128fb with merge 408f9ab...

bors-servo added a commit that referenced this pull request Apr 29, 2016
DOMImplementation::createDocument should set content type based on namespace

Set document content type based on the namespace.
Standard: https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Fixes #10743.

<!-- 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/10830)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 29, 2016

@bors-servo bors-servo merged commit d9128fb into servo:master Apr 29, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@Ms2ger
Copy link
Contributor

Ms2ger commented Apr 29, 2016

@cjkenn thanks! We don't expect you to run all of wpt locally; that's what our bits are for :)

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

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