| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Distributed under both the W3C Test Suite License [1] and the W3C | 3 Distributed under both the W3C Test Suite License [1] and the W3C |
| 4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the | 4 3-clause BSD License [2]. To contribute to a W3C Test Suite, see the |
| 5 policies and contribution forms [3]. | 5 policies and contribution forms [3]. |
| 6 | 6 |
| 7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license | 7 [1] http://www.w3.org/Consortium/Legal/2008/04-testsuite-license |
| 8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license | 8 [2] http://www.w3.org/Consortium/Legal/2008/03-bsd-license |
| 9 [3] http://www.w3.org/2004/10/27-testcases | 9 [3] http://www.w3.org/2004/10/27-testcases |
| 10 --> | 10 --> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 var iframe = document.createElement('iframe'); | 28 var iframe = document.createElement('iframe'); |
| 29 iframe.src = '../../resources/bobs_page.html'; | 29 iframe.src = '../../resources/bobs_page.html'; |
| 30 document.body.appendChild(iframe); | 30 document.body.appendChild(iframe); |
| 31 | 31 |
| 32 iframe.onload = A_04_04_01_T2.step_func(function () { | 32 iframe.onload = A_04_04_01_T2.step_func(function () { |
| 33 try { | 33 try { |
| 34 var d = iframe.contentDocument; | 34 var d = iframe.contentDocument; |
| 35 | 35 |
| 36 //make shadow tree | 36 //make shadow tree |
| 37 var ul = d.querySelector('ul.stories'); | 37 var ul = d.querySelector('ul.stories'); |
| 38 var s = createSR(ul); | 38 var s = ul.createShadowRoot(); |
| 39 var subdiv1 = d.createElement('div'); | 39 var subdiv1 = d.createElement('div'); |
| 40 subdiv1.innerHTML = '<ul><content select="li"></content></ul>'; | 40 subdiv1.innerHTML = '<ul><content select="li"></content></ul>'; |
| 41 s.appendChild(subdiv1); | 41 s.appendChild(subdiv1); |
| 42 | 42 |
| 43 var shadowStyle = d.createElement('style'); | 43 var shadowStyle = d.createElement('style'); |
| 44 shadowStyle.innerHTML = '*::content > .shadow { display:none; }'; | 44 shadowStyle.innerHTML = '*::content > .shadow { display:none; }'; |
| 45 s.appendChild(shadowStyle); | 45 s.appendChild(shadowStyle); |
| 46 | 46 |
| 47 //The order of DOM elements should be the following: | 47 //The order of DOM elements should be the following: |
| 48 //li3, li6 - invisible. Other elements visible | 48 //li3, li6 - invisible. Other elements visible |
| 49 var li3 = d.querySelector('#li3'); | 49 var li3 = d.querySelector('#li3'); |
| 50 var li6 = d.querySelector('#li6'); | 50 var li6 = d.querySelector('#li6'); |
| 51 assert_equals(window.getComputedStyle(li3).display, "none", | 51 assert_equals(window.getComputedStyle(li3).display, "none", |
| 52 'Point 1: Elements that don\'t mach insertion point criteria parti
cipate in distribution'); | 52 'Point 1: Elements that don\'t mach insertion point criteria parti
cipate in distribution'); |
| 53 assert_equals(window.getComputedStyle(li6).display, "none", | 53 assert_equals(window.getComputedStyle(li6).display, "none", |
| 54 'Point 2: Elements that don\'t mach insertion point criteria parti
cipate in distribution'); | 54 'Point 2: Elements that don\'t mach insertion point criteria parti
cipate in distribution'); |
| 55 | 55 |
| 56 var a5 = d.querySelector('#a5'); | 56 var a5 = d.querySelector('#a5'); |
| 57 assert_not_equals(window.getComputedStyle(a5).display, "none", | 57 assert_not_equals(window.getComputedStyle(a5).display, "none", |
| 58 'Point 3: ::content pseudo-element with relative selector should b
e a valid insertion point matching criteria, element should be visible'); | 58 'Point 3: ::content pseudo-element with relative selector should b
e a valid insertion point matching criteria, element should be visible'); |
| 59 } finally { | 59 } finally { |
| 60 iframe.parentNode.removeChild(iframe); | 60 iframe.parentNode.removeChild(iframe); |
| 61 } | 61 } |
| 62 A_04_04_01_T2.done(); | 62 A_04_04_01_T2.done(); |
| 63 }); | 63 }); |
| 64 }); | 64 }); |
| 65 </script> | 65 </script> |
| 66 </body> | 66 </body> |
| 67 </html> | 67 </html> |
| OLD | NEW |