| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> | 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> | 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <script src="test-harness-utils.js"></script> | 4 <script src="test-harness-utils.js"></script> |
| 5 <body> | 5 <body> |
| 6 <script> | 6 <script> |
| 7 function TestRegistrationContextSharing(window, documentA, documentB) { | 7 function TestRegistrationContextSharing(window, documentA, documentB) { |
| 8 this.window = window; | 8 this.window = window; |
| 9 this.documentA = documentA; | 9 this.documentA = documentA; |
| 10 this.documentB = documentB; | 10 this.documentB = documentB; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 var documentB = documentA.implementation.createHTMLDocument(); | 91 var documentB = documentA.implementation.createHTMLDocument(); |
| 92 var tester = new TestRegistrationContextSharing( | 92 var tester = new TestRegistrationContextSharing( |
| 93 frame.contentWindow, documentA, documentB); | 93 frame.contentWindow, documentA, documentB); |
| 94 tester.testRegistrationContextIsShared(); | 94 tester.testRegistrationContextIsShared(); |
| 95 frame.remove(); | 95 frame.remove(); |
| 96 })); | 96 })); |
| 97 | 97 |
| 98 withFrame(t.step_func(function (frame) { | 98 withFrame(t.step_func(function (frame) { |
| 99 var documentA = frame.contentDocument; | 99 var documentA = frame.contentDocument; |
| 100 var documentB = documentA.implementation.createDocument( | 100 var documentB = documentA.implementation.createDocument( |
| 101 'http://www.w3.org/1999/xhtml'); | 101 'http://www.w3.org/1999/xhtml', 'html'); |
| 102 var tester = new TestRegistrationContextSharing( | 102 var tester = new TestRegistrationContextSharing( |
| 103 frame.contentWindow, documentA, documentB); | 103 frame.contentWindow, documentA, documentB); |
| 104 tester.testRegistrationContextIsShared(); | 104 tester.testRegistrationContextIsShared(); |
| 105 frame.remove(); | 105 frame.remove(); |
| 106 })); | 106 })); |
| 107 | 107 |
| 108 withFrame(t.step_func(function (frame) { | 108 withFrame(t.step_func(function (frame) { |
| 109 // Test transitively sharing a registration context through multiple | 109 // Test transitively sharing a registration context through multiple |
| 110 // createDocument/createHTMLDocument steps. | 110 // createDocument/createHTMLDocument steps. |
| 111 | 111 |
| 112 var documentA = frame.contentDocument; | 112 var documentA = frame.contentDocument; |
| 113 | 113 |
| 114 // This document is not HTML, XHTML; it will not process custom elements. | 114 // This document is not HTML, XHTML; it will not process custom elements. |
| 115 var documentB = documentA.implementation.createDocument(); | 115 var documentB = documentA.implementation.createDocument(null, ''); |
| 116 | 116 |
| 117 // This document *will* process custom elements, in a new context. | 117 // This document *will* process custom elements, in a new context. |
| 118 var documentC = documentB.implementation.createHTMLDocument(); | 118 var documentC = documentB.implementation.createHTMLDocument(); |
| 119 | 119 |
| 120 var documentD = documentC.implementation.createDocument( | 120 var documentD = documentC.implementation.createDocument( |
| 121 'http://www.w3.org/1999/xhtml'); | 121 'http://www.w3.org/1999/xhtml', 'html'); |
| 122 | 122 |
| 123 var documentE = documentD.implementation.createDocument( | 123 var documentE = documentD.implementation.createDocument( |
| 124 'http://www.w3.org/1999/xhtml'); | 124 'http://www.w3.org/1999/xhtml', 'html'); |
| 125 | 125 |
| 126 var tester = new TestRegistrationContextSharing( | 126 var tester = new TestRegistrationContextSharing( |
| 127 frame.contentWindow, documentC, documentE); | 127 frame.contentWindow, documentC, documentE); |
| 128 tester.testRegistrationContextIsShared(); | 128 tester.testRegistrationContextIsShared(); |
| 129 frame.remove(); | 129 frame.remove(); |
| 130 t.done(); | 130 t.done(); |
| 131 })); | 131 })); |
| 132 | 132 |
| 133 })(); | 133 })(); |
| 134 | 134 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 164 var tester = new TestRegistrationContextSharing(window, | 164 var tester = new TestRegistrationContextSharing(window, |
| 165 documentA, documentB); | 165 documentA, documentB); |
| 166 tester.testRegistrationContextIsShared(); | 166 tester.testRegistrationContextIsShared(); |
| 167 t.done(); | 167 t.done(); |
| 168 }); | 168 }); |
| 169 } | 169 } |
| 170 | 170 |
| 171 })(); | 171 })(); |
| 172 | 172 |
| 173 </script> | 173 </script> |
| OLD | NEW |