Chromium Code Reviews| Index: LayoutTests/fast/dom/custom/exception-from-constructor.html |
| diff --git a/LayoutTests/fast/dom/custom/registration-context-delete-during-register-created-retrieval.html b/LayoutTests/fast/dom/custom/exception-from-constructor.html |
| similarity index 58% |
| copy from LayoutTests/fast/dom/custom/registration-context-delete-during-register-created-retrieval.html |
| copy to LayoutTests/fast/dom/custom/exception-from-constructor.html |
| index 488859fae9f62d83304976652cb1a85cf1c8a522..b75a11c68d099ad9159f9b0405af44e8e4b8829c 100644 |
| --- a/LayoutTests/fast/dom/custom/registration-context-delete-during-register-created-retrieval.html |
| +++ b/LayoutTests/fast/dom/custom/exception-from-constructor.html |
| @@ -5,23 +5,20 @@ |
| <script> |
| if (fork()) { |
| // The controlling parent frame |
| - description('Tests destroying a context during registration at the point when the created callback is retrieved.'); |
| + description('Tests throwing an exception during registeration of' |
|
vivekg
2015/04/21 09:42:49
nit: registeration => registration. Also this coul
|
| + + 'constructor'); |
| jsTestIsAsync = true; |
| successfullyParsed = true; |
| } else { |
| - // The child frame |
| - |
| var proto = Object.create(HTMLElement.prototype, { |
| - createdCallback: { |
| - get: function () { |
| - destroyContext(); |
| - return function () { } |
| + constructor: { |
| + configurable: true, |
| + get: function () { throw "Exception thrown from getter"; } |
| } |
| - } |
| - }); |
| + }); |
| try { |
| - document.registerElement('x-a', {prototype: proto}); |
| + var element = document.registerElement('x-a', {prototype: proto}); |
|
vivekg
2015/04/21 09:42:49
Can we use shouldThrow('document.registerElement(.
|
| log('FAIL expected register to throw an exception'); |
| } catch (ex) { |
| log('PASS caught expected exception "' + ex + '"'); |