mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #14631 - ConnorGBrewster:datetime_fix, r=Ms2ger
Make datetime just reflect <!-- Please describe your changes on the following line: --> This just uses `make_getter!` for `datetime` rather than checking if `datetime` has data and falling back to the child data if `datetime` has no data. I reverted 2 of the test changes and added back an old test that makes sure that child content is not returned when `datetime` is empty. --- <!-- 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 #14611 (github issue number if applicable). <!-- Either: --> - [X] 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/14631) <!-- Reviewable:end -->
This commit is contained in:
commit
56f236724c
2 changed files with 4 additions and 21 deletions
|
@ -58,12 +58,9 @@ test(function () {
|
|||
test(function () {
|
||||
assert_equals( makeTime('go fish').dateTime, 'go fish' );
|
||||
}, 'the datetime attribute should be reflected by the .dateTime property even if it is invalid');
|
||||
test(function () {
|
||||
assert_equals( makeTime(false,'2000-02-01T03:04:05Z', '2000-02-01').dateTime, '2000-02-01' );
|
||||
}, 'the datetime content attribute should not reflect the textContent when datetime attribute is present.');
|
||||
test(function () {
|
||||
assert_equals( makeTime(false,'2000-02-01T03:04:05Z').dateTime, '2000-02-01T03:04:05Z' );
|
||||
}, 'the datetime content attribute should reflect the textContent when datetime attribute is absent.');
|
||||
test(function() {
|
||||
assert_equals( makeTime(false,'2000-02-01T03:04:05Z').dateTime, '' );
|
||||
}, 'the datetime attribute should not reflect the textContent');
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue