summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-12-21 12:08:11 -0800
committerRick Waldron <waldron.rick@gmail.com>2017-12-21 16:46:55 -0500
commit017fa6d55ff27fa108d622b1f00e5b07ac479e15 (patch)
treec78e4d06ac6d2a110b3b1786bd4d0b7a814f570e /harness
parent123259733b25badb7c19f37e35ce472eb5e20e16 (diff)
downloadqtdeclarative-testsuites-017fa6d55ff27fa108d622b1f00e5b07ac479e15.tar.gz
Remove caching of getLocaleSupportInfo() return value
Diffstat (limited to 'harness')
-rw-r--r--harness/testIntl.js30
1 files changed, 1 insertions, 29 deletions
diff --git a/harness/testIntl.js b/harness/testIntl.js
index 8b9d29688..eb63b23ac 100644
--- a/harness/testIntl.js
+++ b/harness/testIntl.js
@@ -34,26 +34,6 @@ function testWithIntlConstructors(f) {
/**
- * Returns the name of the given constructor object, which must be one of
- * Intl.Collator, Intl.NumberFormat, or Intl.DateTimeFormat.
- * @param {object} Constructor a constructor
- * @return {string} the name of the constructor
- */
-function getConstructorName(Constructor) {
- switch (Constructor) {
- case Intl.Collator:
- return "Collator";
- case Intl.NumberFormat:
- return "NumberFormat";
- case Intl.DateTimeFormat:
- return "DateTimeFormat";
- default:
- $ERROR("test internal error: unknown Constructor");
- }
-}
-
-
-/**
* Taints a named data property of the given object by installing
* a setter that throws an exception.
* @param {object} obj the object whose data property to taint
@@ -121,7 +101,6 @@ function taintArray() {
var languages = ["zh", "es", "en", "hi", "ur", "ar", "ja", "pa"];
var scripts = ["Latn", "Hans", "Deva", "Arab", "Jpan", "Hant"];
var countries = ["CN", "IN", "US", "PK", "JP", "TW", "HK", "SG"];
-var localeSupportInfo = {};
/**
@@ -134,11 +113,6 @@ var localeSupportInfo = {};
* unsupported: array of unsupported language tags
*/
function getLocaleSupportInfo(Constructor) {
- var constructorName = getConstructorName(Constructor);
- if (localeSupportInfo[constructorName] !== undefined) {
- return localeSupportInfo[constructorName];
- }
-
var allTags = [];
var i, j, k;
var language, script, country;
@@ -174,13 +148,11 @@ function getLocaleSupportInfo(Constructor) {
}
}
- localeSupportInfo[constructorName] = {
+ return {
supported: supported,
byFallback: byFallback,
unsupported: unsupported
};
-
- return localeSupportInfo[constructorName];
}