Chromium Code Reviews| 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]; |
| + } |
| } |
| }); |