Skip to content

Commit

Permalink
adds longer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
M4tteoP committed Jan 27, 2024
1 parent 9c8ad42 commit 4bc1c8c
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test-html5-068.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
tags
--INPUT--
quitesomerandomcharacters<TABLE BACKGROUND="javascript:javascript:alert(99111)">
--EXPECTED--
DATA_TEXT,25,quitesomerandomcharacters
TAG_NAME_OPEN,5,TABLE
ATTR_NAME,10,BACKGROUND
ATTR_VALUE,34,javascript:javascript:alert(99111)
TAG_NAME_CLOSE,1,>


9 changes: 9 additions & 0 deletions tests/test-html5-069.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--TEST--
cdata, degenerate. Longer text
--INPUT--
<![CDATA foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo
--EXPECTED--
TAG_COMMENT,253,[CDATA foofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoofoo



10 changes: 10 additions & 0 deletions tests/test-html5-070.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--TEST--
Extended bogus closing tags
--INPUT--
</ looooooonger foo="><script>ReferenceError.prototype.__defineGetter__('name', function(){javascript:alert(1)}),x</script>
--EXPECTED--
TAG_COMMENT,19, looooooonger foo="
TAG_NAME_OPEN,6,script
TAG_NAME_CLOSE,1,>
DATA_TEXT,84,ReferenceError.prototype.__defineGetter__('name', function(){javascript:alert(1)}),x
TAG_CLOSE,6,script
42 changes: 42 additions & 0 deletions tests/test-html5-071.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--TEST--
Extended Body Test
--INPUT--
<BODY BACKGROUND="javascript:alert('XSS')"><h1>Welcome to my awesome Website!</h1><p>This is a paragraph of text on my website. It contains more characters to make the test longer.</p><div id="content"><p>Here's another paragraph of text. This one is inside a div with an id of "content".</p><ul><li>List item 1</li><li>List item 2</li><li>List item 3</li></ul></div></BODY>
--EXPECTED--
TAG_NAME_OPEN,4,BODY
ATTR_NAME,10,BACKGROUND
ATTR_VALUE,23,javascript:alert('XSS')
TAG_NAME_CLOSE,1,>
TAG_NAME_OPEN,2,h1
TAG_NAME_CLOSE,1,>
DATA_TEXT,30,Welcome to my awesome Website!
TAG_CLOSE,2,h1
TAG_NAME_OPEN,1,p
TAG_NAME_CLOSE,1,>
DATA_TEXT,95,This is a paragraph of text on my website. It contains more characters to make the test longer.
TAG_CLOSE,1,p
TAG_NAME_OPEN,3,div
ATTR_NAME,2,id
ATTR_VALUE,7,content
TAG_NAME_CLOSE,1,>
TAG_NAME_OPEN,1,p
TAG_NAME_CLOSE,1,>
DATA_TEXT,83,Here's another paragraph of text. This one is inside a div with an id of "content".
TAG_CLOSE,1,p
TAG_NAME_OPEN,2,ul
TAG_NAME_CLOSE,1,>
TAG_NAME_OPEN,2,li
TAG_NAME_CLOSE,1,>
DATA_TEXT,11,List item 1
TAG_CLOSE,2,li
TAG_NAME_OPEN,2,li
TAG_NAME_CLOSE,1,>
DATA_TEXT,11,List item 2
TAG_CLOSE,2,li
TAG_NAME_OPEN,2,li
TAG_NAME_CLOSE,1,>
DATA_TEXT,11,List item 3
TAG_CLOSE,2,li
TAG_CLOSE,2,ul
TAG_CLOSE,3,div
TAG_CLOSE,4,BODY

0 comments on commit 4bc1c8c

Please sign in to comment.