2150 |
mathias |
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
|
|
2 |
"http://www.w3.org/TR/html4/strict.dtd">
|
|
|
3 |
<html>
|
|
|
4 |
<head>
|
|
|
5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
6 |
<title>Test TextBox</title>
|
|
|
7 |
|
|
|
8 |
<script type="text/javascript" src="../../../dojo/dojo.js"
|
|
|
9 |
djConfig="isDebug: true"></script>
|
|
|
10 |
<script type="text/javascript" src="../../../dojo/currency.js"></script>
|
|
|
11 |
<script type="text/javascript" src="../../../dojo/number.js"></script>
|
|
|
12 |
<script type="text/javascript">
|
|
|
13 |
dojo.require("dijit.form.NumberTextBox");
|
|
|
14 |
dojo.require("dijit.form.CurrencyTextBox");
|
|
|
15 |
dojo.require("dijit.form.DateTextBox");
|
|
|
16 |
dojo.require("dijit.form.ValidationTextBox");
|
|
|
17 |
dojo.require("dojo.date.locale");
|
|
|
18 |
dojo.require("dojo.date.stamp");
|
|
|
19 |
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
|
|
|
20 |
dojo.require("doh.runner");
|
|
|
21 |
</script>
|
|
|
22 |
<script src="test_i18n.js"></script>
|
|
|
23 |
<script type="text/javascript">
|
|
|
24 |
dojo.addOnLoad(function(){
|
|
|
25 |
doh.register("t", getAllTestCases());
|
|
|
26 |
doh.run();
|
|
|
27 |
});
|
|
|
28 |
</script>
|
|
|
29 |
|
|
|
30 |
<style type="text/css">
|
|
|
31 |
@import "../../../dojo/resources/dojo.css";
|
|
|
32 |
@import "../../themes/tundra/tundra.css";
|
|
|
33 |
@import "../css/dijitTests.css";
|
|
|
34 |
|
|
|
35 |
.title {
|
|
|
36 |
background-color:#ddd;
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
.hint {
|
|
|
40 |
background-color:#eee;
|
|
|
41 |
}
|
|
|
42 |
|
|
|
43 |
.testExample {
|
|
|
44 |
background-color:#fbfbfb;
|
|
|
45 |
padding:1em;
|
|
|
46 |
margin-bottom:1em;
|
|
|
47 |
border:1px solid #bfbfbf;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
.dojoTitlePaneLabel label {
|
|
|
51 |
font-weight:bold;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
td {white-space:nowrap}
|
|
|
55 |
</style>
|
|
|
56 |
</head>
|
|
|
57 |
|
|
|
58 |
<body class="tundra">
|
|
|
59 |
<h1 class="testTitle">Dijit TextBox Globalization Test</h1>
|
|
|
60 |
|
|
|
61 |
<!-- <h2 class="testTitle">Press the following button to start all test after this page is loaded.</h2>
|
|
|
62 |
<button id="startButton" onclick="startTest()">Start Test</button>-->
|
|
|
63 |
|
|
|
64 |
<script>
|
|
|
65 |
(function() {
|
|
|
66 |
genFormatTestCases("Natural Language Casing Mapping", "dijit.form.TextBox", [
|
|
|
67 |
|
|
|
68 |
{ attrs: {uppercase: "true"},
|
|
|
69 |
desc: "Upper casing: Basic Latin",
|
|
|
70 |
value: "abcdefghijklmnopqrstuvwxyz",
|
|
|
71 |
expValue: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
|
72 |
comment: ""
|
|
|
73 |
},
|
|
|
74 |
|
|
|
75 |
{ attrs: {uppercase: "true"},
|
|
|
76 |
desc: "Upper casing: Latin with accents",
|
|
|
77 |
value: "àáâãäåæçèéêëìíîïðñòóôõö",
|
|
|
78 |
expValue: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ",
|
|
|
79 |
comment: ""
|
|
|
80 |
},
|
|
|
81 |
|
|
|
82 |
{ attrs: {uppercase: "true"},
|
|
|
83 |
desc: "Upper casing: Turkish",
|
|
|
84 |
value: "ıi",
|
|
|
85 |
expValue: "Iİ",
|
|
|
86 |
comment: "<a href='#cmt_1'>See #1.</a>"
|
|
|
87 |
},
|
|
|
88 |
|
|
|
89 |
{ attrs: {uppercase: "true"},
|
|
|
90 |
desc: "Upper casing: Russian",
|
|
|
91 |
value: "абвгдежз",
|
|
|
92 |
expValue: "АБВГДЕЖЗ",
|
|
|
93 |
comment: ""
|
|
|
94 |
},
|
|
|
95 |
|
|
|
96 |
{ attrs: {uppercase: "true"},
|
|
|
97 |
desc: "Upper casing: German",
|
|
|
98 |
value: "ß",
|
|
|
99 |
expValue: "SS",
|
|
|
100 |
comment: "<a href='#cmt_1'>See #1.</a>"
|
|
|
101 |
},
|
|
|
102 |
|
|
|
103 |
{ attrs: {lowercase: "true"},
|
|
|
104 |
desc: "Lower casing: Turkish",
|
|
|
105 |
value: "Iİ",
|
|
|
106 |
expValue: "ıi",
|
|
|
107 |
comment: "<a href='#cmt_1'>See #1.</a>"
|
|
|
108 |
},
|
|
|
109 |
|
|
|
110 |
{ attrs: {propercase: "true"},
|
|
|
111 |
desc: "Title/Proper casing: Latin",
|
|
|
112 |
value: "\u01F1abc",
|
|
|
113 |
expValue: "\u01F2abc",
|
|
|
114 |
comment: "<a href='#cmt_1'>See #1.</a>"
|
|
|
115 |
}
|
|
|
116 |
]);
|
|
|
117 |
|
|
|
118 |
genFormatTestCases("White-space Detecting", "dijit.form.TextBox", [
|
|
|
119 |
|
|
|
120 |
{ attrs: {trim: "true"},
|
|
|
121 |
desc: "Normal space & tab",
|
|
|
122 |
value: " abc\t\t\t",
|
|
|
123 |
expValue: "abc",
|
|
|
124 |
comment: ""
|
|
|
125 |
},
|
|
|
126 |
|
|
|
127 |
{ attrs: {trim: "true"},
|
|
|
128 |
desc: "NO-BREAK SPACE",
|
|
|
129 |
value: "\u00A0abc\u00A0",
|
|
|
130 |
expValue: "abc",
|
|
|
131 |
comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
|
|
|
132 |
},
|
|
|
133 |
|
|
|
134 |
{ attrs: {trim: "true"},
|
|
|
135 |
desc: "EN QUAD",
|
|
|
136 |
value: "\u2000abc\u2000",
|
|
|
137 |
expValue: "abc",
|
|
|
138 |
comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
|
|
|
139 |
},
|
|
|
140 |
|
|
|
141 |
{ attrs: {trim: "true"},
|
|
|
142 |
desc: "IDEOGRAPHIC SPACE",
|
|
|
143 |
value: "\u3000abc\u3000",
|
|
|
144 |
expValue: "abc",
|
|
|
145 |
comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
|
|
|
146 |
}
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
]);
|
|
|
150 |
|
|
|
151 |
dojo.parser.parse();
|
|
|
152 |
|
|
|
153 |
})();
|
|
|
154 |
</script>
|
|
|
155 |
|
|
|
156 |
<h2 class="testTitle">Issues & Comments </h2>
|
|
|
157 |
<a name="cmt_1"><h3 class="testTitle">Issue #1 <sup style="color:red">Not fixed. Avoid using this function of TextBox.</sup></h3></a>
|
|
|
158 |
<p>
|
|
|
159 |
Strictly speaking, all casing manipulation must use ICU case mapping rules (routine). However, the default JavaScript routines used by Dojo
|
|
|
160 |
do not support ICU case mapping rules in all browsers.
|
|
|
161 |
</p>
|
|
|
162 |
|
|
|
163 |
<a name="cmt_2"><h3 class="testTitle">Issue #2 <sup style="color:red">Not fixed. Avoid using this function of TextBox.</sup></h3></a>
|
|
|
164 |
<p>
|
|
|
165 |
Trimming must get rid of all Unicode characters with the white space property. However, the default JavaScript routines used by Dojo
|
|
|
166 |
do not support get character properties in some browsers like IE. Other browsers like Firefox might support trimming more white space
|
|
|
167 |
characters.
|
|
|
168 |
</p>
|
|
|
169 |
|
|
|
170 |
</body>
|
|
|
171 |
</html>
|
|
|
172 |
|
|
|
173 |
|