Skip to content
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

Test absence of errors for open elements that do not result in error on EOF #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions tree-construction/tests26.dat
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,166 @@ Line 1 Col 19 Expected closing tag. Unexpected end of file.
| <button>
| <p>
| <button>

#data
<!DOCTYPE html><dd>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <dd>

#data
<!DOCTYPE html><dt>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <dt>

#data
<!DOCTYPE html><li>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <li>

#data
<!DOCTYPE html><menuitem>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <menuitem>

#data
<!DOCTYPE html><optgroup>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <optgroup>

#data
<!DOCTYPE html><option>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <option>

#data
<!DOCTYPE html><p>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <p>

#data
<!DOCTYPE html><rb>
#errors
Copy link
Contributor

@zcorpan zcorpan May 4, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the current node is not now a ruby element, this is a parse error.

Similarly, rp, rt, rtc below are also parse errors. Maybe test as document-fragment with ruby as context?

#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <rb>

#data
<!DOCTYPE html><rp>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <rp>

#data
<!DOCTYPE html><rt>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <rt>

#data
<!DOCTYPE html><rtc>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <rtc>

#data
<tbody>
#errors
#document-fragment
table
#document
| <tbody>

#data
<thead>
#errors
#document-fragment
table
#document
| <thead>

#data
<tfoot>
#errors
#document-fragment
table
#document
| <tfoot>

#data
<tr>
#errors
#document-fragment
table
#document
| <tbody>
| <tr>

#data
<td>
#errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (and th below) should be a parse error per spec I think:

https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody

A start tag whose tag name is one of: "th", "td"
Parse error.

#document-fragment
table
#document
| <tbody>
| <tr>
| <td>

#data
<th>
#errors
#document-fragment
table
#document
| <tbody>
| <tr>
| <th>