Home | History | Annotate | Download | only in encoding
      1 <html>
      2 <head>
      3 <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
      4 <script>
      5 if (window.layoutTestController)
      6     layoutTestController.dumpAsText();
      7 
      8 var test = "Passed";
      9 
     10 function runTest() {
     11     var t = document.getElementById("input1");
     12     if (document.all)  {  
     13         t.fireEvent("onchange");  
     14     } else {  
     15         var evt = document.createEvent("HTMLEvents");  
     16         evt.initEvent("change",true,true);  
     17         t.dispatchEvent(evt);  
     18     }
     19  
     20     var r = document.getElementById("result");
     21 
     22     if (test=="Passed")
     23         r.innerHTML = "Passed";
     24     else
     25         r.innerHTML = "Failed";
     26 }
     27 </script>
     28 </head>
     29 <body onload="runTest();">
     30 <p>Test if an invalid multi-byte sequence is onverconsumed leading to an
     31 XSS vector</p>
     32 <input id="input1" src="" type="xss">ABCD" onchange="test='Failed'" using malformed byte sequence 0x83 0x22<br>
     33 <div id="result"></div>
     34 </body>
     35