New issue
Advanced search Search tips

Issue 684851 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

BeforeUnloadEvent,CloseEvent,PopStateEvent should not have default .type values

Project Member Reported by cvrebert@google.com, Jan 24 2017

Issue description

Chrome Version: 58.0.2991.0
OS: macOS 10.12.2

What steps will reproduce the problem?
(1) Open http://w3c-test.org/dom/events/EventTarget-dispatchEvent.html in Chrome.
(2) Observe the test results.

What is the expected result?
All the tests should pass.

What happens instead?
Three tests fail:
Fail    If the event's initialized flag is not set, an InvalidStateError must be thrown (BeforeUnloadEvent).
    assert_equals: Event type should be empty string before initialization expected "" but got "beforeunload"
Fail    If the event's initialized flag is not set, an InvalidStateError must be thrown (CloseEvent).
   assert_equals: Event type should be empty string before initialization expected "" but got "close"
Fail    If the event's initialized flag is not set, an InvalidStateError must be thrown (PopStateEvent).
    assert_equals: Event type should be empty string before initialization expected "" but got "popstate"

Further details:
These tests contain the equivalent of:
    assertEquals(document.createEvent(someEventInterfaceName).type, "")
where someEventInterfaceName is one of:
    "BeforeUnloadEvent", "CloseEvent", "PopStateEvent"

And they fail since the .type property's actual value in Chrome is, respectively:
BeforeUnloadEvent: "beforeunload"
CloseEvent:        "close"
PopStateEvent:     "popstate"

However, per step 6 of https://dom.spec.whatwg.org/#dom-document-createevent ,
the event returned from createEvent() should have its .type property set to the empty string.
 

Comment 1 by tkent@chromium.org, Jan 25 2017

Components: Blink>DOM
Labels: Hotlist-Interop Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
Adding Blink>DOM because of a test in wpt/dom/.

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 7 2017

Comment 3 by tkent@chromium.org, Feb 7 2017

Labels: M-58
Status: Fixed (was: Available)

Sign in to add a comment