Skip to content

Test that createContextualFragment works on a variety of contexts#4403

Merged
domenic merged 4 commits intomasterfrom
innertext-chrome-bug
Jan 10, 2017
Merged

Test that createContextualFragment works on a variety of contexts#4403
domenic merged 4 commits intomasterfrom
innertext-chrome-bug

Conversation

@domenic
Copy link
Member

@domenic domenic commented Dec 28, 2016

As discovered and discussed in whatwg/html#2221 (comment) , Chrome has a blocklist here that seems historical and not supported by any spec.

/cc @sleevi. These pass in Edge and Firefox; going to check Safari Tech Preview now that they're live...


This change is Reviewable

@domenic
Copy link
Member Author

domenic commented Dec 28, 2016

Safari TP fails most of these tests (although it allows modification of track and keygen; in other words, they did not apply Chrome's https://chromium.googlesource.com/chromium/src/+/fa742b7351d8d751e9c4fd2602ec0b1cf2913086

/cc @cdumez

I guess we have a 2/2 browser split here, roughly, so let's mark this as do-not-merge and I'll open a HTML spec issue to discuss...

@wpt-stability-bot
Copy link

wpt-stability-bot commented Dec 28, 2016

Firefox

Testing revision b25ff7b
Starting 10 test iterations
All results were stable

All results

/domparsing/createContextualFragment.html
Subtest Results
OK
Text nodes shouldn't be special PASS
Simple test with paragraphs PASS
createContextualFragment should work even when the context is <menuitem> PASS
SVG namespace shouldn't be special FAIL
<html> in a different namespace shouldn't be special PASS
createContextualFragment should work even when the context is <input> PASS
createContextualFragment should work even when the context is <image> PASS
createContextualFragment should work even when the context is <meta> PASS
createContextualFragment should work even when the context is <bgsound> PASS
Implicit <body> creation PASS
createContextualFragment should work even when the context is <basefont> PASS
<script>s should be run when appended to the document (but not before) PASS
createContextualFragment should work even when the context is <wbr> PASS
createContextualFragment should work even when the context is <br> PASS
createContextualFragment should work even when the context is <area> PASS
createContextualFragment should work even when the context is <track> PASS
createContextualFragment should work even when the context is <img> PASS
undefined should be stringified PASS
createContextualFragment should work even when the context is <frame> PASS
Don't auto-create <body> when applied to <html> PASS
Namespace generally shouldn't matter PASS
Non-Element parent should not be special PASS
createContextualFragment should work even when the context is <link> PASS
Must throw TypeError when calling without arguments PASS
Must not throw INVALID_STATE_ERR for a detached node. PASS
createContextualFragment should work even when the context is <base> PASS
createContextualFragment should work even when the context is <col> PASS
createContextualFragment should work even when the context is <embed> PASS
<html> and <body> must work the same, 1 PASS
<html> and <body> must work the same, 2 PASS
createContextualFragment should work even when the context is <source> PASS
createContextualFragment should work even when the context is <param> PASS
createContextualFragment should work even when the context is <hr> PASS
createContextualFragment should work even when the context is <keygen> PASS
null should be stringified PASS

@wpt-stability-bot
Copy link

wpt-stability-bot commented Dec 28, 2016

Chrome

Testing revision b25ff7b
Starting 10 test iterations
All results were stable

All results

/domparsing/createContextualFragment.html
Subtest Results
OK
Text nodes shouldn't be special PASS
Simple test with paragraphs PASS
createContextualFragment should work even when the context is <menuitem> PASS
SVG namespace shouldn't be special PASS
<html> in a different namespace shouldn't be special PASS
createContextualFragment should work even when the context is <input> FAIL
createContextualFragment should work even when the context is <image> FAIL
createContextualFragment should work even when the context is <meta> FAIL
createContextualFragment should work even when the context is <bgsound> PASS
Implicit <body> creation PASS
createContextualFragment should work even when the context is <basefont> FAIL
<script>s should be run when appended to the document (but not before) PASS
createContextualFragment should work even when the context is <wbr> FAIL
createContextualFragment should work even when the context is <br> FAIL
createContextualFragment should work even when the context is <area> FAIL
createContextualFragment should work even when the context is <track> FAIL
createContextualFragment should work even when the context is <img> FAIL
undefined should be stringified PASS
createContextualFragment should work even when the context is <frame> FAIL
Don't auto-create <body> when applied to <html> PASS
Namespace generally shouldn't matter PASS
Non-Element parent should not be special PASS
createContextualFragment should work even when the context is <link> FAIL
Must throw TypeError when calling without arguments PASS
Must not throw INVALID_STATE_ERR for a detached node. PASS
createContextualFragment should work even when the context is <base> FAIL
createContextualFragment should work even when the context is <col> FAIL
createContextualFragment should work even when the context is <embed> FAIL
<html> and <body> must work the same, 1 PASS
<html> and <body> must work the same, 2 PASS
createContextualFragment should work even when the context is <source> FAIL
createContextualFragment should work even when the context is <param> FAIL
createContextualFragment should work even when the context is <hr> FAIL
createContextualFragment should work even when the context is <keygen> FAIL
null should be stringified PASS

@sleevi
Copy link

sleevi commented Dec 28, 2016

Safari implementation:

For Chrome, it affects

This results in the following interop-table between these browsers:

Tag Safari Chrome Listed in HTML Serialization
area
base
basefont
bgsound
br
col
embed
frame
hr
image
img
input
keygen
link
menuitem
meta
param
source
track
wbr

@domenic domenic changed the title Test that innerText can be set on a variety of elements Test that createContextualFragment works on a variety of contexts Jan 10, 2017
@domenic
Copy link
Member Author

domenic commented Jan 10, 2017

I've removed the innerText tests from here in favor of only testing createContextualFragment; innerText we'll leave for @zcorpan's #3491. Let's be sure to change the commit message when merging.

domenic added a commit that referenced this pull request Jan 10, 2017
@domenic domenic force-pushed the innertext-chrome-bug branch from 887852f to a381691 Compare January 10, 2017 21:40
@domenic domenic merged commit b3163fb into master Jan 10, 2017
@domenic domenic deleted the innertext-chrome-bug branch January 10, 2017 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants