diff options
author | Steve Block <steveblock@google.com> | 2011-05-06 11:45:16 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-05-12 13:44:10 +0100 |
commit | cad810f21b803229eb11403f9209855525a25d57 (patch) | |
tree | 29a6fd0279be608e0fe9ffe9841f722f0f4e4269 /LayoutTests/fast | |
parent | 121b0cf4517156d0ac5111caf9830c51b69bae8f (diff) | |
download | external_webkit-cad810f21b803229eb11403f9209855525a25d57.zip external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.gz external_webkit-cad810f21b803229eb11403f9209855525a25d57.tar.bz2 |
Merge WebKit at r75315: Initial merge by git.
Change-Id: I570314b346ce101c935ed22a626b48c2af266b84
Diffstat (limited to 'LayoutTests/fast')
34 files changed, 658 insertions, 162 deletions
diff --git a/LayoutTests/fast/encoding/parser-tests-10-expected.txt b/LayoutTests/fast/encoding/parser-tests-10-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-10-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-10.html b/LayoutTests/fast/encoding/parser-tests-10.html new file mode 100644 index 0000000..f9afb33 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-10.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(10, 19)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-100-expected.txt b/LayoutTests/fast/encoding/parser-tests-100-expected.txt new file mode 100644 index 0000000..fb5c09b --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-100-expected.txt @@ -0,0 +1,19 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +test 102: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS05Ij4='))</script> +<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS0xIj4='))</script> +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-100.html b/LayoutTests/fast/encoding/parser-tests-100.html new file mode 100644 index 0000000..7e80b1c --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-100.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(100, 109)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-110-expected.txt b/LayoutTests/fast/encoding/parser-tests-110-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-110-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-110.html b/LayoutTests/fast/encoding/parser-tests-110.html new file mode 100644 index 0000000..eccd3d4 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-110.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(110, 119)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-120-expected.txt b/LayoutTests/fast/encoding/parser-tests-120-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-120-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-120.html b/LayoutTests/fast/encoding/parser-tests-120.html new file mode 100644 index 0000000..07691e8 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-120.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(120, 123)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-20-expected.txt b/LayoutTests/fast/encoding/parser-tests-20-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-20-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-20.html b/LayoutTests/fast/encoding/parser-tests-20.html new file mode 100644 index 0000000..5be5cbf --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-20.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(20, 29)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-30-expected.txt b/LayoutTests/fast/encoding/parser-tests-30-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-30-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-30.html b/LayoutTests/fast/encoding/parser-tests-30.html new file mode 100644 index 0000000..c2ff0ab --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-30.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(30, 39)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-40-expected.txt b/LayoutTests/fast/encoding/parser-tests-40-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-40-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-40.html b/LayoutTests/fast/encoding/parser-tests-40.html new file mode 100644 index 0000000..7c0b726 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-40.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(40, 49)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-50-expected.txt b/LayoutTests/fast/encoding/parser-tests-50-expected.txt new file mode 100644 index 0000000..ace0646 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-50-expected.txt @@ -0,0 +1,27 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +test 056: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script>document.write('<meta charset="ISO-8859-' + '9">')</script> +test 057: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script>var s = '9">'; document.write('<meta charset="ISO-8859-' + s)</script> +test 058: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script>document.write('<meta charset="ISO-8859-9">')</script> +test 059: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script type="text/plain"><meta charset="ISO-8859-9"></script> +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-50.html b/LayoutTests/fast/encoding/parser-tests-50.html new file mode 100644 index 0000000..264461b --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-50.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(50, 59)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-60-expected.txt b/LayoutTests/fast/encoding/parser-tests-60-expected.txt new file mode 100644 index 0000000..edb9453 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-60-expected.txt @@ -0,0 +1,18 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +test 060: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<style type="text/plain"><meta charset="ISO-8859-9"></style> +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-60.html b/LayoutTests/fast/encoding/parser-tests-60.html new file mode 100644 index 0000000..deb3049 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-60.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(60, 69)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-70-expected.txt b/LayoutTests/fast/encoding/parser-tests-70-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-70-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-70.html b/LayoutTests/fast/encoding/parser-tests-70.html new file mode 100644 index 0000000..3120b90 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-70.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(70, 79)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-80-expected.txt b/LayoutTests/fast/encoding/parser-tests-80-expected.txt new file mode 100644 index 0000000..34a41e7 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-80-expected.txt @@ -0,0 +1,15 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-80.html b/LayoutTests/fast/encoding/parser-tests-80.html new file mode 100644 index 0000000..e4a5feb --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-80.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(80, 89)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-90-expected.txt b/LayoutTests/fast/encoding/parser-tests-90-expected.txt new file mode 100644 index 0000000..b2882a5 --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-90-expected.txt @@ -0,0 +1,22 @@ +This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html + +The suite has been broken up to run the tests in smaller batches. + +Expected failures: +56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. +60 - parser treats meta inside style as text, not a tag. +97, 99, 102 - we do not run scripts during encoding detection. +Status: Tests ran. + +Serious failures: + +test 097: expected Windows-1254; used Windows-1252 +<!DOCTYPE HTML> +<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS05Ij4='))</script> +test 099: expected Windows-1252; used Windows-1254 +<!DOCTYPE HTML> +<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS0xIj4='))</script> +<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-9"> +(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) + + diff --git a/LayoutTests/fast/encoding/parser-tests-90.html b/LayoutTests/fast/encoding/parser-tests-90.html new file mode 100644 index 0000000..012009b --- /dev/null +++ b/LayoutTests/fast/encoding/parser-tests-90.html @@ -0,0 +1,9 @@ +<!DOCTYPE HTML> +<html> + <head> + <title>Harness</title> + </head> + <body onload="runtests(90, 99)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> + </body> +</html> diff --git a/LayoutTests/fast/encoding/parser-tests-expected.txt b/LayoutTests/fast/encoding/parser-tests-expected.txt index fb15ae2..34a41e7 100644 --- a/LayoutTests/fast/encoding/parser-tests-expected.txt +++ b/LayoutTests/fast/encoding/parser-tests-expected.txt @@ -1,5 +1,7 @@ This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html +The suite has been broken up to run the tests in smaller batches. + Expected failures: 56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag. 60 - parser treats meta inside style as text, not a tag. @@ -8,32 +10,6 @@ Status: Tests ran. Serious failures: -test 056: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script>document.write('<meta charset="ISO-8859-' + '9">')</script> -test 057: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script>var s = '9">'; document.write('<meta charset="ISO-8859-' + s)</script> -test 058: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script>document.write('<meta charset="ISO-8859-9">')</script> -test 059: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script type="text/plain"><meta charset="ISO-8859-9"></script> -test 060: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<style type="text/plain"><meta charset="ISO-8859-9"></style> -test 097: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS05Ij4='))</script> -test 099: expected Windows-1252; used Windows-1254 -<!DOCTYPE HTML> -<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS0xIj4='))</script> -<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-9"> -test 102: expected Windows-1254; used Windows-1252 -<!DOCTYPE HTML> -<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS05Ij4='))</script> -<script>document.write(atob('PG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7Y2hhcnNldD1JU08tODg1OS0xIj4='))</script> (Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.) diff --git a/LayoutTests/fast/encoding/parser-tests.html b/LayoutTests/fast/encoding/parser-tests.html index fead50a..ab7fdf8 100644 --- a/LayoutTests/fast/encoding/parser-tests.html +++ b/LayoutTests/fast/encoding/parser-tests.html @@ -3,65 +3,7 @@ <head> <title>Harness</title> </head> - <body onload="runtests()"> - <p>This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html</p> - <ul>Expected failures: - <li>56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag.</li> - <li>60 - parser treats meta inside style as text, not a tag.</li> - <li>97, 99, 102 - we do not run scripts during encoding detection.</li> - </ul> - <p>Status: <span id="status">Tests did not run.</span></p> - <p>Serious failures:</p> - <ol id="failures"> - </ol> - <p>(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.)</p> - <p><iframe id="test"></iframe></p> - <script> - if (window.layoutTestController) { - layoutTestController.dumpAsText(); - layoutTestController.waitUntilDone(); - } - - var frame = document.getElementById('test'); - var current = 1; - var max = 123; - function dotest() { - var s = current + ''; - while (s.length < 3) s = '0' + s; - frame.src = 'resources/' + s + '.html'; - window.receivedResults = function () { - var want = frame.contentWindow.document.getElementById('expected').firstChild.data; - var have = frame.contentWindow.document.getElementById('encoding').firstChild.data; - if (have == 'ISO-8859-9') - have = 'Windows-1254'; - if (want != have) { - var li = document.createElement('li'); - var a = document.createElement('a'); - a.appendChild(document.createTextNode('test ' + s)); - a.href = s + '.html'; - li.appendChild(a); - li.appendChild(document.createTextNode(': expected ' + want + '; used ' + have)); - var pre = document.createElement('pre'); - pre.appendChild(document.createTextNode(frame.contentWindow.document.getElementsByTagName('pre')[0].firstChild.data)); - li.appendChild(pre); - li.value = current; - document.getElementById('failures').appendChild(li); - } - current += 1; - if (current <= max) - dotest(); - else { - frame.parentNode.removeChild(frame); - document.getElementById('status').innerText = "Tests ran."; - if (window.layoutTestController) - layoutTestController.notifyDone(); - } - }; - } - function runtests() { - dotest(); - } - function alert() { } - </script> + <body onload="runtests(1, 9)"> + <script type="text/javascript" src="resources/parser-tests.js"></script> </body> </html> diff --git a/LayoutTests/fast/encoding/resources/parser-tests.js b/LayoutTests/fast/encoding/resources/parser-tests.js new file mode 100644 index 0000000..fb55af9 --- /dev/null +++ b/LayoutTests/fast/encoding/resources/parser-tests.js @@ -0,0 +1,64 @@ +document.write('<p>This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html</p>' + + '<p>The suite has been broken up to run the tests in smaller batches.</p>' + + '<ul>Expected failures:' + + '<li>56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag.</li>' + + '<li>60 - parser treats meta inside style as text, not a tag.</li>' + + '<li>97, 99, 102 - we do not run scripts during encoding detection.</li>' + + '</ul>' + + '<p>Status: <span id="status">Tests did not run.</span></p>' + + '<p>Serious failures:</p>' + + '<ol id="failures">' + + '</ol>' + + '<p>(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.)</p>' + + '<p><iframe id="test"></iframe></p>'); + +if (window.layoutTestController) { + layoutTestController.dumpAsText(); + layoutTestController.waitUntilDone(); +} + +var frame = document.getElementById('test'); +var current = 0; +var max = 0; + +function dotest() { + var s = current + ''; + while (s.length < 3) s = '0' + s; + frame.src = 'resources/' + s + '.html'; + window.receivedResults = function () { + var want = frame.contentWindow.document.getElementById('expected').firstChild.data; + var have = frame.contentWindow.document.getElementById('encoding').firstChild.data; + if (have == 'ISO-8859-9') + have = 'Windows-1254'; + if (want != have) { + var li = document.createElement('li'); + var a = document.createElement('a'); + a.appendChild(document.createTextNode('test ' + s)); + a.href = s + '.html'; + li.appendChild(a); + li.appendChild(document.createTextNode(': expected ' + want + '; used ' + have)); + var pre = document.createElement('pre'); + pre.appendChild(document.createTextNode(frame.contentWindow.document.getElementsByTagName('pre')[0].firstChild.data)); + li.appendChild(pre); + li.value = current; + document.getElementById('failures').appendChild(li); + } + current += 1; + if (current <= max) + dotest(); + else { + frame.parentNode.removeChild(frame); + document.getElementById('status').innerText = "Tests ran."; + if (window.layoutTestController) + layoutTestController.notifyDone(); + } + }; +} + +function runtests(c, m) { + current = c; + max = m; + dotest(); +} + +function alert() { } diff --git a/LayoutTests/fast/events/touch/multi-touch-grouped-targets-expected.txt b/LayoutTests/fast/events/touch/multi-touch-grouped-targets-expected.txt new file mode 100644 index 0000000..a1d032f --- /dev/null +++ b/LayoutTests/fast/events/touch/multi-touch-grouped-targets-expected.txt @@ -0,0 +1,26 @@ +Tests that the an event is sent for every touch listener, and target touches contains all the points for that target + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + + +PASS event.touches.length is 3 +PASS event.changedTouches.length is 3 +PASS event.touches.length is 3 +PASS event.changedTouches.length is 3 +PASS event.touches.length is 3 +PASS event.changedTouches.length is 3 +PASS event.touches.length is 3 +PASS event.changedTouches.length is 3 +PASS event.type is "touchend" +PASS event.touches.length is 0 +PASS event.targetTouches.length is 0 +PASS event.changedTouches.length is 3 +PASS event.type is "touchend" +PASS event.touches.length is 0 +PASS event.targetTouches.length is 0 +PASS event.changedTouches.length is 3 +PASS successfullyParsed is true + +TEST COMPLETE + diff --git a/LayoutTests/fast/events/touch/multi-touch-grouped-targets.html b/LayoutTests/fast/events/touch/multi-touch-grouped-targets.html new file mode 100644 index 0000000..ef965c1 --- /dev/null +++ b/LayoutTests/fast/events/touch/multi-touch-grouped-targets.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> +<html> +<head> +<link rel="stylesheet" href="../../js/resources/js-test-style.css"> +<script src="../../js/resources/js-test-pre.js"></script> +<script src="../../js/resources/js-test-post-function.js"></script> +<!-- + Touch tests that involve the ontouchstart, ontouchmove, ontouchend or ontouchcancel callbacks + should be written in an asynchronous fashion so they can be run on mobile platforms like Android. + This template will generate an asynchronous style test by using the js-test-post-function script. + You will need to invoke isSuccessfullyParsed() in your test script when the test completes. +--> +</head> +<body> +<p id="description"></p> +<div id="console"></div> +<script src="script-tests/multi-touch-grouped-targets.js"></script> +</body> +</html> diff --git a/LayoutTests/fast/events/touch/script-tests/multi-touch-grouped-targets.js b/LayoutTests/fast/events/touch/script-tests/multi-touch-grouped-targets.js new file mode 100644 index 0000000..9d26dac --- /dev/null +++ b/LayoutTests/fast/events/touch/script-tests/multi-touch-grouped-targets.js @@ -0,0 +1,89 @@ +var targetsDiv = document.createElement("div"); +targetsDiv.id = "targetsDiv"; + +var div1 = document.createElement("div"); +div1.id = "targetA"; +div1.style.width = "100px"; +div1.style.height = "100px"; +div1.style.backgroundColor = "blue"; + +var div2 = document.createElement("div"); +div2.id = "targetB"; +div2.style.width = "100px"; +div2.style.height = "100px"; +div2.style.backgroundColor = "green"; + +document.body.insertBefore(targetsDiv, document.getElementById('console')); +targetsDiv.appendChild(div1); +targetsDiv.appendChild(document.createElement('br')); +targetsDiv.appendChild(div2); + +function declareTouchHandler(div_id, expectedTargetTouches) +{ + return function () + { + // Do not use the parameters (div_id, expectedTargetTouches) in shouldBe.. calls, as + // the order of event dispatch is not deterministic across executions and reordering + // ofthe PASS debug output details would cause the test to be unreliable. + shouldBe('event.touches.length', '3'); + if (event.targetTouches.length != expectedTargetTouches) + testFailed('Wrong targetTouch length: ' + event.targetTouches.length + ' vs ' + expectedTargetTouches); + for (var i = 0; i < event.targetTouches.length; i++) + { + if (event.targetTouches[i].target.id != div_id) + testFailed('Incorrect targetTouch ID: ' + event.targetTouches[i].target.id + ' vs ' + div_id); + } + shouldBe('event.changedTouches.length', '3'); + } +} + +var endCount = 0; +function touchEndHandler() +{ + shouldBeEqualToString('event.type', 'touchend'); + + shouldBe('event.touches.length', '0'); + shouldBe('event.targetTouches.length', '0'); + shouldBe('event.changedTouches.length', '3'); + + if (++endCount == 2) + { + successfullyParsed = true; + layoutTestController.notifyDone(); + isSuccessfullyParsed(); + } +} + +div1.addEventListener("touchstart", declareTouchHandler('targetA', '2'), false); +div1.addEventListener("touchmove", declareTouchHandler('targetA', '2'), false); +div1.addEventListener("touchend", touchEndHandler, false); + +div2.addEventListener("touchstart", declareTouchHandler('targetB', '1'), false); +div2.addEventListener("touchmove", declareTouchHandler('targetB', '1'), false); +div2.addEventListener("touchend", touchEndHandler, false); + +description("Tests that the an event is sent for every touch listener, and target touches contains all the points for that target"); + +if (window.layoutTestController) { + layoutTestController.waitUntilDone(); +} + +if (window.eventSender) { + eventSender.clearTouchPoints(); + eventSender.addTouchPoint(50, 150); + eventSender.addTouchPoint(50, 250); + eventSender.addTouchPoint(50, 150); + eventSender.touchStart(); + + eventSender.updateTouchPoint(0, 200, 150); + eventSender.updateTouchPoint(1, 300, 250); + eventSender.updateTouchPoint(2, 400, 150); + eventSender.touchMove(); + + eventSender.releaseTouchPoint(0); + eventSender.releaseTouchPoint(1); + eventSender.releaseTouchPoint(2); + eventSender.touchEnd(); +} else + debug('This test requires DRT.'); + diff --git a/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js b/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js index fd3400c..3aae47a 100644 --- a/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js +++ b/LayoutTests/fast/events/touch/script-tests/touch-target-limited.js @@ -13,59 +13,69 @@ div2.style.width = "100px"; div2.style.height = "100px"; div2.style.backgroundColor = "green"; -var touchStartCount = 0; -var touchMoveCount = 0; - document.body.insertBefore(targetsDiv, document.getElementById('console')); targetsDiv.appendChild(div1); targetsDiv.appendChild(document.createElement('br')); targetsDiv.appendChild(div2); -function touchStartHandler() +function declareTouchStart() { - shouldBeEqualToString('event.type', 'touchstart'); - switch (touchStartCount) { - case 0: - shouldBeEqualToString('event.touches[0].target.id', div1.id); - shouldBeEqualToString('event.touches[1].target.id', div2.id); - break; - case 1: - shouldBeEqualToString('event.touches[0].target.id', div2.id); - shouldBeEqualToString('event.touches[1].target.id', div1.id); - break; + var touchStartCount = 0; + return function touchStartHandler() + { + shouldBeEqualToString('event.type', 'touchstart'); + switch (touchStartCount) { + case 0: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 1: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + shouldBe('event.targetTouches.length', '1'); + + touchStartCount++; } - - touchStartCount++; } -function touchMoveHandler() -{ - shouldBeEqualToString('event.type', 'touchmove'); - switch (touchMoveCount) { - case 0: - case 1: - shouldBeEqualToString('event.touches[0].target.id', div1.id); - shouldBeEqualToString('event.touches[1].target.id', div2.id); - break; - case 2: - shouldBeEqualToString('event.touches[0].target.id', div2.id); - shouldBeEqualToString('event.touches[1].target.id', div1.id); - break; - } +var totalTouchMoveCount = 0; - if (++touchMoveCount == 3) +function declareTouchMove(div_id) +{ + var touchMoveCount = 0; + return function touchMoveHandler() { - successfullyParsed = true; - layoutTestController.notifyDone(); - isSuccessfullyParsed(); + shouldBeEqualToString('event.type', 'touchmove'); + switch (touchMoveCount) { + case 0: + case 1: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 2: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + shouldBe('event.targetTouches.length', '1'); + ++touchMoveCount; + + if (++totalTouchMoveCount == 6) + { + successfullyParsed = true; + layoutTestController.notifyDone(); + isSuccessfullyParsed(); + } } } -div1.addEventListener("touchstart", touchStartHandler, false); -div1.addEventListener("touchmove", touchMoveHandler, false); +div1.addEventListener("touchstart", declareTouchStart(), false); +div1.addEventListener("touchmove", declareTouchMove(), false); -div2.addEventListener("touchstart", touchStartHandler, false); -div2.addEventListener("touchmove", touchMoveHandler, false); +div2.addEventListener("touchstart", declareTouchStart(), false); +div2.addEventListener("touchmove", declareTouchMove(), false); description("Tests that the target of touches match the element where the event originated, not where the touch is currently occurring. This is a limited version of test touch-target.html that avoids the situation where one touch point is released while another is maintained."); diff --git a/LayoutTests/fast/events/touch/script-tests/touch-target.js b/LayoutTests/fast/events/touch/script-tests/touch-target.js index 8e47f23..de58606 100644 --- a/LayoutTests/fast/events/touch/script-tests/touch-target.js +++ b/LayoutTests/fast/events/touch/script-tests/touch-target.js @@ -13,59 +13,69 @@ div2.style.width = "100px"; div2.style.height = "100px"; div2.style.backgroundColor = "green"; -var touchStartCount = 0; -var touchMoveCount = 0; - document.body.insertBefore(targetsDiv, document.getElementById('console')); targetsDiv.appendChild(div1); targetsDiv.appendChild(document.createElement('br')); targetsDiv.appendChild(div2); -function touchStartHandler() +function declareTouchStart() { - shouldBeEqualToString('event.type', 'touchstart'); - switch (touchStartCount) { - case 0: - shouldBeEqualToString('event.touches[0].target.id', div1.id); - shouldBeEqualToString('event.touches[1].target.id', div2.id); - break; - case 1: - shouldBeEqualToString('event.touches[0].target.id', div2.id); - shouldBeEqualToString('event.touches[1].target.id', div1.id); - break; + var touchStartCount = 0; + return function touchStartHandler() + { + shouldBeEqualToString('event.type', 'touchstart'); + switch (touchStartCount) { + case 0: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 1: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + shouldBe('event.targetTouches.length', '1'); + + touchStartCount++; } - - touchStartCount++; } -function touchMoveHandler() -{ - shouldBeEqualToString('event.type', 'touchmove'); - switch (touchMoveCount) { - case 0: - case 1: - shouldBeEqualToString('event.touches[0].target.id', div1.id); - shouldBeEqualToString('event.touches[1].target.id', div2.id); - break; - case 2: - shouldBeEqualToString('event.touches[0].target.id', div2.id); - shouldBeEqualToString('event.touches[1].target.id', div1.id); - break; - } +var totalTouchMoveCount = 0; - if (++touchMoveCount == 3) +function declareTouchMove(div_id) +{ + var touchMoveCount = 0; + return function touchMoveHandler() { - successfullyParsed = true; - layoutTestController.notifyDone(); - isSuccessfullyParsed(); + shouldBeEqualToString('event.type', 'touchmove'); + switch (touchMoveCount) { + case 0: + case 1: + shouldBeEqualToString('event.touches[0].target.id', div1.id); + shouldBeEqualToString('event.touches[1].target.id', div2.id); + break; + case 2: + shouldBeEqualToString('event.touches[0].target.id', div2.id); + shouldBeEqualToString('event.touches[1].target.id', div1.id); + break; + } + shouldBe('event.targetTouches.length', '1'); + ++touchMoveCount; + + if (++totalTouchMoveCount == 6) + { + successfullyParsed = true; + layoutTestController.notifyDone(); + isSuccessfullyParsed(); + } } } -div1.addEventListener("touchstart", touchStartHandler, false); -div1.addEventListener("touchmove", touchMoveHandler, false); +div1.addEventListener("touchstart", declareTouchStart(), false); +div1.addEventListener("touchmove", declareTouchMove(), false); -div2.addEventListener("touchstart", touchStartHandler, false); -div2.addEventListener("touchmove", touchMoveHandler, false); +div2.addEventListener("touchstart", declareTouchStart(), false); +div2.addEventListener("touchmove", declareTouchMove(), false); description("Tests that the target of touches match the element where the event originated, not where the touch is currently occurring."); diff --git a/LayoutTests/fast/events/touch/touch-target-expected.txt b/LayoutTests/fast/events/touch/touch-target-expected.txt index 60a4c37..b1c865d 100644 --- a/LayoutTests/fast/events/touch/touch-target-expected.txt +++ b/LayoutTests/fast/events/touch/touch-target-expected.txt @@ -7,18 +7,39 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS event.type is "touchstart" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 PASS event.type is "touchstart" PASS event.touches[0].target.id is "targetB" PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetB" PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 PASS successfullyParsed is true TEST COMPLETE diff --git a/LayoutTests/fast/events/touch/touch-target-limited-expected.txt b/LayoutTests/fast/events/touch/touch-target-limited-expected.txt index 0c1efd0..f774434 100644 --- a/LayoutTests/fast/events/touch/touch-target-limited-expected.txt +++ b/LayoutTests/fast/events/touch/touch-target-limited-expected.txt @@ -7,18 +7,43 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE PASS event.type is "touchstart" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetA" PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetA" +PASS event.touches[1].target.id is "targetB" +PASS event.targetTouches.length is 1 +PASS event.type is "touchstart" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 PASS event.type is "touchstart" PASS event.touches[0].target.id is "targetB" PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 +PASS event.type is "touchmove" +PASS event.touches[0].target.id is "targetB" +PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 PASS event.type is "touchmove" PASS event.touches[0].target.id is "targetB" PASS event.touches[1].target.id is "targetA" +PASS event.targetTouches.length is 1 PASS successfullyParsed is true TEST COMPLETE |