mirror of
https://github.com/servo/servo.git
synced 2025-08-27 08:08:19 +01:00
Update web-platform-tests to revision d011702f368b88b3bae86e7a8fd2ddd22e18b33c
This commit is contained in:
parent
f9608022ca
commit
299ad0f9d0
573 changed files with 38776 additions and 14942 deletions
|
@ -16,14 +16,14 @@ policies and contribution forms [3].
|
|||
<meta name="assert" content="HTML Elements in shadow trees: Form elements and form-associated elements in shadow tree are not accessible using document DOM object's tree accessors">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<script src="../../../../html/resources/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
//test form-associated elements
|
||||
test(function () {
|
||||
var d = newHTMLDocument();
|
||||
var d = newHTMLDocument();
|
||||
|
||||
var form = d.createElement('form');
|
||||
form.setAttribute('id', 'form_id');
|
||||
|
@ -42,14 +42,14 @@ test(function () {
|
|||
s.appendChild(el);
|
||||
|
||||
assert_equals(d.querySelector('#' + tagName + '_id'), null, 'Form-associated element ' + tagName +
|
||||
' in shadow tree must not be accessible using owner\'s document tree accessors');
|
||||
' in shadow tree must not be accessible using owner\'s document tree accessors');
|
||||
});
|
||||
}, 'A_08_02_01_T01');
|
||||
|
||||
|
||||
//test form elements
|
||||
test(function () {
|
||||
var d = newHTMLDocument();
|
||||
var d = newHTMLDocument();
|
||||
|
||||
var form = d.createElement('form');
|
||||
d.body.appendChild(form);
|
||||
|
@ -65,7 +65,7 @@ test(function () {
|
|||
s.appendChild(el);
|
||||
|
||||
assert_equals(d.querySelector('#' + tagName + '_id'), null, 'Form element ' + tagName +
|
||||
' in shadow tree must not be accessible using owner\'s document tree accessors');
|
||||
' in shadow tree must not be accessible using owner\'s document tree accessors');
|
||||
});
|
||||
}, 'A_08_02_01_T02');
|
||||
</script>
|
||||
|
|
|
@ -16,14 +16,14 @@ policies and contribution forms [3].
|
|||
<meta name="assert" content="HTML Elements in shadow trees: Form elements and form-associated elements in shadow tree must be accessible using shadow tree accessors">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<script src="../../../../html/resources/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
//test form-associated elements
|
||||
test(function () {
|
||||
var d = newHTMLDocument();
|
||||
var d = newHTMLDocument();
|
||||
|
||||
var form = d.createElement('form');
|
||||
form.setAttribute('id', 'form_id');
|
||||
|
@ -42,16 +42,16 @@ test(function () {
|
|||
s.appendChild(el);
|
||||
|
||||
assert_true(s.querySelector('#' + tagName + '_id') != null, 'Form-associated element ' + tagName +
|
||||
' in shadow tree must be accessible shadow tree accessors');
|
||||
' in shadow tree must be accessible shadow tree accessors');
|
||||
assert_equals(s.querySelector('#' + tagName + '_id').getAttribute('id'), tagName + '_id',
|
||||
'Form-associated element ' + tagName + ' in shadow tree must be accessible shadow tree accessors');
|
||||
'Form-associated element ' + tagName + ' in shadow tree must be accessible shadow tree accessors');
|
||||
});
|
||||
}, 'A_08_02_02_T01');
|
||||
|
||||
|
||||
//test form elements
|
||||
test(function () {
|
||||
var d = newHTMLDocument();
|
||||
var d = newHTMLDocument();
|
||||
|
||||
var form = d.createElement('form');
|
||||
d.body.appendChild(form);
|
||||
|
@ -67,16 +67,16 @@ test(function () {
|
|||
s.appendChild(el);
|
||||
|
||||
assert_true(s.querySelector('#' + tagName + '_id') != null, 'Form-associated element ' + tagName +
|
||||
' in shadow tree must be accessible shadow tree accessors');
|
||||
' in shadow tree must be accessible shadow tree accessors');
|
||||
assert_equals(s.querySelector('#' + tagName + '_id').getAttribute('id'), tagName + '_id',
|
||||
'Form element ' + tagName + ' in shadow tree must be accessible shadow tree accessors');
|
||||
'Form element ' + tagName + ' in shadow tree must be accessible shadow tree accessors');
|
||||
});
|
||||
}, 'A_08_02_02_T02');
|
||||
|
||||
|
||||
//test distributed form elements
|
||||
test(function () {
|
||||
var d = newHTMLDocument();
|
||||
var d = newHTMLDocument();
|
||||
|
||||
HTML5_FORM_ASSOCIATED_ELEMENTS.forEach(function (tagName) {
|
||||
|
||||
|
@ -91,10 +91,10 @@ test(function () {
|
|||
div.appendChild(el);
|
||||
|
||||
var s = div.createShadowRoot();
|
||||
s.innerHTML = '<content select="' + tagName + '"></content>';
|
||||
s.innerHTML = '<content select="' + tagName + '"></content>';
|
||||
|
||||
assert_true(s.querySelector('#' + tagName + '_id') == null, 'Distributed form-associated element ' + tagName +
|
||||
' in shadow tree must not be accessible shadow tree accessors');
|
||||
' in shadow tree must not be accessible shadow tree accessors');
|
||||
});
|
||||
}, 'A_08_02_02_T03');
|
||||
</script>
|
||||
|
|
|
@ -16,7 +16,7 @@ policies and contribution forms [3].
|
|||
<meta name="assert" content="HTML Elements in shadow trees: form should submit elements in shadow tree">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<script src="../../../../html/resources/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
@ -24,24 +24,24 @@ policies and contribution forms [3].
|
|||
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 valueToCheck = A_08_02_03_T01.iframe.contentWindow.document.URL;
|
||||
cleanContext(A_08_02_03_T01.ctx);
|
||||
//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');
|
||||
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');
|
||||
// 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');
|
||||
|
||||
A_08_02_03_T01.done();
|
||||
A_08_02_03_T01.done();
|
||||
});
|
||||
|
||||
|
||||
A_08_02_03_T01.step(function () {
|
||||
|
||||
A_08_02_03_T01.ctx = newContext();
|
||||
A_08_02_03_T01.ctx = newContext();
|
||||
var d = newRenderedHTMLDocument(A_08_02_03_T01.ctx);
|
||||
|
||||
//create iframe
|
||||
|
|
|
@ -16,7 +16,7 @@ policies and contribution forms [3].
|
|||
<meta name="assert" content="HTML Elements in shadow trees: base element must behave as inert, or not part of the document tree">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<script src="../../../../html/resources/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
|
@ -24,20 +24,20 @@ policies and contribution forms [3].
|
|||
var A_08_01_01_T01 = async_test('A_08_01_01_T01', { timeout: 5000 });
|
||||
|
||||
A_08_01_01_T01.checkIframeContent = A_08_01_01_T01.step_func(function () {
|
||||
//remember value to check before cleaning the context (it'll destroy the iframe)
|
||||
var valueToCheck = A_08_01_01_T01.iframe.contentWindow;
|
||||
cleanContext(A_08_01_01_T01.ctx);
|
||||
//remember value to check before cleaning the context (it'll destroy the iframe)
|
||||
var valueToCheck = A_08_01_01_T01.iframe.contentWindow;
|
||||
cleanContext(A_08_01_01_T01.ctx);
|
||||
|
||||
assert_equals(valueToCheck, null,
|
||||
'base html element ih a shadow tree must beahve like inert one');
|
||||
assert_equals(valueToCheck, null,
|
||||
'base html element ih a shadow tree must beahve like inert one');
|
||||
|
||||
A_08_01_01_T01.done();
|
||||
A_08_01_01_T01.done();
|
||||
});
|
||||
|
||||
|
||||
A_08_01_01_T01.step(function () {
|
||||
|
||||
A_08_01_01_T01.ctx = newContext();
|
||||
A_08_01_01_T01.ctx = newContext();
|
||||
var d = newRenderedHTMLDocument(A_08_01_01_T01.ctx);
|
||||
|
||||
//create iframe
|
||||
|
|
|
@ -16,26 +16,27 @@ policies and contribution forms [3].
|
|||
<meta name="assert" content="HTML Elements in shadow trees: link element must behave as inert not as part of the document tree">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="../../testcommon.js"></script>
|
||||
<script src="../../../../html/resources/common.js"></script>
|
||||
<script src="../../../resources/shadow-dom-utils.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(unit(function (ctx) {
|
||||
|
||||
var d = newRenderedHTMLDocument(ctx);
|
||||
var d = newRenderedHTMLDocument(ctx);
|
||||
|
||||
var link = d.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
var link = d.createElement('link');
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
|
||||
//create Shadow root
|
||||
var root = d.createElement('div');
|
||||
d.body.appendChild(root);
|
||||
var s = root.createShadowRoot();
|
||||
//create Shadow root
|
||||
var root = d.createElement('div');
|
||||
d.body.appendChild(root);
|
||||
var s = root.createShadowRoot();
|
||||
|
||||
s.appendChild(link);
|
||||
s.appendChild(link);
|
||||
|
||||
assert_equals(d.styleSheets.length, 0, 'link element must behave as inert not as part of the document tree');
|
||||
assert_equals(d.styleSheets.length, 0, 'link element must behave as inert not as part of the document tree');
|
||||
|
||||
|
||||
}), 'A_08_01_02_T01');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue