-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sectioning tests. #1538
Add sectioning tests. #1538
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ms2ger, if this is rebased, is it still worth reviewing, or have things changed so much since this PR was submitted that it's better to abandon?
onerror = "foobar = 4;" | ||
onafterprint = "foobar = 5;" | ||
onbeforeprint = "foobar = 6;" | ||
onbeforeunload = "foobar = 7;"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a syntax error here.
I suspect they're all still valid and as useful as they were when first submitted. |
@Ms2ger can you rebase to retrigger Travis+Taskcluster. I can review. |
….body-getter.html.
CI passes now. |
assert_regexp_match(strCheck, regEx, "document.body." + strAttr + ":"); | ||
|
||
} else { | ||
assert_equals(document.body[strAttr], funcExpected, "document.body." + strAttr + ":"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and all other assert_equals
involving funcExpected
are broken because it assumes the function object survives the mirroring, but it does not. The spec for this is https://html.spec.whatwg.org/#window-reflecting-body-element-event-handler-set and from that I found existing tests:
https://wpt.fyi/results/html/webappapis/scripting/events/event-handler-attributes-body-window.html?label=experimental
https://wpt.fyi/results/html/webappapis/scripting/events/event-handler-attributes-window-body.html?label=experimental
https://wpt.fyi/results/html/webappapis/scripting/events/event-handler-attributes-windowless-body.html?label=experimental
I'll delete this test from the PR and keep reviewing.
Redundant with tests in html/webappapis/scripting/events.
<meta charset="utf-8"> | ||
<title>Body Element</title> | ||
<link rel="author" title="dzenana" href="mailto:dzenana.trenutak@gmail.com"> | ||
<link rel="help" href="http://www.w3.org/html/wg/drafts/html/CR/single-page.html#the-body-element"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec for this and part2 is the places that reference https://html.spec.whatwg.org/#determining-the-target-of-an-event-handler. The model is that setting/getting the content and IDL attribute redirects to the window object, as opposed to the event target order being tweaked during event dispatch.
part1 and part2 all pass on Chrome, Edge, Firefox and Safari, except for part1 on Edge. I'm pretty sure that's covered by the Edge failures in https://wpt.fyi/results/html/webappapis/scripting/events/event-handler-attributes-body-window.html?label=stable&aligned=true.
With this covered in html/webappapis/scripting/events/, I'll delete these too.
Alright, so a pretty clear pattern is emerging here. The tests are all about event handlers on the body element, quite verbose and slow to run. For the cases I've looked closely at I've concluded that the exists tests are better. I've tried running most of the tests in all browsers and while I've spotted some differences, those too seem to be covered by existing tests. So, I don't think there's value in anyone studying in detail if there is some delta of test coverage provided by these tests but not existing ones. I'll just close the PR, but if anyone feels differently please reopen and review away :) |
No description provided.