New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CEReactions tests #14711
Add CEReactions tests #14711
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLCanvasElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="width, height of HTMLCanvasElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-canvas-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('width', 'width', '15', '20', 'width on HTMLCanvasElement', 'canvas', HTMLCanvasElement); | ||
testReflectAttribute('height', 'height', '23', '45', 'height on HTMLCanvasElement', 'canvas', HTMLCanvasElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLDataElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="value of HTMLDataElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-data-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('value', 'value', '1234', '2345', 'name on HTMLDataElement', 'data', HTMLDataElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLDetailsElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="open of HTMLDetailsElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-details-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('open', 'open', 'true', 'false', 'open on HTMLDetailsElement', 'details', HTMLDetailsElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLMapElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="name of HTMLMapElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-map-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<img usemap="#yellow" src="/images/yellow.png" alt="yellow pic"> | ||
<img usemap="#green" src="/images/green.png" alt="green pic"> | ||
<script> | ||
|
||
testReflectAttribute('name', 'name', 'yellow', 'green', 'name on HTMLMapElement', 'map', HTMLMapElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLModElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="cite, dateTime of HTMLModElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#attributes-common-to-ins-and-del-elements"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('cite', 'cite', '../resources/custom-elements-helpers.js', './resources/reactions.js', 'cite on ins use HTMLModElement', 'ins', HTMLModElement); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test fails on Chrome. I believe it is because the attribute name is |
||
testReflectAttribute('dateTime', 'dateTime', '2018-12-19 00:00Z', '2018-12-20 00:00Z', 'dateTime on ins use HTMLModElement', 'ins', HTMLModElement); | ||
testReflectAttribute('cite', 'cite', '../resources/custom-elements-helpers.js', './resources/reactions.js', 'cite on del use HTMLModElement', 'del', HTMLModElement); | ||
testReflectAttribute('dateTime', 'dateTime', '2018-10-11T01:25-07:00', '2018-10-12T01:25-07:00', 'dateTime on del use HTMLModElement', 'del', HTMLModElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLOListElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="reversed, start, type of HTMLOListElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-ol-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('reversed', 'reversed', 'true', 'false', 'reversed on HTMLOListElement', 'ol', HTMLOListElement); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Boolean attributes problem again |
||
testReflectAttribute('start', 'start', '2', '5', 'start on HTMLOListElement', 'ol', HTMLOListElement); | ||
testReflectAttribute('type', 'type', '1', 'a', 'type on HTMLOListElement', 'ol', HTMLOListElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLQuoteElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="cite of HTMLQuoteElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-blockquote-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('cite', 'cite', '../resources/custom-elements-helpers.js', './resources/reactions.js', 'cite on blockquote use HTMLQuoteElement', 'blockquote', HTMLQuoteElement); | ||
testReflectAttribute('cite', 'cite', '../resources/custom-elements-helpers.js', './resources/reactions.js', 'cite on q use HTMLQuoteElement', 'q', HTMLQuoteElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLSlotElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="name of HTMLSlotElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-slot-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('name', 'name', 'slot1', 'slot2', 'name on HTMLSlotElement', 'slot', HTMLSlotElement); | ||
|
||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<title>Custom Elements: CEReactions on HTMLTimeElement interface</title> | ||
<link rel="author" title="Intel" href="http://www.intel.com"> | ||
<meta name="assert" content="name of HTMLTimeElement interface must have CEReactions"> | ||
<meta name="help" content="https://html.spec.whatwg.org/#the-time-element"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script src="../resources/custom-elements-helpers.js"></script> | ||
<script src="./resources/reactions.js"></script> | ||
|
||
<script> | ||
|
||
testReflectAttribute('dateTime', 'dateTime', '2018-12-10', '2018-12-12', 'dateTime on HTMLTimeElement', 'time', HTMLTimeElement); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also fails on Chrome, also I guess for the same reason. |
||
|
||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boolean attributes don't get reflected by the strings "true" and "false". They get reflected by the removal or addition of the attribute.