Update web-platform-tests to revision 20fa4a3a71ab7a2f75b4febbe2e98aeeaf022c2b

This commit is contained in:
Ms2ger 2016-04-19 18:39:55 +02:00
parent 3d4416e1b0
commit df8998356b
110 changed files with 1562 additions and 7048 deletions

View file

@ -31,7 +31,7 @@ test(function () {
var div = d.createElement('div');
d.body.appendChild(div);
var s = div.createShadowRoot();
var s = div.attachShadow({mode: 'open'});
HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
@ -56,7 +56,7 @@ test(function () {
var div = d.createElement('div');
form.appendChild(div);
s = div.createShadowRoot();
s = div.attachShadow({mode: 'open'});
HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {

View file

@ -31,7 +31,7 @@ test(function () {
var div = d.createElement('div');
d.body.appendChild(div);
var s = div.createShadowRoot();
var s = div.attachShadow({mode: 'open'});
HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
@ -58,7 +58,7 @@ test(function () {
var div = d.createElement('div');
form.appendChild(div);
var s = div.createShadowRoot();
var s = div.attachShadow({mode: 'open'});
HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
@ -88,10 +88,11 @@ test(function () {
var el = d.createElement(tagName);
el.setAttribute('id', tagName + '_id');
el.setAttribute('slot', tagName + '_slot');
div.appendChild(el);
var s = div.createShadowRoot();
s.innerHTML = '<content select="' + tagName + '"></content>';
var s = div.attachShadow({mode: 'open'});
s.innerHTML = '<slot name="' + tagName + '_slot"></slot>';
assert_true(s.querySelector('#' + tagName + '_id') == null, 'Distributed form-associated element ' + tagName +
' in shadow tree must not be accessible shadow tree accessors');

View file

@ -12,8 +12,8 @@ policies and contribution forms [3].
<head>
<title>Shadow DOM Test: A_08_02_03</title>
<link rel="author" title="Sergey G. Grekhov" href="mailto:sgrekhov@unipro.ru">
<link rel="help" href="http://www.w3.org/TR/2013/WD-shadow-dom-20130514/#inert-html-elements">
<meta name="assert" content="HTML Elements in shadow trees: form should submit elements in shadow tree">
<link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#inertness-of-html-elements-in-a-shadow-tree">
<meta name="assert" content="HTML Elements in shadow trees: form should not submit elements in shadow tree">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../../../html/resources/common.js"></script>
@ -23,17 +23,18 @@ policies and contribution forms [3].
<script>
var A_08_02_03_T01 = async_test('A_08_02_03_T01', { timeout: 5000 });
A_08_02_03_T01.checkIframeContent = A_08_02_03_T01.step_func(function () {
//remember value to check before cleaning the context (it'll destroy the iframe)
var checkIframeContent = A_08_02_03_T01.step_func(function () {
// remember value to check before cleaning the context (it'll destroy the iframe)
var valueToCheck = A_08_02_03_T01.iframe.contentWindow.document.URL;
cleanContext(A_08_02_03_T01.ctx);
assert_true(valueToCheck.indexOf('inp1=value1') > 0,
'html form should submit all of its fields');
// Expected behavior is not quite clear. See https://www.w3.org/Bugs/Public/show_bug.cgi?id=20320
assert_true(valueToCheck.indexOf('inp2=value2') > 0,
'html form should submit all of its fields including the shadow ones');
// Form data crossing shadow boundary should not be submitted.
// https://github.com/w3c/webcomponents/issues/65
assert_equals(valueToCheck.indexOf('inp2=value2'), -1,
'html form should not submit fields in the shadow tree');
A_08_02_03_T01.done();
});
@ -46,13 +47,12 @@ A_08_02_03_T01.step(function () {
//create iframe
var iframe = document.createElement('iframe');
A_08_02_03_T01.iframe = iframe;
iframe.src = '../../resources/blank.html';
iframe.setAttribute('name', 'targetIframe');
d.body.appendChild(iframe);
A_08_02_03_T01.iframe = iframe;
// create form
var form = d.createElement('form');
form.setAttribute('target', 'targetIframe');
@ -60,11 +60,10 @@ A_08_02_03_T01.step(function () {
form.setAttribute('action', '../../resources/blank.html');
d.body.appendChild(form);
//create Shadow root
// create shadow root
var root = d.createElement('div');
form.appendChild(root);
var s = root.createShadowRoot();
var s = root.attachShadow({mode: 'open'});
var input1 = d.createElement('input');
input1.setAttribute('type', 'text');
@ -78,11 +77,11 @@ A_08_02_03_T01.step(function () {
input2.setAttribute('value', 'value2');
s.appendChild(input2);
//submit the form
// submit the form
form.submit();
// set timeout to give the iframe time to load content
setTimeout('A_08_02_03_T01.checkIframeContent()', 2000);
setTimeout(checkIframeContent, 2000);
});
</script>
</body>

View file

@ -58,7 +58,7 @@ A_08_01_01_T01.step(function () {
//create Shadow root
var root = d.createElement('div');
d.body.appendChild(root);
var s = root.createShadowRoot();
var s = root.attachShadow({mode: 'open'});
// create base element, set iframe as a target
var base = d.createElement('base');

View file

@ -32,7 +32,7 @@ test(unit(function (ctx) {
//create Shadow root
var root = d.createElement('div');
d.body.appendChild(root);
var s = root.createShadowRoot();
var s = root.attachShadow({mode: 'open'});
s.appendChild(link);