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

Unified Diff: test/intl/break-iterator/default-locale.js

Issue 148883002: Synchronize with r15594. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/intl/assert.js ('k') | test/intl/break-iterator/en-break.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/break-iterator/default-locale.js
diff --git a/src/extensions/i18n/i18n-extension.h b/test/intl/break-iterator/default-locale.js
similarity index 69%
copy from src/extensions/i18n/i18n-extension.h
copy to test/intl/break-iterator/default-locale.js
index 050c336a67a21fd6cb32892e14215cac11971111..39a88574fe19efabf017fbad4d4597430bf70811 100644
--- a/src/extensions/i18n/i18n-extension.h
+++ b/test/intl/break-iterator/default-locale.js
@@ -24,28 +24,25 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// 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_
+// Constructing BreakIterator with no locale arguments or with []
+// creates one with default locale.
-#include "v8.h"
+var iterator = new Intl.v8BreakIterator([]);
-namespace v8_i18n {
+var options = iterator.resolvedOptions();
-class Extension : public v8::Extension {
- public:
- Extension();
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
- v8::Handle<v8::String> name);
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
- static void Register();
+var iteratorNone = new Intl.v8BreakIterator();
+assertEquals(options.locale, iteratorNone.resolvedOptions().locale);
- private:
- static Extension* extension_;
-};
-
-} // namespace v8_i18n
-
-#endif // V8_EXTENSIONS_I18N_I18N_EXTENSION_H_
+// TODO(cira): remove support for {} to mean empty list.
+var iteratorBraket = new Intl.v8BreakIterator({});
+assertEquals(options.locale, iteratorBraket.resolvedOptions().locale);
« no previous file with comments | « test/intl/assert.js ('k') | test/intl/break-iterator/en-break.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698