Closed Bug 1470825 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 11655 - Implement Element.toggleAttribute

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 11655 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/11655
Details from upstream follow.

Rakina Zata Amni <rakina@chromium.org> wrote:
>  Implement Element.toggleAttribute
>  
>  Add a new method Element.toggleAttribute(string qualifiedName,
>  optional bool force) that allow toggling the existence of an element’s
>  attribute, similar to Element.classList.toggle.
>  
>  Spec
>  https://dom.spec.whatwg.org/#dom-element-toggleattribute
>  
>  Bug:854960
>  Change-Id: Iab8a1a97dd4e2f8b377bcf590401699f9013aa8a
>  Reviewed-on: https://chromium-review.googlesource.com/1111761
>  WPT-Export-Revision: e828ad8dcee82ae6fd550d8bfa4d540a3e0a6275
PR 11655 applied with additional changes from upstream: c3db018b96681af3c73ec331ecc01d38e48b8b10
Component: web-platform-tests → DOM
Product: Testing → Core
Ran 1 tests and 68 subtests
OK     : 1
PASS   : 57
FAIL   : 11

New tests that have failures or other problems:
/dom/nodes/attributes.html
    Basic functionality should be intact. (toggleAttribute): FAIL
    Toggling element with inline style should make inline style disappear: FAIL
    When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown, even if the attribute is already present. (toggleAttribute): FAIL
    When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown. (toggleAttribute): FAIL
    toggleAttribute should lowercase its name argument (mixed case attribute): FAIL
    toggleAttribute should lowercase its name argument (upper case attribute): FAIL
    toggleAttribute should not change the order of previously set attributes.: FAIL
    toggleAttribute should not throw even when qualifiedName starts with 'xmlns': FAIL
    toggleAttribute should set the attribute with the given qualified name: FAIL
    toggleAttribute should set the first attribute with the given name: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a16aaf33d943
[wpt PR 11655] - Implement Element.toggleAttribute, a=testonly
https://hg.mozilla.org/mozilla-central/rev/a16aaf33d943
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.