diff options
author | Iain Merrick <husky@google.com> | 2010-09-29 10:59:30 +0100 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-09-29 16:27:50 +0100 |
commit | fd5c6425ce58eb75211be7718d5dee960842a37e (patch) | |
tree | fdcd1da6ceced587fa315991889655ca4105efb1 /LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html | |
parent | a477fea25b6f689360fd2b6a69ee21c3627d3b04 (diff) | |
download | external_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.zip external_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.tar.gz external_webkit-fd5c6425ce58eb75211be7718d5dee960842a37e.tar.bz2 |
Add fast/encoding layout tests.
Merged from WebKit at r67178.
The vast majority of these are passing. The exceptions:
- Three Mac-specific tests, won't fix.
- Four failures in the Java HTTP stack (no problem for the Chrome HTTP stack).
- fast/encoding/mailto-always-utf-8 needs a new LayoutTestController callback.
Change-Id: I16c613d42acd0ea2dc146909d514376d0a2e5aaa
Diffstat (limited to 'LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html')
-rw-r--r-- | LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html b/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html new file mode 100644 index 0000000..60d7f0c --- /dev/null +++ b/LayoutTests/fast/encoding/invalid-multi-byte-over-consumption.html @@ -0,0 +1,34 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> +<script> +if (window.layoutTestController) + layoutTestController.dumpAsText(); + +var test = "Passed"; + +function runTest() { + var t = document.getElementById("input1"); + if (document.all) { + t.fireEvent("onchange"); + } else { + var evt = document.createEvent("HTMLEvents"); + evt.initEvent("change",true,true); + t.dispatchEvent(evt); + } + + var r = document.getElementById("result"); + + if (test=="Passed") + r.innerHTML = "Passed"; + else + r.innerHTML = "Failed"; +} +</script> +</head> +<body onload="runTest();"> +<p>Test if an invalid multi-byte sequence is onverconsumed leading to an +XSS vector</p> +<input id="input1" src="" type="xss�">ABCD" onchange="test='Failed'" using malformed byte sequence 0x83 0x22<br> +<div id="result"></div> +</body> |