|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=642026 |
|
5 |
|
6 /// Copyright (c) 2009 Microsoft Corporation |
|
7 /// |
|
8 /// Redistribution and use in source and binary forms, with or without modification, are permitted provided |
|
9 /// that the following conditions are met: |
|
10 /// * Redistributions of source code must retain the above copyright notice, this list of conditions and |
|
11 /// the following disclaimer. |
|
12 /// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and |
|
13 /// the following disclaimer in the documentation and/or other materials provided with the distribution. |
|
14 /// * Neither the name of Microsoft nor the names of its contributors may be used to |
|
15 /// endorse or promote products derived from this software without specific prior written permission. |
|
16 /// |
|
17 /// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR |
|
18 /// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
19 /// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE |
|
20 /// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
21 /// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
22 /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
23 /// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
24 /// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
25 |
|
26 --> |
|
27 <head> |
|
28 <title>Test for Bug 642026</title> |
|
29 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
30 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
31 </head> |
|
32 <body> |
|
33 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=642026">Mozilla Bug 642026</a> |
|
34 <p id="display"></p> |
|
35 <div id="content" style="display: none"> |
|
36 |
|
37 </div> |
|
38 <pre id="test"> |
|
39 <script type="application/javascript"> |
|
40 |
|
41 /** Test for Bug 642026 **/ |
|
42 |
|
43 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"]; |
|
44 |
|
45 var result = Object.getOwnPropertyNames(window); |
|
46 var result1 = {}; |
|
47 for (var p in result) { |
|
48 result1[result[p]] = true; |
|
49 } |
|
50 |
|
51 ok(expResult.every(function(c) result1[c]), "all of the standard classes have been enumerated"); |
|
52 |
|
53 </script> |
|
54 </pre> |
|
55 </body> |
|
56 </html> |