This CL provides a bunch of new parser tests, and updates the

TestExpectations file to skip the ones that fail or crash. It also
updates the TestExpectations parser to support URLs pointing to the
mojo repo's issue tracker.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/685593006
This commit is contained in:
Hixie
2014-10-28 18:58:18 -07:00
parent c56ab49799
commit 4305216cf9
26 changed files with 644 additions and 0 deletions

View File

@@ -7,3 +7,14 @@ crbug.com/1 mutation-observer/observer-wrapper-dropoff-transient.sky [ Skip ]
crbug.com/1 mutation-observer/observer-wrapper-dropoff.sky [ Skip ]
crbug.com/1 mutation-observer/transient-gc-crash.sky [ Skip ]
crbug.com/1 mutation-observer/weak-callback-gc-crash.sky [ Skip ]
# These tests need more basic testing support plumbed right into the
# platform, which we don't currently have:
https://github.com/domokit/mojo/issues/15 parser/cr.sky [ Skip ]
https://github.com/domokit/mojo/issues/15 parser/empty.sky [ Skip ]
#https://github.com/domokit/mojo/issues/15 parser/utf16.sky [ Skip ]
# These tests fail
https://github.com/domokit/mojo/issues/14 parser/normaliser-null.sky [ Crash ]
https://github.com/domokit/mojo/issues/14 parser/utf16.sky [ Crash ]
https://github.com/domokit/mojo/issues/16 parser/normaliser-crlf.sky [ Skip ]

View File

@@ -0,0 +1,133 @@
The empty, cr, and utf16 tests don't import the test framework so they
currently hang until timeout. Really they should just check that
nothing crashes. For now they are disabled.
We should also test the following (each line is its own test):
```
<
<!
<!-
<!--
<!---
<!----
<!---->
<!----->
<a
<aa
<a
<a a
<a a=
<a a=&
<a a=&#
<a a=&#x
<a a=&#x1
<a a=&#x1;
<a a=&#1
<a a=&#1;
<a a=&a
<a a=&a;
<a a=&;
<a a='
<a a="
<a a=a
<a>
<a >
<a a>
<a a=>
<a a=&>
<a a=&#>
<a a=&#x>
<a a=&#x1>
<a a=&#x1;>
<a a=&#1>
<a a=&#1;>
<a a=&a>
<a a=&a;>
<a a=&;>
<a a=''>
<a a="">
<a a=a>
<a a >
<a a= >
<a a=& >
<a a=&# >
<a a=&#x >
<a a=&#x1 >
<a a=&#x1; >
<a a=&#1 >
<a a=&#1; >
<a a=&a >
<a a=&a; >
<a a=&; >
<a a='' >
<a a="" >
<a a=a >
</a
</aa
</a
</a a
</a a=
</a a=&
</a a=&#
</a a=&#x
</a a=&#x1
</a a=&#x1;
</a a=&#1
</a a=&#1;
</a a=&a
</a a=&a;
</a a=&;
</a a='
</a a="
</a a=a
</a>
</a >
</a a>
</a a=>
</a a=&>
</a a=&#>
</a a=&#x>
</a a=&#x1>
</a a=&#x1;>
</a a=&#1>
</a a=&#1;>
</a a=&a>
</a a=&a;>
</a a=&;>
</a a=''>
</a a="">
</a a=a>
</a a >
</a a= >
</a a=& >
</a a=&# >
</a a=&#x >
</a a=&#x1 >
</a a=&#x1; >
</a a=&#1 >
</a a=&#1; >
</a a=&a >
</a a=&a; >
</a a=&; >
</a a='' >
</a a="" >
</a a=a >
a
&
&#
&#x
&#x1
&#x1;
&#1
&#1;
&a
&a;
&;
```
We should also test:
- multiple elements per page
- signature stuff
- <t>

View File

@@ -0,0 +1,8 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
THIS TEST SHOULD PASS
(control test for success)
</body>
</html>

View File

@@ -0,0 +1,7 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky" />
<body>
THIS TEST SHOULD PASS
(control test for success)
</body>
</html>

View File

@@ -0,0 +1 @@


View File

@@ -0,0 +1,11 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<diva>1</diva>
<divb>2</divb>
<divc>3</divc>
<divd>4</divd>;&gt;
</body>
</html>

View File

@@ -0,0 +1,10 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<diva>1</diva>
<divb>2</divb a>
<divc>3</divc a=a>
<divd>4</divd a=a&#a>;>
</body>

View File

@@ -0,0 +1,22 @@
&lt;!DOCTYPE HTML&gt;
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
A &lt;!DOCTYPE HTMLAGAIN&gt;
B &lt;!BOGUSCOMMENT&gt;
C
E
G &lt;! -- -- &gt;
H <image></image>
I <keygen>
J <isindex>
K <table><div></div><input type="hidden"></input></table>
L <frameset></frameset>
M <p></p>
N
O <br></br>
P
</isindex></keygen></body>
</html>

View File

@@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
A <!DOCTYPE HTMLAGAIN>
B <!BOGUSCOMMENT>
C <!--->
D -->
E <!-- -- >
F -->
G <! -- -- >
H <image></image>
I <keygen>
J <isindex>
K <table><div></div><input type=hidden /></table>
L <frameset></frameset>
M <p></p>
N </p>
O <br/>
P </br>
</body>

View File

@@ -0,0 +1,25 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky" />
<body>
<div></div>
<div>
</div>
<div>
</div>
<div>

</div>
<div>
</div>
<div></div>
<div>
</div>
</body>
</html>

View File

@@ -0,0 +1,12 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky" />
<body>
<div><3E></div>
<div><3E><><EFBFBD><EFBFBD><EFBFBD></div>
<div><3E><></div>
<div><3E><></div>
<div><3E><><EFBFBD></div>
<div><3E><><EFBFBD></div>
</body>
</html>

Binary file not shown.

View File

@@ -0,0 +1,57 @@
ERROR: Uncaught SyntaxError: Unexpected token <
SOURCE: http://127.0.0.1:8000/parser/script.sky:3
ERROR: Uncaught SyntaxError: Unexpected token <
SOURCE: http://127.0.0.1:8000/parser/script.sky:3
ERROR: Uncaught SyntaxError: Unexpected token <
SOURCE: http://127.0.0.1:8000/parser/script.sky:3
ERROR: Uncaught ReferenceError: TEST is not defined
SOURCE: http://127.0.0.1:8000/parser/script.sky:2
ERROR: Uncaught SyntaxError: Invalid regular expression: missing /
SOURCE: http://127.0.0.1:8000/parser/script.sky:2
ERROR: Uncaught SyntaxError: Invalid regular expression: missing /
SOURCE: http://127.0.0.1:8000/parser/script.sky:2
ERROR: Uncaught SyntaxError: Unexpected token }
SOURCE: http://127.0.0.1:8000/parser/script.sky:4
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<script>
TEST <a></a>
</script>
<SCRIPT>
TEST <a></a>
</SCRIPT>
<script>
<SCRIPT>
TEST <a></a>
</SCRIPT>
</script>
<SCRIPT>
<script>
TEST <a></a>
</SCRIPT>
</script>
</SCRIPT>
<script> TEST </script>
&lt;
script
&gt; TEST
<script> TEST </
script>
</script>
<script> TEST </scrip>
</script>
<script> TEST <//script>
</script>
</body>
</html>

View File

@@ -0,0 +1,44 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<script>
TEST <a></a>
</script>
<SCRIPT>
TEST <a></a>
</SCRIPT>
<script>
<SCRIPT>
TEST <a></a>
</SCRIPT>
</script>
<SCRIPT>
<script>
TEST <a></a>
</SCRIPT>
</script>
</SCRIPT>
<script
> TEST </script
>
<
script
> TEST </script>
<script> TEST </
script>
</script>
<script> TEST </scrip>
</script>
<script> TEST <//script>
</script>
</body>

View File

@@ -0,0 +1,28 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<a>1</a>
<a>2</a>
<a.>3</a.>
<a_>4</a_>
<a->5</a->
<a!>6</a!>
<a%>7</a%>
&lt; a&gt;8&lt;/ a&gt;
<.a>9</.a>
<_a>a</_a>
<-a>b</-a>
&lt;!a&gt;c&lt;/!a&gt;
&lt;%a&gt;d&lt;/%a&gt;
<a _a=""></a>
<a foo="bar" <="" a=""></a>
<a a1="" a2="xx=xx" a3="&amp;" a4="&amp;#" a5="&amp;#x" a6="&amp;#x1" a7="" a8="&amp;#1" a9="" aa="&amp;a" ab="<22>" ac="&amp;;" ad="a" ae="<" af="&amp;lt" ag="<22>" b3="&amp;" b4="&amp;#" b5="&amp;#x" b6="&amp;#x1" b7="" b8="&amp;#1" b9="" ba="&amp;a" bb="<22>" bc="&amp;;" bd="a" be="<" bf="&amp;lt" bg="<22>" c3="&amp;" c4="&amp;#" c5="&amp;#x" c6="&amp;#x1" c7="" c8="&amp;#1" c9="" ca="&amp;a" cb="<22>" cc="&amp;;" cd="a" ce="<" cf="&amp;lt" cg="<22>">
</a></body>
</html>

View File

@@ -0,0 +1,77 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<a>1</a>
<a >2</a >
<a.>3</a.>
<a_>4</a_>
<a->5</a->
<a!>6</a!>
<a%>7</a%>
< a>8</ a>
<.a>9</.a>
<_a>a</_a>
<-a>b</-a>
<!a>c</!a>
<%a>d</%a>
<a/_a></a>
<a foo=bar
</a></a>
<a a1
a2=
xx=xx
a3=&
a4=&#
a5=&#x
a6=&#x1
a7=&#x1;
a8=&#1
a9=&#1;
aa=&a
ab=&a;
ac=&;
ad=a
ae=&lt;
af=&lt
ag=&LT;
b3='&'
b4='&#'
b5='&#x'
b6='&#x1'
b7='&#x1;'
b8='&#1'
b9='&#1;'
ba='&a'
bb='&a;'
bc='&;'
bd='a'
be='&lt;'
bf='&lt'
bg='&LT;'
c3="&"
c4="&#"
c5="&#x"
c6="&#x1"
c7="&#x1;"
c8="&#1"
c9="&#1;"
ca="&a"
cb="&a;"
cc="&;"
cd="a"
ce="&lt;"
cf="&lt"
cg="&LT;"
>
</body>

View File

@@ -0,0 +1,55 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<style>
& TEST <a></a>
</style>
<STYLE>
&amp; TEST <a></a>
</STYLE>
<style>
& TEST
<STYLE>
& TEST <a></a>
</STYLE>
& TEST
</style>
<STYLE>
&amp; TEST
<style>
TEST <a></a>
</STYLE>
& TEST
</style>
&amp; TEST
</STYLE>
<style> TEST </style>
&lt;
style
&gt; &amp; TEST
&amp; TEST
<style> & TEST </
style>
& TEST
</style>
<style> & TEST </styl>
& TEST
</style>
<style> & TEST <//style>
& TEST
</style>
&amp; TEST
</body>
</html>

View File

@@ -0,0 +1,56 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<style>
& TEST <a></a>
</style>
<STYLE>
& TEST <a></a>
</STYLE>
<style>
& TEST
<STYLE>
& TEST <a></a>
</STYLE>
& TEST
</style>
<STYLE>
& TEST
<style>
TEST <a></a>
</STYLE>
& TEST
</style>
& TEST
</STYLE>
<style
> TEST </style
>
<
style
> & TEST </style>
& TEST
<style> & TEST </
style>
& TEST
</style>
<style> & TEST </styl>
& TEST
</style>
<style> & TEST <//style>
& TEST
</style>
& TEST
</body>

Binary file not shown.

View File

@@ -0,0 +1,23 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<p></p> a
<p></p> a
<p test=""></p> a
<p test=""></p> a
<p test="/"> a </p>
<p test="/"> a </p>
<p test="a/"> a </p>
<p test="a"></p> a
<p test="a"></p> a
<p test="a"></p> a
<p test="a"></p> a
<p test="a"></p> a
<p test="&amp;/"> a </p>
<p test="&amp;"></p> a
<p test="a/"> a </p>
<p test="a"></p> a
</body>
</html>

View File

@@ -0,0 +1,22 @@
<html>
<link rel="import" href="../resources/dump-as-markup.sky"></link>
<body>
<p/> a </p>
<p /> a </p>
<p test/> a </p>
<p test /> a </p>
<p test=/> a </p>
<p test= /> a </p>
<p test=a/> a </p>
<p test=a /> a </p>
<p test='a'/> a </p>
<p test='a' /> a </p>
<p test="a"/> a </p>
<p test="a" /> a </p>
<p test=&/> a </p>
<p test=& /> a </p>
<p test=&#x61;/> a </p>
<p test=&#x61; /> a </p>
</body>