auto merge of #4002 : Manishearth/servo/activation, r=jdm

Still need to impl `Activatable` on all activatable elements. I'll probably push those changes to this PR, however they can be made separately as well.
This commit is contained in:
bors-servo 2014-12-06 03:55:04 -07:00
commit 19c69b1625
26 changed files with 636 additions and 274 deletions

View file

@ -0,0 +1,31 @@
<style>
</style>
<form action="http://example.com" method="get">
<div><input type="checkbox"></div>
<div><input type="submit"><input type="reset"></div>
<div><input type="checkbox"></div>
<div><input type="checkbox" checked></div>
<div>group 1
<div><input type="radio"></div>
<div><input type="radio" checked></div>
</div>
<div>group 2
<div><input type="radio" name="a" checked></div>
<div><input type="radio" name="a"></div>
</div>
</form>
<br>
Use the buttons below to shift "fake" focus and trigger click events. The first form widget is initually focused.
<br>
<button type=button id="left">Shift fake focus left</button><br>
<button type=button id="right">Shift fake focus right</button><br>
<button type=button id="click">Trigger synthetic click</button><br>
<script>
i = 0;
tags = document.getElementsByTagName("input");
document.getElementById("left").onclick=function(){i--;}
document.getElementById("right").onclick=function(){i++;}
document.getElementById("click").onclick=function(){tags[i].click()}
</script>

View file

@ -120,9 +120,6 @@
[Document interface: attribute oncanplaythrough]
expected: FAIL
[Document interface: attribute onchange]
expected: FAIL
[Document interface: attribute onclose]
expected: FAIL
@ -174,9 +171,6 @@
[Document interface: attribute onfocus]
expected: FAIL
[Document interface: attribute oninput]
expected: FAIL
[Document interface: attribute oninvalid]
expected: FAIL
@ -984,9 +978,6 @@
[HTMLElement interface: attribute itemValue]
expected: FAIL
[HTMLElement interface: operation click()]
expected: FAIL
[HTMLElement interface: attribute tabIndex]
expected: FAIL
@ -1062,9 +1053,6 @@
[HTMLElement interface: attribute oncanplaythrough]
expected: FAIL
[HTMLElement interface: attribute onchange]
expected: FAIL
[HTMLElement interface: attribute onclose]
expected: FAIL
@ -1116,9 +1104,6 @@
[HTMLElement interface: attribute onfocus]
expected: FAIL
[HTMLElement interface: attribute oninput]
expected: FAIL
[HTMLElement interface: attribute oninvalid]
expected: FAIL
@ -1254,9 +1239,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "itemValue" with the proper type (11)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "click" with the proper type (13)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "tabIndex" with the proper type (14)]
expected: FAIL
@ -1332,9 +1314,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "oncanplaythrough" with the proper type (38)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onchange" with the proper type (39)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onclose" with the proper type (41)]
expected: FAIL
@ -1386,9 +1365,6 @@
[HTMLElement interface: document.createElement("noscript") must inherit property "onfocus" with the proper type (57)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "oninput" with the proper type (58)]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "oninvalid" with the proper type (59)]
expected: FAIL
@ -4800,9 +4776,6 @@
[HTMLInputElement interface: attribute height]
expected: FAIL
[HTMLInputElement interface: attribute indeterminate]
expected: FAIL
[HTMLInputElement interface: attribute inputMode]
expected: FAIL
@ -4830,9 +4803,6 @@
[HTMLInputElement interface: attribute placeholder]
expected: FAIL
[HTMLInputElement interface: attribute readOnly]
expected: FAIL
[HTMLInputElement interface: attribute required]
expected: FAIL
@ -4944,9 +4914,6 @@
[HTMLInputElement interface: document.createElement("input") must inherit property "height" with the proper type (15)]
expected: FAIL
[HTMLInputElement interface: document.createElement("input") must inherit property "indeterminate" with the proper type (16)]
expected: FAIL
[HTMLInputElement interface: document.createElement("input") must inherit property "inputMode" with the proper type (17)]
expected: FAIL
@ -4974,9 +4941,6 @@
[HTMLInputElement interface: document.createElement("input") must inherit property "placeholder" with the proper type (26)]
expected: FAIL
[HTMLInputElement interface: document.createElement("input") must inherit property "readOnly" with the proper type (27)]
expected: FAIL
[HTMLInputElement interface: document.createElement("input") must inherit property "required" with the proper type (28)]
expected: FAIL
@ -7170,9 +7134,6 @@
[Window interface: attribute oncanplaythrough]
expected: FAIL
[Window interface: attribute onchange]
expected: FAIL
[Window interface: attribute onclose]
expected: FAIL
@ -7221,9 +7182,6 @@
[Window interface: attribute onfocus]
expected: FAIL
[Window interface: attribute oninput]
expected: FAIL
[Window interface: attribute oninvalid]
expected: FAIL
@ -7512,9 +7470,6 @@
[Window interface: window must inherit property "oncanplaythrough" with the proper type (44)]
expected: FAIL
[Window interface: window must inherit property "onchange" with the proper type (45)]
expected: FAIL
[Window interface: window must inherit property "onclose" with the proper type (47)]
expected: FAIL
@ -7563,9 +7518,6 @@
[Window interface: window must inherit property "onfocus" with the proper type (63)]
expected: FAIL
[Window interface: window must inherit property "oninput" with the proper type (64)]
expected: FAIL
[Window interface: window must inherit property "oninvalid" with the proper type (65)]
expected: FAIL
@ -9639,9 +9591,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncanplaythrough" with the proper type (99)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onchange" with the proper type (100)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onclose" with the proper type (102)]
expected: FAIL
@ -9693,9 +9642,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "onfocus" with the proper type (118)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oninput" with the proper type (119)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "oninvalid" with the proper type (120)]
expected: FAIL

View file

@ -5925,114 +5925,6 @@
[input.placeholder: IDL set to object "test-valueOf" followed by IDL get]
expected: FAIL
[input.readOnly: typeof IDL attribute]
expected: FAIL
[input.readOnly: IDL get with DOM attribute unset]
expected: FAIL
[input.readOnly: setAttribute() to "" followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to " foo " followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to undefined followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to null followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to 7 followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to 1.5 followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to true followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to false followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to object "[object Object\]" followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to NaN followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to Infinity followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to -Infinity followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to "\\0" followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to object "test-toString" followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to object "test-valueOf" followed by IDL get]
expected: FAIL
[input.readOnly: setAttribute() to "readOnly" followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to "" followed by hasAttribute()]
expected: FAIL
[input.readOnly: IDL set to "" followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to " foo " followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to undefined followed by hasAttribute()]
expected: FAIL
[input.readOnly: IDL set to undefined followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to null followed by hasAttribute()]
expected: FAIL
[input.readOnly: IDL set to null followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to 7 followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to 1.5 followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to false followed by hasAttribute()]
expected: FAIL
[input.readOnly: IDL set to object "[object Object\]" followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to NaN followed by hasAttribute()]
expected: FAIL
[input.readOnly: IDL set to NaN followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to Infinity followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to -Infinity followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to "\\0" followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to object "test-toString" followed by IDL get]
expected: FAIL
[input.readOnly: IDL set to object "test-valueOf" followed by IDL get]
expected: FAIL
[input.required: typeof IDL attribute]
expected: FAIL

View file

@ -1,17 +1,5 @@
[button.html]
type: testharness
[clicking on button should not submit a form]
expected: FAIL
[the element is barred from constraint validation]
expected: FAIL
[clicking on button should not reset other form fields]
expected: FAIL
[clicking on button should not unchecked radio buttons]
expected: FAIL
[clicking on button should not change its indeterminate IDL attribute]
expected: FAIL

View file

@ -1,17 +1,5 @@
[checkbox.html]
type: testharness
[click on mutable checkbox fires the input and change events]
expected: FAIL
[click on non-mutable checkbox doesn\'t fire the input or change event]
expected: FAIL
[pre-activation steps on unchecked checkbox]
expected: FAIL
[pre-activation steps on checked checkbox]
expected: FAIL
[canceled activation steps on unchecked checkbox]
expected: FAIL

View file

@ -1,14 +1,5 @@
[input-type-button.html]
type: testharness
[default behavior]
expected: FAIL
[label value]
expected: FAIL
[mutable element\'s activation behavior is to do nothing.]
expected: FAIL
[immutable element has no activation behavior.]
expected: FAIL

View file

@ -1,8 +1,5 @@
[input-type-checkbox.html]
type: testharness
[a checkbox has an indeterminate state set to false onload]
expected: FAIL
[default/on: on getting, if the element has a value attribute, it must return that attribute\'s value; otherwise, it must return the string \'on\']
expected: FAIL

View file

@ -1,3 +1,8 @@
[radio.html]
type: testharness
expected: TIMEOUT
[canceled activation steps on unchecked radio]
expected: FAIL
[radio inputs with name attributes gro\xc3\xbcp2 and gro\xc3\x9cp2 belong to the same radio button group]
expected: FAIL

View file

@ -6,3 +6,6 @@
[\':checked\' should no longer match <input>s whose type checkbox/radio has been removed]
expected: FAIL
[\':checked\' matches clicked checkbox and radio buttons]
expected: FAIL

View file

@ -6,3 +6,15 @@
[dynamically check a radio input in a radio button group]
expected: FAIL
[click on radio4 which is in the indeterminate state]
expected: FAIL
[adding a value to progress1 should put it in a determinate state]
expected: FAIL
[removing progress2\'s value should put it in an indeterminate state]
expected: FAIL
[\':progress\' also matches <input> checkbox whose indeterminate IDL is set to true]
expected: FAIL