Skip to content

Add some tests for <noscript> in scripting disabled case #76

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

Merged
merged 2 commits into from
May 10, 2016
Merged
Changes from 1 commit
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
235 changes: 235 additions & 0 deletions tree-construction/noscript01.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
#data
<head><noscript><!doctype html></noscript>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment after the doctype to see that it ends up inside the noscript

#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 31 Unexpected DOCTYPE. Ignored.
#document
| <html>
| <head>
| <noscript>
| <body>

#data
<head><noscript><html class="foo"></noscript>
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a comment after the html tag to see that it ends up inside the noscript

#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 34 html needs to be the first start tag.
#document
| <html>
| class="foo"
| <head>
| <noscript>
| <body>

#data
<head><noscript></noscript>
#script-off
#errors
(1,6): expected-doctype-but-got-tag
#document
| <html>
| <head>
| <noscript>
| <body>

#data
<head><noscript> </noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| " "
| <body>

#data
<head><noscript><!--foo--></noscript>
#script-off
#errors
(1,6): expected-doctype-but-got-tag
#document
| <html>
| <head>
| <noscript>
| <!-- foo -->
| <body>

#data
<head><noscript><basefont><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <basefont>
| <!-- foo -->
| <body>

#data
<head><noscript><bgsound><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <bgsound>
| <!-- foo -->
| <body>

#data
<head><noscript><link><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <link>
| <!-- foo -->
| <body>

#data
<head><noscript><meta><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <meta>
| <!-- foo -->
| <body>

#data
<head><noscript><noframes>XXX</noscript></noframes></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <noframes>
| "XXX</noscript>"
| <body>

#data
<head><noscript><style>XXX</style></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
#document
| <html>
| <head>
| <noscript>
| <style>
| "XXX"
| <body>

#data
<head><noscript></br><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 21 Element br not allowed in a inhead-noscript context
Line: 1 Col: 21 Unexpected end tag (br). Treated as br element.
Line: 1 Col: 42 Unexpected end tag (noscript). Ignored.
#document
| <html>
| <head>
| <noscript>
| <body>
| <br>
| <!-- foo -->

#data
<head><noscript><head class="foo"><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 34 Unexpected start tag (head).
#document
| <html>
| <head>
| <noscript>
| <!-- foo -->
| <body>

#data
<head><noscript><noscript class="foo"><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 34 Unexpected start tag (noscript).
#document
| <html>
| <head>
| <noscript>
| <!-- foo -->
| <body>

#data
<head><noscript></p><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 20 Unexpected end tag (p). Ignored.
#document
| <html>
| <head>
| <noscript>
| <!-- foo -->
| <body>

#data
<head><noscript><p><!--foo--></noscript>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 19 Element p not allowed in a inhead-noscript context
Line: 1 Col: 40 Unexpected end tag (noscript). Ignored.
#document
| <html>
| <head>
| <noscript>
| <body>
| <p>
| <!-- foo -->

#data
<head><noscript>XXX<!--foo--></noscript></head>
#script-off
#errors
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
Line: 1 Col: 19 Unexpected non-space character. Expected inhead-noscript content
Line: 1 Col: 30 Unexpected end tag (noscript). Ignored.
Line: 1 Col: 37 Unexpected end tag (head). Ignored.
#document
| <html>
| <head>
| <noscript>
| <body>
| "XXX"
| <!-- foo -->

#data
<head><noscript>
#script-off
#errors
(1,6): expected-doctype-but-got-tag
(1,6): eof-in-head-noscript
#document
| <html>
| <head>
| <noscript>
| <body>