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

Unified Diff: test/intl/number-format/format-is-bound.js

Issue 18687003: Import intl test suite from v8-i18n project (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
Index: test/intl/number-format/format-is-bound.js
diff --git a/src/extensions/i18n/header.js b/test/intl/number-format/format-is-bound.js
similarity index 82%
copy from src/extensions/i18n/header.js
copy to test/intl/number-format/format-is-bound.js
index 1c0a2d8874b5aa982ca2be2fb39f2ead1c4a9622..5e4f02010f87e0b112238416a8b61d6c70869e84 100644
--- a/src/extensions/i18n/header.js
+++ b/test/intl/number-format/format-is-bound.js
@@ -26,16 +26,15 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// limitations under the License.
-// ECMAScript 402 API implementation is broken into separate files for
-// each service. The build system combines them together into one
-// Intl namespace.
+// Create default NumberFormat.
+var nf = new Intl.NumberFormat();
-/**
- * Intl object is a single object that has some named properties,
- * all of which are constructors.
- */
-var Intl = (function() {
+// Array we want to iterate, actual numbers are not important.
+var numberArray = [1, 2, 3];
-'use strict';
+// It shouldn't throw.
+// The format() method should be properly bound to the nf object.
+numberArray.forEach(nf.format);
-var Intl = {};
+// Formatting a number should work in a direct call.
+nf.format(12345);

Powered by Google App Engine
This is Rietveld 408576698