1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6 <title>Test TextBox</title>
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");
22 <script src="test_i18n.js"></script>
23 <script type="text/javascript">
24 dojo.addOnLoad(function(){
25 doh.register("t", getAllTestCases());
30 <style type="text/css">
31 @import "../../../dojo/resources/dojo.css";
32 @import "../../themes/tundra/tundra.css";
33 @import "../css/dijitTests.css";
36 background-color:#ddd;
40 background-color:#eee;
44 background-color:#fbfbfb;
47 border:1px solid #bfbfbf;
50 .dojoTitlePaneLabel label {
54 td {white-space:nowrap}
59 <h1 class="testTitle">Dijit TextBox Globalization Test</h1>
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>-->
66 genFormatTestCases("Natural Language Casing Mapping", "dijit.form.TextBox", [
68 { attrs: {uppercase: "true"},
69 desc: "Upper casing: Basic Latin",
70 value: "abcdefghijklmnopqrstuvwxyz",
71 expValue: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
75 { attrs: {uppercase: "true"},
76 desc: "Upper casing: Latin with accents",
77 value: "àáâãäåæçèéêëìíîïðñòóôõö",
78 expValue: "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ",
82 { attrs: {uppercase: "true"},
83 desc: "Upper casing: Turkish",
86 comment: "<a href='#cmt_1'>See #1.</a>"
89 { attrs: {uppercase: "true"},
90 desc: "Upper casing: Russian",
96 { attrs: {uppercase: "true"},
97 desc: "Upper casing: German",
100 comment: "<a href='#cmt_1'>See #1.</a>"
103 { attrs: {lowercase: "true"},
104 desc: "Lower casing: Turkish",
107 comment: "<a href='#cmt_1'>See #1.</a>"
110 { attrs: {propercase: "true"},
111 desc: "Title/Proper casing: Latin",
113 expValue: "\u01F2abc",
114 comment: "<a href='#cmt_1'>See #1.</a>"
118 genFormatTestCases("White-space Detecting", "dijit.form.TextBox", [
120 { attrs: {trim: "true"},
121 desc: "Normal space & tab",
127 { attrs: {trim: "true"},
128 desc: "NO-BREAK SPACE",
129 value: "\u00A0abc\u00A0",
131 comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
134 { attrs: {trim: "true"},
136 value: "\u2000abc\u2000",
138 comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
141 { attrs: {trim: "true"},
142 desc: "IDEOGRAPHIC SPACE",
143 value: "\u3000abc\u3000",
145 comment: "Failed in IE. <a href='#cmt_2'>See #2.</a>"
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>
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.
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>
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