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

Unified Diff: test/intl/number-format/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/number-format/check-digit-ranges.js ('k') | test/intl/number-format/format-is-bound.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/number-format/default-locale.js
diff --git a/test/mjsunit/regress/regress-2593.js b/test/intl/number-format/default-locale.js
similarity index 76%
copy from test/mjsunit/regress/regress-2593.js
copy to test/intl/number-format/default-locale.js
index b51b41c27e65d8f6344f3cc22f9fec2c5a99b92d..0d5e24dd70628e86385af4b9b50fad1bab332d69 100644
--- a/test/mjsunit/regress/regress-2593.js
+++ b/test/intl/number-format/default-locale.js
@@ -25,37 +25,20 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --expose_gc
+// Constructing NumberFormat with no locale arguments or with []
+// creates one with default locale.
-p1 = { };
-p2 = { };
-p3 = { x : 1 };
-p2.__proto__ = p3
-p1.__proto__ = p2
+var nf = new Intl.NumberFormat([]);
-// Normalize p1.
-p1.z = 1
-delete p1.z
+var options = nf.resolvedOptions();
-// Make sure all objects are in old space.
-for (var i = 0; i < 10; i++) gc();
+// Check it's none of these first.
+assertFalse(options.locale === 'und');
+assertFalse(options.locale === '');
+assertFalse(options.locale === undefined);
-function f2() {
- p2.x;
-}
+// Then check for equality.
+assertEquals(options.locale, getDefaultLocale());
-function f1() {
- return p1.x;
-}
-
-// Create load stub in p2.
-for (var i = 0; i < 10; i++) f2();
-
-// Create load stub in p2 for p1.
-for (var i = 0; i < 10; i++) f1();
-
-assertEquals(1, f1());
-
-p2.x = 2;
-
-assertEquals(2, f1());
+var nfNone = new Intl.NumberFormat();
+assertEquals(options.locale, nfNone.resolvedOptions().locale);
« no previous file with comments | « test/intl/number-format/check-digit-ranges.js ('k') | test/intl/number-format/format-is-bound.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698