dom/tests/mochitest/bugs/test_bug642026.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/bugs/test_bug642026.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=642026
     1.8 +
     1.9 +/// Copyright (c) 2009 Microsoft Corporation 
    1.10 +/// 
    1.11 +/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
    1.12 +/// that the following conditions are met: 
    1.13 +///    * Redistributions of source code must retain the above copyright notice, this list of conditions and
    1.14 +///      the following disclaimer. 
    1.15 +///    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and 
    1.16 +///      the following disclaimer in the documentation and/or other materials provided with the distribution.  
    1.17 +///    * Neither the name of Microsoft nor the names of its contributors may be used to
    1.18 +///      endorse or promote products derived from this software without specific prior written permission.
    1.19 +/// 
    1.20 +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
    1.21 +/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    1.22 +/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
    1.23 +/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.24 +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    1.25 +/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    1.26 +/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
    1.27 +/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    1.28 +
    1.29 +-->
    1.30 +<head>
    1.31 +  <title>Test for Bug 642026</title>
    1.32 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.33 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.34 +</head>
    1.35 +<body>
    1.36 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=642026">Mozilla Bug 642026</a>
    1.37 +<p id="display"></p>
    1.38 +<div id="content" style="display: none">
    1.39 +  
    1.40 +</div>
    1.41 +<pre id="test">
    1.42 +<script type="application/javascript">
    1.43 +
    1.44 +/** Test for Bug 642026 **/
    1.45 +
    1.46 +var expResult = ["NaN", "Infinity", "undefined", "eval", "parseInt", "parseFloat", "isNaN", "isFinite", "decodeURI", "decodeURIComponent", "encodeURI", "encodeURIComponent", "Object", "Function", "Array", "String", "Boolean", "Number", "Date", "Date", "RegExp", "Error", "EvalError", "RangeError", "ReferenceError", "SyntaxError", "TypeError", "URIError", "Math", "JSON"];
    1.47 +
    1.48 +var result = Object.getOwnPropertyNames(window);
    1.49 +var result1 = {};
    1.50 +for (var p in result) {
    1.51 +    result1[result[p]] = true;
    1.52 +}
    1.53 +
    1.54 +ok(expResult.every(function(c) result1[c]), "all of the standard classes have been enumerated");
    1.55 +
    1.56 +</script>
    1.57 +</pre>
    1.58 +</body>
    1.59 +</html>

mercurial