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

Unified Diff: test/intl/date-format/timezone-name.js

Issue 26918002: Original review https://codereview.chromium.org/25855005. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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/date-format/parse-mdyhms.js ('k') | test/intl/date-format/utils.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/intl/date-format/timezone-name.js
diff --git a/src/hydrogen-bch.h b/test/intl/date-format/timezone-name.js
similarity index 67%
copy from src/hydrogen-bch.h
copy to test/intl/date-format/timezone-name.js
index a22dacdd4229748e2735b3c0d8519c927b2f617d..2ed5c1acaeeb2836b249dec903c6ac67fdb500d6 100644
--- a/src/hydrogen-bch.h
+++ b/test/intl/date-format/timezone-name.js
@@ -25,31 +25,29 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef V8_HYDROGEN_BCH_H_
-#define V8_HYDROGEN_BCH_H_
+// Tests time zone names.
-#include "hydrogen.h"
+// Winter date (PST).
+var winter = new Date(2013, 1, 12, 14, 42, 53, 0);
-namespace v8 {
-namespace internal {
+// Summer date (PDT).
+var summer = new Date(2013, 7, 12, 14, 42, 53, 0);
-
-class HBoundsCheckHoistingPhase : public HPhase {
- public:
- explicit HBoundsCheckHoistingPhase(HGraph* graph)
- : HPhase("H_Bounds checks hoisting", graph) { }
-
- void Run() {
- HoistRedundantBoundsChecks();
- }
-
- private:
- void HoistRedundantBoundsChecks();
-
- DISALLOW_COPY_AND_ASSIGN(HBoundsCheckHoistingPhase);
+// Common flags for both formatters.
+var flags = {
+ year: 'numeric', month: 'long', day: 'numeric',
+ hour : '2-digit', minute : '2-digit', second : '2-digit',
+ timeZone: 'America/Los_Angeles'
};
+flags.timeZoneName = "short";
+var dfs = new Intl.DateTimeFormat('en-US', flags);
+
+assertTrue(dfs.format(winter).indexOf('PST') !== -1);
+assertTrue(dfs.format(summer).indexOf('PDT') !== -1);
-} } // namespace v8::internal
+flags.timeZoneName = "long";
+var dfl = new Intl.DateTimeFormat('en-US', flags);
-#endif // V8_HYDROGEN_BCE_H_
+assertTrue(dfl.format(winter).indexOf('Pacific Standard Time') !== -1);
+assertTrue(dfl.format(summer).indexOf('Pacific Daylight Time') !== -1);
« no previous file with comments | « test/intl/date-format/parse-mdyhms.js ('k') | test/intl/date-format/utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698