From 8f6a50843a2d521fe1203400b432ea8ceacfdddb Mon Sep 17 00:00:00 2001 From: Norbert Lindenberg Date: Tue, 9 Oct 2012 22:19:30 -0700 Subject: [PATCH] Bug 693: Remove "kk"/normalization property from Collator --- test/suite/intl402/ch10/10.1/10.1.1_10.js | 2 +- test/suite/intl402/ch10/10.1/10.1.1_13.js | 3 +-- test/suite/intl402/ch10/10.1/10.1.1_19_c.js | 3 +-- test/suite/intl402/ch10/10.2/10.2.3_b.js | 13 +++++++++---- test/suite/intl402/ch10/10.3/10.3.3.js | 1 - 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/test/suite/intl402/ch10/10.1/10.1.1_10.js b/test/suite/intl402/ch10/10.1/10.1.1_10.js index dd4981264e..5c6b657b59 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_10.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_10.js @@ -9,7 +9,7 @@ $INCLUDE("testIntl.js"); -taintProperties(["localeMatcher", "kn", "kk", "kf"]); +taintProperties(["localeMatcher", "kn", "kf"]); var locale = new Intl.Collator(undefined, {localeMatcher: "lookup"}).resolvedOptions().locale; if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { diff --git a/test/suite/intl402/ch10/10.1/10.1.1_13.js b/test/suite/intl402/ch10/10.1/10.1.1_13.js index b0f1bbc8ed..4129eebd2e 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_13.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_13.js @@ -2,13 +2,12 @@ // This code is governed by the BSD license found in the LICENSE file. /** - * @description Tests that the options numeric, normalization, and caseFirst are processed correctly. + * @description Tests that the options numeric and caseFirst are processed correctly. * @author Norbert Lindenberg */ $INCLUDE("testIntl.js"); testOption(Intl.Collator, "numeric", "boolean", undefined, undefined, {isOptional: true}); -testOption(Intl.Collator, "normalization", "boolean", undefined, undefined, {isOptional: true}); testOption(Intl.Collator, "caseFirst", "string", ["upper", "lower", "false"], undefined, {isOptional: true}); diff --git a/test/suite/intl402/ch10/10.1/10.1.1_19_c.js b/test/suite/intl402/ch10/10.1/10.1.1_19_c.js index 577ef56006..4ad76d45bf 100644 --- a/test/suite/intl402/ch10/10.1/10.1.1_19_c.js +++ b/test/suite/intl402/ch10/10.1/10.1.1_19_c.js @@ -2,7 +2,7 @@ // This code is governed by the BSD license found in the LICENSE file. /** - * @description Tests that the options numeric, normalization, and caseFirst can be + * @description Tests that the options numeric and caseFirst can be * set through either the locale or the options. * @author Norbert Lindenberg */ @@ -11,7 +11,6 @@ $INCLUDE("testIntl.js"); var options = [ {key: "kn", property: "numeric", type: "boolean", values: [true, false]}, - {key: "kk", property: "normalization", type: "boolean", values: [true, false]}, {key: "kf", property: "caseFirst", type: "string", values: ["upper", "lower", "false"]} ]; diff --git a/test/suite/intl402/ch10/10.2/10.2.3_b.js b/test/suite/intl402/ch10/10.2/10.2.3_b.js index 7e727d4379..aef1e746a1 100644 --- a/test/suite/intl402/ch10/10.2/10.2.3_b.js +++ b/test/suite/intl402/ch10/10.2/10.2.3_b.js @@ -9,12 +9,18 @@ $INCLUDE("testIntl.js"); +var testArray = [ + "hello", "你好", "こんにちは", + "pêche", "peché", "1", "9", "10", + "ụ\u031B", "u\u031B\u0323", "ư\u0323", "u\u0323\u031B", + "Å", "Å", "A\u030A" +]; + var defaultCollator = new Intl.Collator(); var defaultOptions = defaultCollator.resolvedOptions(); var defaultOptionsJSON = JSON.stringify(defaultOptions); var defaultLocale = defaultOptions.locale; -var defaultSortedArray = ["hello", "你好", "こんにちは", "pêche", "peché", "9", "10"].sort(defaultCollator.compare); - +var defaultSortedArray = testArray.slice(0).sort(defaultCollator.compare); var keyValues = { "co": ["standard", "search", "invalid"], @@ -22,13 +28,12 @@ var keyValues = { "kb": ["true", "false", "invalid"], "kc": ["true", "false", "invalid"], "kh": ["true", "false", "invalid"], + "kk": ["true", "false", "invalid"], "kr": ["latn-hira-hani", "hani-hira-latn", "invalid"], "ks": ["level1", "level2", "level3", "level4", "identic", "invalid"], "vt": ["1234-5678-9abc-edf0", "invalid"] }; -var testArray = defaultSortedArray.slice(0); - Object.getOwnPropertyNames(keyValues).forEach(function (key) { keyValues[key].forEach(function (value) { var collator = new Intl.Collator([defaultLocale + "-u-" + key + "-" + value]); diff --git a/test/suite/intl402/ch10/10.3/10.3.3.js b/test/suite/intl402/ch10/10.3/10.3.3.js index 56c294491e..bc6b4fabb9 100644 --- a/test/suite/intl402/ch10/10.3/10.3.3.js +++ b/test/suite/intl402/ch10/10.3/10.3.3.js @@ -43,6 +43,5 @@ mustHaveProperty(actual, "sensitivity", ["variant"]); mustHaveProperty(actual, "ignorePunctuation", [false]); mustHaveProperty(actual, "collation", collations); mayHaveProperty(actual, "numeric", [true, false]); -mayHaveProperty(actual, "normalization", [true, false]); mayHaveProperty(actual, "caseFirst", ["upper", "lower", "false"]);