Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix Blob type-string #12400
Fix Blob type-string #12400
Conversation
highfive
commented
Jul 12, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jul 12, 2016
|
Can we start including tests with such PRs, now that it's testable (fine if you put the test in a later PR) @bors-servo r+ |
|
|
Fix Blob type-string Use a final construction guard over type-string format; and other minor related cleanups r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12400) <!-- Reviewable:end -->
|
|
|
|
|
Wow ... unexpected but nice to see the failures |
|
From spec
Thus I doubt if the failed test cases are reasonable at all |
|
@Manishearth Comment on the failed tests? |
|
This is sort of contradictory. On one hand, when constructing the blob, the type has these restrictions:
When getting the type, the condition that it is parseable is further introduced. Firefox does not seem to impose either of these restrictions on it, a content type of @sicking @annevk thoughts? This looks like a spec bug. The spec seems to assert that the following code: a = new Blob([1,2,3], {type: "text/(plain"});
console.log(a.type) // prints text/(plainshouldn't work. It does in Firefox, and the WPT tests /FileAPI/blob/Blob-constructor.html / /FileAPI/blob/Blob-slice.html rely on it |
|
|
|
Filed w3c/FileAPI#43 Feel free to mark those tests as expected failures and file a tracking issue. (Or do the reverse, make the tests work, and file an issue) |
|
@Manishearth okay, thanks! |
|
Since most browsers follow this behavior, it may make more sense to make the tests work. |
|
@bors-servo try |
Fix Blob type-string Use a final construction guard over type-string format; and other minor related cleanups r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12400) <!-- Reviewable:end -->
|
|
|
@bors-servo retry Looks like git problem |
Fix Blob type-string Use a final construction guard over type-string format; and other minor related cleanups r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12400) <!-- Reviewable:end -->
|
|
sicking
commented
Jul 13, 2016
|
Since I was pinged... I think that in theory it would be nice to enforce that the Either way, filing a bug against the spec is likely the right thing to do. |
|
@sicking thanks. Bug was filed at w3c/FileAPI#43. What are your thoughts on the issue of the character range in the constructor? Chrome and the spec agree, Firefox doesn't. |
sicking
commented
Jul 13, 2016
|
If spec and Chrome agree, then we should change firefox to match both of those. But based on comments in that bug, Chrome doesn't seem to match the spec exactly either. But lets continue diescussion over in the other bug. |
|
@bors-servo r+ r+ for now, we can update when we decide on the spec thing. |
|
|
Fix Blob type-string Use a final construction guard over type-string format; and other minor related cleanups r? @Manishearth <!-- Please describe your changes on the following line: --> --- <!-- 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 <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/12400) <!-- Reviewable:end -->
|
|
izgzhen commentedJul 12, 2016
•
edited by larsbergstrom
Use a final construction guard over type-string format; and other minor related cleanups
r? @Manishearth
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is