mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Implement HTMLElement.dataset (fixes #2974).
This commit is contained in:
parent
285a06ff59
commit
57c520d8cf
15 changed files with 117 additions and 138 deletions
|
@ -1,5 +0,0 @@
|
|||
[custom-attrs.html]
|
||||
type: testharness
|
||||
[Setting an Element\'s dataset property should not interfere with namespaced attributes with same name]
|
||||
expected: FAIL
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[data_unicode_attr.html]
|
||||
type: testharness
|
||||
[dataset - SBCS]
|
||||
expected: FAIL
|
||||
|
||||
[dataset - UNICODE]
|
||||
expected: FAIL
|
||||
|
|
@ -12,9 +12,6 @@
|
|||
[Deleting element.dataset[\'Foo\'\] should also remove an attribute with name \'data--foo\' should it exist.]
|
||||
expected: FAIL
|
||||
|
||||
[Deleting element.dataset[\'-foo\'\] should also remove an attribute with name \'data--foo\' should it exist.]
|
||||
expected: FAIL
|
||||
|
||||
[Deleting element.dataset[\'-Foo\'\] should also remove an attribute with name \'data---foo\' should it exist.]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -24,6 +21,3 @@
|
|||
[Deleting element.dataset[\'\xc3\xa0\'\] should also remove an attribute with name \'data-\xc3\xa0\' should it exist.]
|
||||
expected: FAIL
|
||||
|
||||
[Deleting element.dataset[\'foo\'\] should not throw if even if the element does now have an attribute with the name data-foo.]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
[dataset-enumeration.html]
|
||||
type: testharness
|
||||
[A dataset should be enumeratable.]
|
||||
expected: FAIL
|
||||
|
||||
[Only attributes who qualify as dataset properties should be enumeratable in the dataset.]
|
||||
expected: FAIL
|
||||
|
||||
expected: CRASH
|
||||
|
|
|
@ -1,32 +1,3 @@
|
|||
[dataset-get.html]
|
||||
type: testharness
|
||||
[Getting element.dataset[\'foo\'\] should return the value of element.getAttribute(\'data-foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'fooBar\'\] should return the value of element.getAttribute(\'data-foo-bar\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'-\'\] should return the value of element.getAttribute(\'data--\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'Foo\'\] should return the value of element.getAttribute(\'data--foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'-Foo\'\] should return the value of element.getAttribute(\'data---foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'foo\'\] should return the value of element.getAttribute(\'data-Foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'\'\] should return the value of element.getAttribute(\'data-\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'\xc3\xa0\'\] should return the value of element.getAttribute(\'data-\xc3\xa0\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Getting element.dataset[\'toString\'\] should return the value of element.getAttribute(\'data-to-string\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Tests that an attribute named dataFoo does not make an entry in the dataset DOMStringMap.]
|
||||
expected: FAIL
|
||||
|
||||
expected: CRASH
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
[dataset-prototype.html]
|
||||
type: testharness
|
||||
[An elements dataset property is an instance of a DOMStringMap]
|
||||
expected: FAIL
|
||||
|
||||
[Properties on Object.prototype should shine through.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,32 +1,5 @@
|
|||
[dataset-set.html]
|
||||
type: testharness
|
||||
[Setting element.dataset[\'foo\'\] should also change the value of element.getAttribute(\'data-foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'fooBar\'\] should also change the value of element.getAttribute(\'data-foo-bar\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'-\'\] should also change the value of element.getAttribute(\'data--\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'Foo\'\] should also change the value of element.getAttribute(\'data--foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'-Foo\'\] should also change the value of element.getAttribute(\'data---foo\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'\'\] should also change the value of element.getAttribute(\'data-\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'\xc3\xa0\'\] should also change the value of element.getAttribute(\'data-\xc3\xa0\')\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'-foo\'\] should throw a SYNTAX_ERR\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'foo \'\] should throw an INVALID_CHARACTER_ERR\']
|
||||
expected: FAIL
|
||||
|
||||
[Setting element.dataset[\'foo\xef\xa4\x80\'\] should throw an INVALID_CHARACTER_ERR\']
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
[dataset.html]
|
||||
type: testharness
|
||||
[Should return \'undefined\' before setting an attribute]
|
||||
expected: FAIL
|
||||
|
||||
[Should return \'value\' if that\'s the value]
|
||||
expected: FAIL
|
||||
|
||||
[Should return the empty string if that\'s the value]
|
||||
expected: FAIL
|
||||
|
||||
[Should return \'undefined\' after removing an attribute]
|
||||
expected: FAIL
|
||||
|
|
@ -921,12 +921,6 @@
|
|||
[DOMStringMap interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[DOMStringMap must be primary interface of document.head.dataset]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of document.head.dataset]
|
||||
expected: FAIL
|
||||
|
||||
[DOMElementMap interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -954,9 +948,6 @@
|
|||
[HTMLElement interface: attribute dir]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: attribute dataset]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: attribute itemScope]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -1215,9 +1206,6 @@
|
|||
[HTMLElement interface: document.createElement("noscript") must inherit property "dir" with the proper type (3)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: document.createElement("noscript") must inherit property "dataset" with the proper type (4)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLElement interface: document.createElement("noscript") must inherit property "itemScope" with the proper type (5)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
[basic.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[<img src="/images/green-256x256.png" data-expect="256">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 1x" data-expect="256">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 1.6x" data-expect="160">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 2x" data-expect="128">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 10000x" data-expect="0">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 9e99999999999999999999999x" data-expect="0">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 256w" sizes="256px" data-expect="256">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 512w" sizes="256px" data-expect="128">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 256w" sizes="512px" data-expect="512">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 256w" sizes="1px" data-expect="1">]
|
||||
expected: FAIL
|
||||
|
||||
[<img srcset="/images/green-256x256.png 256w" sizes="0px" data-expect="0">]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue