OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
3 <script src="testutils.js"></script> | 3 <script src="testutils.js"></script> |
4 <body> | 4 <body> |
5 <script> | 5 <script> |
6 if (fork()) { | 6 if (fork()) { |
7 // The controlling parent frame | 7 // The controlling parent frame |
8 description('Tests destroying a context, then trying to register a new custo
m element.'); | 8 description('Tests destroying a context, then trying to register a new custo
m element.'); |
9 jsTestIsAsync = true; | 9 jsTestIsAsync = true; |
10 successfullyParsed = true; | 10 successfullyParsed = true; |
11 } else { | 11 } else { |
12 // The child frame | 12 // The child frame |
13 | 13 |
14 var proto = Object.create(HTMLElement.prototype); | 14 var proto = Object.create(HTMLElement.prototype); |
15 destroyContext(); | 15 destroyContext(); |
16 | 16 |
17 try { | 17 try { |
18 document.register('x-a', {prototype: proto}); | 18 document.registerElement('x-a', {prototype: proto}); |
19 log('FAIL expected register to throw an exception'); | 19 log('FAIL expected register to throw an exception'); |
20 } catch (ex) { | 20 } catch (ex) { |
21 log('PASS caught expected exception "' + ex + '"'); | 21 log('PASS caught expected exception "' + ex + '"'); |
22 } | 22 } |
23 done(); | 23 done(); |
24 } | 24 } |
25 </script> | 25 </script> |
OLD | NEW |