dom/tests/mochitest/general/test_windowProperties.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/general/test_windowProperties.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Test that all window properties are accessible to nonprivileged code</title>
     1.8 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
    1.10 +</head>
    1.11 +
    1.12 +<body id="body">
    1.13 +
    1.14 +<script type="application/javascript">
    1.15 +var lastProp;
    1.16 +try {
    1.17 +  var propVals = [];
    1.18 +  for (var prop in window) {
    1.19 +    lastProp = prop;
    1.20 +    propVals.push(window[prop]);
    1.21 +  }
    1.22 +  ok(true, "Read all " + propVals.length + " window properties");
    1.23 +} catch (ex) {
    1.24 +  ok(false, "Exception occurred reading window." + lastProp); 
    1.25 +}
    1.26 +</script>
    1.27 +
    1.28 +<p id="display"></p>
    1.29 +
    1.30 +</body>
    1.31 +</html>

mercurial