Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1733)

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/construct.html

Issue 2443543002: createElement should not transmit exceptions but report them. (Closed)
Patch Set: Rebaseline tests. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-synchronous.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html b/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
index d8396829b51388a2adc9ea987b22eb15271ab25d..4d33bb67af06833951a209564bce7701386b520a 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/construct.html
@@ -78,16 +78,18 @@ test_with_window((w) => {
test_with_window((w) => {
w.customElements.define('a-a', w.HTMLButtonElement);
- assert_throws(TypeError.prototype, () => {
+ assert_reports(w, TypeError.prototype, () => {
w.document.createElement('a-a');
- }, 'If NewTarget is equal to active function object, TypeError should be thrown');
+ }, 'If NewTarget is equal to active function object, TypeError should be ' +
+ 'reported');
}, 'Custom element constructor, NewTarget is equal to active function object');
test_with_window((w) => {
w.customElements.define('a-a', class extends w.HTMLButtonElement {} );
- assert_throws(TypeError.prototype, () => {
+ assert_reports(w, TypeError.prototype, () => {
w.document.createElement('a-a');
- }, 'If NewTarget is equal to active function object, TypeError should be thrown');
+ }, 'If NewTarget is equal to active function object, TypeError should be ' +
+ 'reported');
}, 'Custom element constructor, active function object is not equal to HTMLElement');
test_with_window((w) => {
@@ -120,9 +122,10 @@ test_with_window((w) => {
}
}
w.customElements.define('a-a', A);
- assert_throws_dom_exception(w, 'INVALID_STATE_ERR', () => {
+ assert_reports(w, 'INVALID_STATE_ERR', () => {
w.document.createElement('a-a');
- }, 'Creating an element that is already constructed marker should throw InvalidStateError');
+ }, 'Creating an element that is already constructed marker should report ' +
+ 'InvalidStateError');
}, 'Already constructed marker, create element');
test_with_window((w) => {
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/create-element-defined-synchronous.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698