js/xpconnect/tests/mochitest/file_bug760131.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/xpconnect/tests/mochitest/file_bug760131.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +<html>
     1.5 +<div id="target" ontouchstart="alert();"></div>
     1.6 +<script type="application/javascript">
     1.7 +
     1.8 +/** Test for Bug 760131 **/
     1.9 +
    1.10 +function accessTouches(evt)
    1.11 +{
    1.12 +  var thrown = false;
    1.13 +  try {
    1.14 +    var a = evt.touches;
    1.15 +  } catch (e) {
    1.16 +    thrown = true;
    1.17 +  }
    1.18 +  ok(!thrown, "Unwrapping a TouchList shouldn't throw");
    1.19 +}
    1.20 +
    1.21 +document.getElementById("target").ontouchstart = accessTouches;
    1.22 +
    1.23 +</script>
    1.24 +</pre>
    1.25 +</body>
    1.26 +</html>

mercurial