aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-23 01:57:46 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-23 01:57:46 -0700
commit0109cc3ffc6e58a5e294ff469b37a636c98cff70 (patch)
tree036a7d62d22473a6bf76bc12831382f59ef96071
parentb83b4932dac9c0f4fbd6ad6a5b5a0232362c504b (diff)
parentdc63735ca7da94347469301857999f7914c9bc19 (diff)
downloadservo-0109cc3ffc6e58a5e294ff469b37a636c98cff70.tar.gz
servo-0109cc3ffc6e58a5e294ff469b37a636c98cff70.zip
auto merge of #4464 : servo/servo/revert-dataset, r=Ms2ger
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py22
-rw-r--r--components/script/dom/domstringmap.rs37
-rw-r--r--components/script/dom/element.rs48
-rw-r--r--components/script/dom/htmlelement.rs57
-rw-r--r--components/script/dom/webidls/DOMStringMap.webidl1
-rw-r--r--components/script/dom/webidls/HTMLElement.webidl2
-rw-r--r--components/script/tests.rs6
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/custom-attrs.html.ini5
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini8
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini6
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini7
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini31
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini8
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini27
-rw-r--r--tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini14
15 files changed, 147 insertions, 132 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 03efd2b59f5..01efdd012c0 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -2086,14 +2086,11 @@ class CGDefineProxyHandler(CGAbstractMethod):
return CGAbstractMethod.define(self)
def definition_body(self):
- customDefineProperty = 'defineProperty_'
- if self.descriptor.operations['IndexedSetter'] or self.descriptor.operations['NamedSetter']:
- customDefineProperty = 'defineProperty'
body = """\
let traps = ProxyTraps {
getPropertyDescriptor: Some(getPropertyDescriptor),
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor),
- defineProperty: Some(%s),
+ defineProperty: Some(defineProperty_),
getOwnPropertyNames: ptr::null(),
delete_: Some(delete_),
enumerate: ptr::null(),
@@ -2123,7 +2120,7 @@ let traps = ProxyTraps {
};
CreateProxyHandler(&traps, &Class as *const _ as *const _)
-""" % (customDefineProperty, FINALIZE_HOOK_NAME,
+""" % (FINALIZE_HOOK_NAME,
TRACE_HOOK_NAME)
return CGGeneric(body)
@@ -2279,15 +2276,8 @@ class CGPerSignatureCall(CGThing):
invalidEnumValueFatal=not setter) for
i in range(argConversionStartsAt, self.argCount)])
- errorResult = None
- if self.isFallible():
- if nativeMethodName == "NamedSetter":
- errorResult = " false"
- else:
- errorResult = " false as JSBool"
-
cgThings.append(CGCallGenerator(
- errorResult,
+ ' false as JSBool' if self.isFallible() else None,
self.getArguments(), self.argsPre, returnType,
self.extendedAttributes, descriptor, nativeMethodName,
static))
@@ -3846,14 +3836,14 @@ if expando.is_not_null() {
getIndexedOrExpando = getFromExpando + "\n"
namedGetter = self.descriptor.operations['NamedGetter']
- if namedGetter:
- getNamed = ("if (RUST_JSID_IS_STRING(id) != 0) {\n" +
+ if namedGetter and False: #XXXjdm unfinished
+ getNamed = ("if (JSID_IS_STRING(id)) {\n" +
" let name = jsid_to_str(cx, id);\n" +
" let this = UnwrapProxy(proxy);\n" +
" let this = JS::from_raw(this);\n" +
" let this = this.root();\n" +
CGIndenter(CGProxyNamedGetter(self.descriptor, templateValues)).define() +
- "}\n")
+ "}\n") % (self.descriptor.concreteType)
else:
getNamed = ""
diff --git a/components/script/dom/domstringmap.rs b/components/script/dom/domstringmap.rs
index ff4990eb5f6..26218445c80 100644
--- a/components/script/dom/domstringmap.rs
+++ b/components/script/dom/domstringmap.rs
@@ -2,56 +2,51 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::DOMStringMapBinding;
use dom::bindings::codegen::Bindings::DOMStringMapBinding::DOMStringMapMethods;
-use dom::bindings::error::ErrorResult;
use dom::bindings::global::GlobalRef;
-use dom::bindings::js::{JS, JSRef, Temporary};
+use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
-use dom::node::window_from_node;
-use dom::htmlelement::{HTMLElement, HTMLElementCustomAttributeHelpers};
use servo_util::str::DOMString;
+use std::collections::HashMap;
+
#[dom_struct]
pub struct DOMStringMap {
+ map: DOMRefCell<HashMap<DOMString, DOMString>>,
reflector_: Reflector,
- element: JS<HTMLElement>,
}
impl DOMStringMap {
- fn new_inherited(element: JSRef<HTMLElement>) -> DOMStringMap {
+ fn new_inherited() -> DOMStringMap {
DOMStringMap {
+ map: DOMRefCell::new(HashMap::new()),
reflector_: Reflector::new(),
- element: JS::from_rooted(element),
}
}
- pub fn new(element: JSRef<HTMLElement>) -> Temporary<DOMStringMap> {
- let window = window_from_node(element).root();
- reflect_dom_object(box DOMStringMap::new_inherited(element),
- GlobalRef::Window(window.root_ref()), DOMStringMapBinding::Wrap)
+ pub fn new(global: GlobalRef) -> Temporary<DOMStringMap> {
+ reflect_dom_object(box DOMStringMap::new_inherited(),
+ global, DOMStringMapBinding::Wrap)
}
}
-// https://html.spec.whatwg.org/#domstringmap
impl<'a> DOMStringMapMethods for JSRef<'a, DOMStringMap> {
- fn NamedCreator(self, name: DOMString, value: DOMString) -> ErrorResult {
- self.NamedSetter(name, value)
+ fn NamedCreator(self, name: DOMString, value: DOMString) {
+ self.map.borrow_mut().insert(name, value);
}
fn NamedDeleter(self, name: DOMString) {
- let element = self.element.root();
- element.delete_custom_attr(name)
+ self.map.borrow_mut().remove(&name);
}
- fn NamedSetter(self, name: DOMString, value: DOMString) -> ErrorResult {
- let element = self.element.root();
- element.set_custom_attr(name, value)
+ fn NamedSetter(self, name: DOMString, value: DOMString) {
+ self.map.borrow_mut().insert(name, value);
}
fn NamedGetter(self, name: DOMString, found: &mut bool) -> DOMString {
- let element = self.element.root();
- match element.get_custom_attr(name) {
+ match self.map.borrow().get(&name) {
Some(value) => {
*found = true;
value.clone()
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 1c069ea3aa3..00f481dcd32 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -459,7 +459,6 @@ impl LayoutElementHelpers for JS<Element> {
pub trait ElementHelpers<'a> {
fn html_element_in_html_document(self) -> bool;
fn local_name(self) -> &'a Atom;
- fn parsed_name(self, name: DOMString) -> DOMString;
fn namespace(self) -> &'a Namespace;
fn prefix(self) -> &'a Option<DOMString>;
fn attrs(&self) -> Ref<Vec<JS<Attr>>>;
@@ -482,15 +481,6 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
&self.extended_deref().local_name
}
- // https://dom.spec.whatwg.org/#concept-element-attributes-get-by-name
- fn parsed_name(self, name: DOMString) -> DOMString {
- if self.html_element_in_html_document() {
- name.as_slice().to_ascii_lower()
- } else {
- name
- }
- }
-
fn namespace(self) -> &'a Namespace {
&self.extended_deref().namespace
}
@@ -619,7 +609,6 @@ pub trait AttributeHandlers {
value: DOMString,
prefix: Option<DOMString>);
fn set_attribute(self, name: &Atom, value: AttrValue);
- fn set_custom_attribute(self, name: DOMString, value: DOMString) -> ErrorResult;
fn do_set_attribute(self, local_name: Atom, value: AttrValue,
name: Atom, namespace: Namespace,
prefix: Option<DOMString>, cb: |JSRef<Attr>| -> bool);
@@ -689,23 +678,6 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> {
ns!(""), None, |attr| *attr.local_name() == *name);
}
- // https://html.spec.whatwg.org/multipage/dom.html#attr-data-*
- fn set_custom_attribute(self, name: DOMString, value: DOMString) -> ErrorResult {
- // Step 1.
- match xml_name_type(name.as_slice()) {
- InvalidXMLName => return Err(InvalidCharacter),
- _ => {}
- }
-
- // Steps 2-5.
- let name = Atom::from_slice(name.as_slice());
- let value = self.parse_attribute(&ns!(""), &name, value);
- self.do_set_attribute(name.clone(), value, name.clone(), ns!(""), None, |attr| {
- *attr.name() == name && *attr.namespace() == ns!("")
- });
- Ok(())
- }
-
fn do_set_attribute(self, local_name: Atom, value: AttrValue,
name: Atom, namespace: Namespace,
prefix: Option<DOMString>, cb: |JSRef<Attr>| -> bool) {
@@ -930,7 +902,11 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
// http://dom.spec.whatwg.org/#dom-element-getattribute
fn GetAttribute(self, name: DOMString) -> Option<DOMString> {
- let name = self.parsed_name(name);
+ let name = if self.html_element_in_html_document() {
+ name.as_slice().to_ascii_lower()
+ } else {
+ name
+ };
self.get_attribute(ns!(""), &Atom::from_slice(name.as_slice())).root()
.map(|s| s.Value())
}
@@ -955,13 +931,17 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
}
// Step 2.
- let name = self.parsed_name(name);
+ let name = if self.html_element_in_html_document() {
+ name.as_slice().to_ascii_lower()
+ } else {
+ name
+ };
// Step 3-5.
let name = Atom::from_slice(name.as_slice());
let value = self.parse_attribute(&ns!(""), &name, value);
self.do_set_attribute(name.clone(), value, name.clone(), ns!(""), None, |attr| {
- *attr.name() == name
+ attr.name().as_slice() == name.as_slice()
});
Ok(())
}
@@ -1032,7 +1012,11 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
// http://dom.spec.whatwg.org/#dom-element-removeattribute
fn RemoveAttribute(self, name: DOMString) {
- let name = self.parsed_name(name);
+ let name = if self.html_element_in_html_document() {
+ name.as_slice().to_ascii_lower()
+ } else {
+ name
+ };
self.remove_attribute(ns!(""), name.as_slice())
}
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index f36e84a078e..e38ab5ff523 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -13,13 +13,10 @@ use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLFrameSetElementDeriv
use dom::bindings::codegen::InheritTypes::{EventTargetCast, HTMLInputElementCast};
use dom::bindings::codegen::InheritTypes::{HTMLElementDerived, HTMLBodyElementDerived};
use dom::bindings::js::{JSRef, Temporary, MutNullableJS};
-use dom::bindings::error::ErrorResult;
-use dom::bindings::error::Error::Syntax;
use dom::bindings::utils::{Reflectable, Reflector};
use dom::cssstyledeclaration::CSSStyleDeclaration;
use dom::document::Document;
-use dom::domstringmap::DOMStringMap;
-use dom::element::{Element, ElementTypeId, ActivationElementHelpers, AttributeHandlers};
+use dom::element::{Element, ElementTypeId, ActivationElementHelpers};
use dom::eventtarget::{EventTarget, EventTargetHelpers, EventTargetTypeId};
use dom::node::{Node, NodeTypeId, window_from_node};
use dom::virtualmethods::VirtualMethods;
@@ -34,7 +31,6 @@ use std::default::Default;
pub struct HTMLElement {
element: Element,
style_decl: MutNullableJS<CSSStyleDeclaration>,
- dataset: MutNullableJS<DOMStringMap>,
}
impl HTMLElementDerived for EventTarget {
@@ -52,7 +48,6 @@ impl HTMLElement {
HTMLElement {
element: Element::new_inherited(type_id, tag_name, ns!(HTML), prefix, document),
style_decl: Default::default(),
- dataset: Default::default(),
}
}
@@ -94,11 +89,6 @@ impl<'a> HTMLElementMethods for JSRef<'a, HTMLElement> {
global_event_handlers!(NoOnload)
- // https://html.spec.whatwg.org/multipage/dom.html#dom-dataset
- fn Dataset(self) -> Temporary<DOMStringMap> {
- self.dataset.or_init(|| DOMStringMap::new(self))
- }
-
fn GetOnload(self) -> Option<EventHandlerNonNull> {
if self.is_body_or_frameset() {
let win = window_from_node(self).root();
@@ -132,51 +122,6 @@ impl<'a> HTMLElementMethods for JSRef<'a, HTMLElement> {
}
}
-// https://html.spec.whatwg.org/#attr-data-*
-pub trait HTMLElementCustomAttributeHelpers {
- fn set_custom_attr(self, name: DOMString, value: DOMString) -> ErrorResult;
- fn get_custom_attr(self, name: DOMString) -> Option<DOMString>;
- fn delete_custom_attr(self, name: DOMString);
-}
-
-fn to_snake_case(name: DOMString) -> DOMString {
- let mut attr_name = "data-".into_string();
- for ch in name.as_slice().chars() {
- if ch.is_uppercase() {
- attr_name.push('\x2d');
- attr_name.push(ch.to_lowercase());
- } else {
- attr_name.push(ch);
- }
- }
- attr_name
-}
-
-impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
- fn set_custom_attr(self, name: DOMString, value: DOMString) -> ErrorResult {
- if name.as_slice().chars()
- .skip_while(|&ch| ch != '\u002d')
- .nth(1).map_or(false, |ch| ch as u8 - b'a' < 26) {
- return Err(Syntax);
- }
- let element: JSRef<Element> = ElementCast::from_ref(self);
- element.set_custom_attribute(to_snake_case(name), value)
- }
-
- fn get_custom_attr(self, name: DOMString) -> Option<DOMString> {
- let element: JSRef<Element> = ElementCast::from_ref(self);
- element.get_attribute(ns!(""), &Atom::from_slice(to_snake_case(name).as_slice())).map(|attr| {
- let attr = attr.root();
- attr.value().as_slice().to_string()
- })
- }
-
- fn delete_custom_attr(self, name: DOMString) {
- let element: JSRef<Element> = ElementCast::from_ref(self);
- element.remove_attribute(ns!(""), to_snake_case(name).as_slice())
- }
-}
-
impl<'a> VirtualMethods for JSRef<'a, HTMLElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
let element: &JSRef<Element> = ElementCast::from_borrowed_ref(self);
diff --git a/components/script/dom/webidls/DOMStringMap.webidl b/components/script/dom/webidls/DOMStringMap.webidl
index c11d47c5a85..aa4d3ed9673 100644
--- a/components/script/dom/webidls/DOMStringMap.webidl
+++ b/components/script/dom/webidls/DOMStringMap.webidl
@@ -7,7 +7,6 @@
[OverrideBuiltins]
interface DOMStringMap {
getter DOMString (DOMString name);
- [Throws]
setter creator void (DOMString name, DOMString value);
deleter void (DOMString name);
};
diff --git a/components/script/dom/webidls/HTMLElement.webidl b/components/script/dom/webidls/HTMLElement.webidl
index 90ef09d7a9f..39c7699900d 100644
--- a/components/script/dom/webidls/HTMLElement.webidl
+++ b/components/script/dom/webidls/HTMLElement.webidl
@@ -10,7 +10,7 @@ interface HTMLElement : Element {
attribute DOMString lang;
// attribute boolean translate;
// attribute DOMString dir;
- readonly attribute DOMStringMap dataset;
+ //readonly attribute DOMStringMap dataset;
// microdata
// attribute boolean itemScope;
diff --git a/components/script/tests.rs b/components/script/tests.rs
index e4636c5b5ad..8f7bbda8385 100644
--- a/components/script/tests.rs
+++ b/components/script/tests.rs
@@ -41,8 +41,8 @@ macro_rules! sizeof_checker (
sizeof_checker!(size_event_target, EventTarget, 56)
sizeof_checker!(size_node, Node, 304)
sizeof_checker!(size_element, Element, 448)
-sizeof_checker!(size_htmlelement, HTMLElement, 480)
-sizeof_checker!(size_div, HTMLDivElement, 480)
-sizeof_checker!(size_span, HTMLSpanElement, 480)
+sizeof_checker!(size_htmlelement, HTMLElement, 464)
+sizeof_checker!(size_div, HTMLDivElement, 464)
+sizeof_checker!(size_span, HTMLSpanElement, 464)
sizeof_checker!(size_text, Text, 336)
sizeof_checker!(size_characterdata, CharacterData, 336)
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/custom-attrs.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/custom-attrs.html.ini
new file mode 100644
index 00000000000..2a68450037d
--- /dev/null
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/custom-attrs.html.ini
@@ -0,0 +1,5 @@
+[custom-attrs.html]
+ type: testharness
+ [Setting an Element\'s dataset property should not interfere with namespaced attributes with same name]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini
new file mode 100644
index 00000000000..7590d513387
--- /dev/null
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/data_unicode_attr.html.ini
@@ -0,0 +1,8 @@
+[data_unicode_attr.html]
+ type: testharness
+ [dataset - SBCS]
+ expected: FAIL
+
+ [dataset - UNICODE]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini
index 5718c7b3ebb..a88947eac79 100644
--- a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-delete.html.ini
@@ -12,6 +12,9 @@
[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
@@ -21,3 +24,6 @@
[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
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini
index 4dd8405e31c..7b228c9e6ea 100644
--- a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-enumeration.html.ini
@@ -1,3 +1,8 @@
[dataset-enumeration.html]
type: testharness
- expected: CRASH
+ [A dataset should be enumeratable.]
+ expected: FAIL
+
+ [Only attributes who qualify as dataset properties should be enumeratable in the dataset.]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini
index f6649ae7398..135cbd44b1a 100644
--- a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-get.html.ini
@@ -1,3 +1,32 @@
[dataset-get.html]
type: testharness
- expected: CRASH
+ [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
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini
new file mode 100644
index 00000000000..69c8e9c2f83
--- /dev/null
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-prototype.html.ini
@@ -0,0 +1,8 @@
+[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
+
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini
index 8887ec05b9e..de7d444eca4 100644
--- a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset-set.html.ini
@@ -1,5 +1,32 @@
[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
diff --git a/tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini
new file mode 100644
index 00000000000..299c83c3c93
--- /dev/null
+++ b/tests/wpt/metadata/html/dom/elements/global-attributes/dataset.html.ini
@@ -0,0 +1,14 @@
+[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
+