Index: test/intl/general/supported-locales-of.js |
diff --git a/src/extensions/i18n/i18n-extension.h b/test/intl/general/supported-locales-of.js |
similarity index 75% |
copy from src/extensions/i18n/i18n-extension.h |
copy to test/intl/general/supported-locales-of.js |
index 050c336a67a21fd6cb32892e14215cac11971111..ed3d633eda5474ba7483357d0c3babf785733748 100644 |
--- a/src/extensions/i18n/i18n-extension.h |
+++ b/test/intl/general/supported-locales-of.js |
@@ -26,26 +26,19 @@ |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// limitations under the License. |
-#ifndef V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |
-#define V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |
+// Tests supportedLocalesOf method. |
-#include "v8.h" |
+var undef = Intl.DateTimeFormat.supportedLocalesOf(); |
+assertEquals(undefined, undef[0]); |
-namespace v8_i18n { |
+var empty = Intl.DateTimeFormat.supportedLocalesOf([]); |
+assertEquals(undefined, empty[0]); |
-class Extension : public v8::Extension { |
- public: |
- Extension(); |
+var strLocale = Intl.DateTimeFormat.supportedLocalesOf('sr'); |
+assertEquals('sr', strLocale[0]); |
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
- v8::Handle<v8::String> name); |
- |
- static void Register(); |
- |
- private: |
- static Extension* extension_; |
-}; |
- |
-} // namespace v8_i18n |
- |
-#endif // V8_EXTENSIONS_I18N_I18N_EXTENSION_H_ |
+var multiLocale = |
+ Intl.DateTimeFormat.supportedLocalesOf(['sr-Thai-RS', 'de', 'zh-CN']); |
+assertEquals('sr-Thai-RS', multiLocale[0]); |
+assertEquals('de', multiLocale[1]); |
+assertEquals('zh-CN', multiLocale[2]); |