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

Unified Diff: tests/html/js_test.dart

Issue 19235003: Fix dart:js test for IE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/js_test.dart
diff --git a/tests/html/js_test.dart b/tests/html/js_test.dart
index 0f617b3f1a42f586b92eb4d205856981034e2df5..ff6753d3690d04720c6db871d34689f8e88bcde0 100644
--- a/tests/html/js_test.dart
+++ b/tests/html/js_test.dart
@@ -91,7 +91,7 @@ function getElementAttribute(element, attr) {
function addClassAttributes(list) {
var result = "";
- for (var i=0; i<list.length; i++) {
+ for (var i=0; i < list.length; i++) {
vsm 2013/07/15 22:42:21 The lack of spacing seems to break IE for some rea
result += list[i].getAttribute("class");
}
return result;
@@ -200,11 +200,11 @@ main() {
expect(a.callMethod('getTime'), equals(12345678));
});
- test('js instantiation : new Date("December 17, 1995 03:24:00 GMT+01:00")',
+ test('js instantiation : new Date("December 17, 1995 03:24:00 GMT")',
vsm 2013/07/15 22:42:21 IE9 doesn't understand the +01:00 syntax. This is
() {
final a = new JsObject(context['Date'],
- ["December 17, 1995 03:24:00 GMT+01:00"]);
- expect(a.callMethod('getTime'), equals(819167040000));
+ ["December 17, 1995 03:24:00 GMT"]);
+ expect(a.callMethod('getTime'), equals(819170640000));
});
test('js instantiation : new Date(1995,11,17)', () {
@@ -256,11 +256,13 @@ main() {
});
test('js instantiation : typed array', () {
- final codeUnits = "test".codeUnits;
- final buf = new JsObject(context['ArrayBuffer'], [codeUnits.length]);
- final bufView = new JsObject(context['Uint8Array'], [buf]);
- for (var i = 0; i < codeUnits.length; i++) {
- bufView[i] = codeUnits[i];
+ if (Platform.supportsTypedData) {
vsm 2013/07/15 22:42:21 No typed arrays on IE9 - this skips it.
+ final codeUnits = "test".codeUnits;
+ final buf = new JsObject(context['ArrayBuffer'], [codeUnits.length]);
+ final bufView = new JsObject(context['Uint8Array'], [buf]);
+ for (var i = 0; i < codeUnits.length; i++) {
+ bufView[i] = codeUnits[i];
+ }
}
});
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698