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

Issue 2089383003: Added test for step 2, 14 in define element. (Closed)

Created:
4 years, 6 months ago by davaajav
Modified:
4 years, 5 months ago
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added test for step 2, 14 in define element. Test for step 2. - Tests cases when HTMLElement, HTMLButtonElement is passed as constructor. Step 2 should throw TypeError, but it passes without errors. - Passing author-defined custom element constructors created via class extends HTMLElement {} passes this step without TypeError. - Passing JavaScript class Set fails during upgrade. Test for step 14. - If Type(prototype) is an Object, and connectedCallback is not defined and not Callable, it throws TypeError. - If Type(prototype) is an Object, and disconnectedCallback is not defined and not Callable, it throws TypeError. - If attributeChangedCallback is not Callable is not undefined and not Callable, it throws TypeError. - If any step in the first set of steps in 14 throws, it rethrows that exception and terminates the algorithm. BUG=594918 Committed: https://crrev.com/9d82f81d395329a5426d4ee459c2006b25da76b5 Cr-Commit-Position: refs/heads/master@{#403862}

Patch Set 1 #

Total comments: 9

Patch Set 2 : Define-element patch updates #

Patch Set 3 : added rethrow error tests for step 14 #

Patch Set 4 : changed test 14.9.2 from bad to goo #

Patch Set 5 : check that Get("observedAttributes") is not executed when attirbuteChangedCallback is undefined #

Patch Set 6 : deleted extra line between tests #

Patch Set 7 : deleted test where ot checks order of 14.2 and 14.9 it is trivial with the new test #

Patch Set 8 : observedAttributes should not be invoked test update #

Total comments: 11

Patch Set 9 : patch update #

Patch Set 10 : patch update #

Total comments: 6

Patch Set 11 : added assert-throws-dom-exception #

Patch Set 12 : throws DOMEXception NotSupportedError #

Total comments: 1

Patch Set 13 : assert_throws_dom_exception update #

Patch Set 14 : assert_throws_dom_exception update #

Total comments: 1

Patch Set 15 : patch update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -35 lines) Patch
M third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +170 lines, -35 lines 0 comments Download

Messages

Total messages: 24 (6 generated)
davaajav
PTL
4 years, 6 months ago (2016-06-23 03:28:07 UTC) #2
dominicc (has gone to gerrit)
This is very nice work. These tests are very important to custom elements getting implemented ...
4 years, 6 months ago (2016-06-23 04:13:10 UTC) #5
davaajav
PTL Added tests for steps 14.1, 14.3, 14.5, 14.7, 14.9.2 and wrapped up the previous ...
4 years, 6 months ago (2016-06-24 08:32:48 UTC) #6
davaajav
PTL changed test for 14.9.2 Get(constructor, "observedAttributes") from bad to good.
4 years, 6 months ago (2016-06-24 08:48:17 UTC) #7
davaajav
Added new test for 14.9.2 checking Get(constructor, "observedAttributes") is not executed when attributeChangedCallback is undefined
4 years, 6 months ago (2016-06-24 09:03:39 UTC) #8
dominicc (has gone to gerrit)
Great work, these look excellent. Some more feedback inline. https://codereview.chromium.org/2089383003/diff/140001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (right): https://codereview.chromium.org/2089383003/diff/140001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#newcode104 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:104: ...
4 years, 5 months ago (2016-06-28 03:54:58 UTC) #9
davaajav
PTL Added new function assert_dom_exception_syntax_error, which is used in "Invalid name" test. Improved comments. Wrap-ups.
4 years, 5 months ago (2016-06-29 06:53:58 UTC) #10
dominicc (has gone to gerrit)
Some comments inline. https://codereview.chromium.org/2089383003/diff/180001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (left): https://codereview.chromium.org/2089383003/diff/180001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#oldcode51 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:51: assert_throws('SYNTAX_ERR', () => { I think ...
4 years, 5 months ago (2016-06-29 07:07:05 UTC) #11
davaajav
PTL https://codereview.chromium.org/2089383003/diff/180001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (right): https://codereview.chromium.org/2089383003/diff/180001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#newcode295 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:295: }, 'exception thrown while coverting observedAttributes to sequence<DOMString> ...
4 years, 5 months ago (2016-07-05 02:46:40 UTC) #12
dominicc (has gone to gerrit)
https://codereview.chromium.org/2089383003/diff/220001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (right): https://codereview.chromium.org/2089383003/diff/220001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#newcode22 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:22: if (e instanceof global_context.DOMException){ Put one space between ) ...
4 years, 5 months ago (2016-07-05 06:39:52 UTC) #13
davaajav
PTL I could not come up with a good way to import AssertionError() from testharness.js
4 years, 5 months ago (2016-07-05 09:05:49 UTC) #14
davaajav
PTL
4 years, 5 months ago (2016-07-05 09:54:26 UTC) #15
dominicc (has gone to gerrit)
This LGTM, just one small comment inline. https://codereview.chromium.org/2089383003/diff/260001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html File third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html (right): https://codereview.chromium.org/2089383003/diff/260001/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html#newcode15 third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html:15: // Since ...
4 years, 5 months ago (2016-07-06 01:34:42 UTC) #16
davaajav
PTL
4 years, 5 months ago (2016-07-06 03:10:02 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2089383003/280001
4 years, 5 months ago (2016-07-06 06:00:18 UTC) #20
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 5 months ago (2016-07-06 07:29:42 UTC) #21
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-06 07:29:45 UTC) #22
commit-bot: I haz the power
4 years, 5 months ago (2016-07-06 07:30:58 UTC) #24
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/9d82f81d395329a5426d4ee459c2006b25da76b5
Cr-Commit-Position: refs/heads/master@{#403862}

Powered by Google App Engine
This is Rietveld 408576698