Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / registration-context-delete-during-register-base-constructor-retrieval.html
blob158f4c94d105b3ee6fca87c5036fc54af1596caf
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script src="testutils.js"></script>
4 <body>
5 <script>
6 if (fork()) {
7 // The controlling parent frame
8 description('Tests destroying a context during registration at the' +
9 ' point when the prototype\'s constructor property is retrieved.');
10 jsTestIsAsync = true;
11 successfullyParsed = true;
12 } else {
13 // The child frame
14 var proto = Object.create(HTMLElement.prototype, {
15 constructor: {
16 configurable: true,
17 get: function () {
18 destroyContext();
19 return HTMLElement;
22 });
24 try {
25 var element = document.registerElement('x-a', {prototype: proto});
26 log('FAIL expected register to throw an exception');
27 } catch (ex) {
28 log('PASS caught expected exception "' + ex + '"');
30 done();
32 </script>