]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/js1_5/Regress/regress-76054.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / js1_5 / Regress / regress-76054.js
1 /*
2 * The contents of this file are subject to the Netscape Public
3 * License Version 1.1 (the "License"); you may not use this file
4 * except in compliance with the License. You may obtain a copy of
5 * the License at http://www.mozilla.org/NPL/
6 *
7 * Software distributed under the License is distributed on an "AS
8 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9 * implied. See the License for the specific language governing
10 * rights and limitations under the License.
11 *
12 * The Original Code is mozilla.org code.
13 *
14 * The Initial Developer of the Original Code is Netscape
15 * Communications Corporation. Portions created by Netscape are
16 * Copyright (C) 1998 Netscape Communications Corporation. All
17 * Rights Reserved.
18 *
19 * Contributor(s): pschwartau@netscape.com
20 * Date: 16 May 2001
21 *
22 * SUMMARY: Regression test for bug 76054
23 *
24 * See http://bugzilla.mozilla.org/show_bug.cgi?id=76054
25 * See http://bugzilla.mozilla.org/show_bug.cgi?id=78706
26 * All String HTML methods should be LOWER case -
27 */
28 //-------------------------------------------------------------------------------------------------
29 var UBound = 0;
30 var bug = 76054;
31 var summary = 'Testing that String HTML methods produce all lower-case';
32 var statprefix = 'Currently testing String.';
33 var status = '';
34 var statusitems = [ ];
35 var actual = '';
36 var actualvalues = [ ];
37 var expect= '';
38 var expectedvalues = [ ];
39 var s = 'xyz';
40
41 status = 'anchor()';
42 actual = s.anchor();
43 expect = actual.toLowerCase();
44 addThis();
45
46 status = 'big()';
47 actual = s.big();
48 expect = actual.toLowerCase();
49 addThis();
50
51 status = 'blink()';
52 actual = s.blink();
53 expect = actual.toLowerCase();
54 addThis();
55
56 status = 'bold()';
57 actual = s.bold();
58 expect = actual.toLowerCase();
59 addThis();
60
61 status = 'italics()';
62 actual = s.italics();
63 expect = actual.toLowerCase();
64 addThis();
65
66 status = 'fixed()';
67 actual = s.fixed();
68 expect = actual.toLowerCase();
69 addThis();
70
71 status = 'fontcolor()';
72 actual = s.fontcolor();
73 expect = actual.toLowerCase();
74 addThis();
75
76 status = 'fontsize()';
77 actual = s.fontsize();
78 expect = actual.toLowerCase();
79 addThis();
80
81 status = 'link()';
82 actual = s.link();
83 expect = actual.toLowerCase();
84 addThis();
85
86 status = 'small()';
87 actual = s.small();
88 expect = actual.toLowerCase();
89 addThis();
90
91 status = 'strike()';
92 actual = s.strike();
93 expect = actual.toLowerCase();
94 addThis();
95
96 status = 'sub()';
97 actual = s.sub();
98 expect = actual.toLowerCase();
99 addThis();
100
101 status = 'sup()';
102 actual = s.sup();
103 expect = actual.toLowerCase();
104 addThis();
105
106
107 //-------------------------------------------------------------------------------------------------
108 test();
109 //-------------------------------------------------------------------------------------------------
110
111
112 function addThis()
113 {
114 statusitems[UBound] = status;
115 actualvalues[UBound] = actual;
116 expectedvalues[UBound] = expect;
117 UBound++;
118 }
119
120
121 function test()
122 {
123 enterFunc ('test');
124 printBugNumber (bug);
125 printStatus (summary);
126
127 for (var i = 0; i < UBound; i++)
128 {
129 reportCompare(expectedvalues[i], actualvalues[i], getStatus(i));
130 }
131
132 exitFunc ('test');
133 }
134
135
136 function getStatus(i)
137 {
138 return statprefix + statusitems[i];
139 }