Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: test/intl/collator/default-locale.js

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 20 matching lines...) Expand all
31 var collator = new Intl.Collator([]); 31 var collator = new Intl.Collator([]);
32 32
33 var options = collator.resolvedOptions(); 33 var options = collator.resolvedOptions();
34 34
35 // Check it's none of these first. 35 // Check it's none of these first.
36 assertFalse(options.locale === 'und'); 36 assertFalse(options.locale === 'und');
37 assertFalse(options.locale === ''); 37 assertFalse(options.locale === '');
38 assertFalse(options.locale === undefined); 38 assertFalse(options.locale === undefined);
39 39
40 // Then check for equality. 40 // Then check for equality.
41 assertEquals(options.locale, %GetDefaultICULocale()); 41 assertEquals(options.locale, getDefaultLocale());
42 42
43 var collatorNone = new Intl.Collator(); 43 var collatorNone = new Intl.Collator();
44 assertEquals(options.locale, collatorNone.resolvedOptions().locale); 44 assertEquals(options.locale, collatorNone.resolvedOptions().locale);
45 45
46 // TODO(cira): remove support for {} to mean empty list. 46 // TODO(cira): remove support for {} to mean empty list.
47 var collatorBraket = new Intl.Collator({}); 47 var collatorBraket = new Intl.Collator({});
48 assertEquals(options.locale, collatorBraket.resolvedOptions().locale); 48 assertEquals(options.locale, collatorBraket.resolvedOptions().locale);
49 49
50 var collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'}); 50 var collatorWithOptions = new Intl.Collator(undefined, {usage: 'search'});
51 assertEquals(%GetDefaultICULocale() + '-u-co-search', 51 assertEquals(getDefaultLocale() + '-u-co-search',
52 collatorWithOptions.resolvedOptions().locale); 52 collatorWithOptions.resolvedOptions().locale);
OLDNEW
« no previous file with comments | « test/intl/break-iterator/wellformed-unsupported-locale.js ('k') | test/intl/collator/wellformed-unsupported-locale.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698