Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6744161

Browse files
author
David Flanagan
committed
tokenizer and tree-builder tests that check correct handling of carriage return in bogus-comment-state and in CDATA sections
1 parent 0de16b9 commit 6744161

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

tokenizer/domjs.test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tests": [
3+
{
4+
"description":"CR in bogus comment state",
5+
"input":"<?\u000d",
6+
"output":["ParseError", ["Comment", "?\u000a"]]
7+
},
8+
{
9+
"description":"CRLF in bogus comment state",
10+
"input":"<?\u000d\u000a",
11+
"output":["ParseError", ["Comment", "?\u000a"]]
12+
}
13+
]
14+
}

tree-construction/domjs.dat

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#data
2+
<svg><![CDATA[foo
3+
bar]]>
4+
#errors
5+
#document
6+
| <html>
7+
| <head>
8+
| <body>
9+
| <svg svg>
10+
| "foo
11+
bar"
12+
13+
#data
14+
<svg><![CDATA[foobar]]>
15+
#errors
16+
#document
17+
| <html>
18+
| <head>
19+
| <body>
20+
| <svg svg>
21+
| "foo
22+
bar"
23+
24+
#data
25+
<svg><![CDATA[foo
26+
bar]]>
27+
#errors
28+
#document
29+
| <html>
30+
| <head>
31+
| <body>
32+
| <svg svg>
33+
| "foo
34+
bar"

0 commit comments

Comments
 (0)