diff --git a/tests/custom-elements/reactions/HTMLButtonElement.html b/tests/custom-elements/reactions/HTMLButtonElement.html
new file mode 100644
index 0000000..974ff8d
--- /dev/null
+++ b/tests/custom-elements/reactions/HTMLButtonElement.html
@@ -0,0 +1,112 @@
+
+
Custom Elements: CEReactions on HTMLButtonElement interface
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/custom-elements/reactions/reactions.js b/tests/custom-elements/reactions/reactions.js
index 43ce4fd..8a4a142 100644
--- a/tests/custom-elements/reactions/reactions.js
+++ b/tests/custom-elements/reactions/reactions.js
@@ -126,10 +126,15 @@ function testCloner(testFunction, name) {
}, name + ' must enqueue an attributeChanged reaction when cloning an element only for observed attributes');
}
-function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name) {
+function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name, elementName, interfaceName) {
test(function () {
- var element = define_new_custom_element([contentAttributeName]);
- var instance = document.createElement(element.name);
+ if(elementName === undefined) {
+ var element = define_new_custom_element([contentAttributeName]);
+ var instance = document.createElement(element.name);
+ } else {
+ var element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName);
+ var instance = document.createElement(elementName, { is: element.name});
+ }
assert_array_equals(element.takeLog().types(), ['constructed']);
instance[jsAttributeName] = validValue1;
var logEntries = element.takeLog();
@@ -139,8 +144,13 @@ function testReflectAttributeWithContentValues(jsAttributeName, contentAttribute
}, name + ' must enqueue an attributeChanged reaction when adding ' + contentAttributeName + ' content attribute');
test(function () {
- var element = define_new_custom_element([contentAttributeName]);
- var instance = document.createElement(element.name);
+ if(elementName === undefined) {
+ var element = define_new_custom_element([contentAttributeName]);
+ var instance = document.createElement(element.name);
+ } else {
+ var element = define_build_in_custom_element([contentAttributeName], interfaceName, elementName);
+ var instance = document.createElement(elementName, { is: element.name});
+ }
instance[jsAttributeName] = validValue1;
assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
instance[jsAttributeName] = validValue2;
@@ -150,8 +160,8 @@ function testReflectAttributeWithContentValues(jsAttributeName, contentAttribute
}, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute');
}
-function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name) {
- testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name);
+function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name, elementName, interfaceName) {
+ testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name, elementName, interfaceName);
}
function testReflectBooleanAttribute(jsAttributeName, contentAttributeName, name) {