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

Add wpt tests for send #9971

Merged
merged 1 commit into from Mar 18, 2016
Merged

Add wpt tests for send #9971

merged 1 commit into from Mar 18, 2016

Conversation

@dlrobertson
Copy link
Contributor

dlrobertson commented Mar 11, 2016

Add wpt tests for send that do not set the responseType and compare the result against a string.

Fixes #9357

r? @KiChjang


This change is Review on Reviewable

@dlrobertson
Copy link
Contributor Author

dlrobertson commented Mar 11, 2016

Review status: 0 of 5 files reviewed at latest revision, 2 unresolved discussions.


a discussion (no related file):
I was confused as to what tests should be added, so I based it off of the comment by @jdm. If you would like tests for URLSearchParams etc, just let me know


tests/wpt/mozilla/meta/MANIFEST.json, line 6110 [r1] (raw file):
These were the only two tests among tests/wpt/web-platform-tests/XMLHttpRequest/send-data-* that either set the responseType (blob) or would fail without comparing the data against a string (arraybuffer).


Comments from the review on Reviewable.io

@KiChjang
Copy link
Member

KiChjang commented Mar 12, 2016

We're not supposed to add in WPT tests, per the discussion in the issue. Instead, we need unit tests, and they're written in Rust.

@jdm
Copy link
Member

jdm commented Mar 12, 2016

No, this PR is doing what was requested in the original issue - we're adding servo-specific WPT tests that don't get upstreamed that allow us to test the things we care about without relying on features we don't implement yet.

@dlrobertson dlrobertson force-pushed the dlrobertson:i9357 branch from c6093f3 to 893aff6 Mar 12, 2016
@dlrobertson
Copy link
Contributor Author

dlrobertson commented Mar 12, 2016

So what should I do about resources/content.py? the lint requests a license, but the file is copied from web-platform-tests.

If licensing is a problem, I can always just make a new content.py and add our license header.

"path": "mozilla/send-without-content-type-blob.htm",
"url": "/_mozilla/mozilla/send-without-content-type-blob.htm"
}
],

This comment has been minimized.

@KiChjang

KiChjang Mar 12, 2016

Member

Is this manually typed? Tidy doesn't like the indentation of the brackets.

This comment has been minimized.

@dlrobertson

dlrobertson Mar 13, 2016

Author Contributor

Good point! Yes it was, updated using mach create-wpt

@dlrobertson dlrobertson force-pushed the dlrobertson:i9357 branch from 893aff6 to 5ccd57e Mar 12, 2016
@dlrobertson dlrobertson force-pushed the dlrobertson:i9357 branch 3 times, most recently from 7df25c2 to 2109a08 Mar 12, 2016
@KiChjang
Copy link
Member

KiChjang commented Mar 16, 2016

Just one small nit - why are the test files named -without-content-type-?

@dlrobertson
Copy link
Contributor Author

dlrobertson commented Mar 16, 2016

Ah! Sorry, should have been send-without-response-type-*. Let me know if you prefer another name.


Review status: 0 of 4 files reviewed at latest revision, 3 unresolved discussions.


Comments from the review on Reviewable.io

@KiChjang
Copy link
Member

KiChjang commented Mar 16, 2016

This still is a misnomer - the response being parsed is a text response. I suggest removing the -without-response-type altogether since this isn't relevant to the test that you have wrote.

@dlrobertson
Copy link
Contributor Author

dlrobertson commented Mar 16, 2016

True, changed it to just send-*.

};

xhr.open("POST", "./resources/content.py", true);
xhr.responseType = "text";

This comment has been minimized.

@KiChjang

KiChjang Mar 16, 2016

Member

We shouldn't be explicitly setting the responseType here - we should instead assert that the response we read from xhr is a text string.

@KiChjang
Copy link
Member

KiChjang commented Mar 16, 2016

I'm unsure about whether we should include tests for URLSearchParams. If we do include it, I think it should be a WPT test instead of a mozilla test.

Add wpt tests for send that do not set the responseType and
compare the result against a string.
@dlrobertson dlrobertson force-pushed the dlrobertson:i9357 branch from 8e4d3aa to 8ca7ff1 Mar 17, 2016
@dlrobertson
Copy link
Contributor Author

dlrobertson commented Mar 18, 2016

I'm unsure about whether we should include tests for URLSearchParams. If we do include it, I think it should be a WPT test instead of a mozilla test.

Makes sense!

I removed the responseType = "text".

@KiChjang
Copy link
Member

KiChjang commented Mar 18, 2016

I'm going to go ahead and merge this. Filed web-platform-tests/wpt#2709 for the missing test coverage. Thanks for working on this!

@bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Mar 18, 2016

📌 Commit 8ca7ff1 has been approved by KiChjang

@bors-servo
Copy link
Contributor

bors-servo commented Mar 18, 2016

Testing commit 8ca7ff1 with merge be330b5...

bors-servo added a commit that referenced this pull request Mar 18, 2016
Add wpt tests for send

Add wpt tests for send that do not set the responseType and compare the result against a string.

Fixes #9357

r? @KiChjang

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

bors-servo commented Mar 18, 2016

💔 Test failed - android

@Ms2ger
Copy link
Contributor

Ms2ger commented Mar 18, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Mar 18, 2016

Testing commit 8ca7ff1 with merge 14c6497...

bors-servo added a commit that referenced this pull request Mar 18, 2016
Add wpt tests for send

Add wpt tests for send that do not set the responseType and compare the result against a string.

Fixes #9357

r? @KiChjang

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

bors-servo commented Mar 18, 2016

@bors-servo bors-servo merged commit 8ca7ff1 into servo:master Mar 18, 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
@dlrobertson dlrobertson deleted the dlrobertson:i9357 branch Mar 18, 2016
@jdm jdm mentioned this pull request Mar 26, 2018
4 of 4 tasks complete
nupurbaghel added a commit to nupurbaghel/servo that referenced this pull request Mar 28, 2018
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.