Move test to a separate group and suppress on Dartium

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org//893653002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43343 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
alanknight@google.com 2015-01-30 19:06:18 +00:00
parent a7083c8040
commit b59c1f55c9
2 changed files with 31 additions and 27 deletions

View file

@ -43,6 +43,8 @@ canvasrenderingcontext2d_test/drawImage_video_element_dataUrl: Pass,Fail # Issue
[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
# postMessage in dartium always transfers the typed array buffer, never a view
postmessage_structured_test/typed_arrays: Fail
# Dartium seems to lose the data from the dispatchEvent.
postmessage_structured_test/more_primitives: Fail
async_test: Fail # Background timers not implemented.
keyboard_event_test: Fail # Issue 13902
isolates_test: Fail # Issue 13921

View file

@ -78,33 +78,6 @@ main() {
injectSource(JS_CODE);
});
test('js-to-dart--null-prototype-eventdata', () {
// Pass an object with a null prototype from JavaScript.
// It should be seen as a Dart Map.
final JS_CODE = """
// Call anonymous function to create a local scope.
(function() {
var o = Object.create(null);
o.eggs = 3;
var foo = new MessageEvent('stuff', {data: o});
window.dispatchEvent(foo);
})();
""";
var completed = false;
var subscription = null;
subscription = window.on['stuff'].listen(expectAsyncUntil(
(MessageEvent e) {
var data = e.data;
if (data is String) return; // Messages from unit test protocol.
completed = true;
subscription.cancel();
expect(data, isMap);
expect(data['eggs'], equals(3));
},
() => completed));
injectSource(JS_CODE);
});
test('dart-to-js-to-dart-postmessage', () {
// Pass dictionaries between Dart and JavaScript.
@ -163,6 +136,35 @@ main() {
go('cyclic_list', cyclic_list);
});
group('more_primitives', () {
test('js-to-dart-null-prototype-eventdata', () {
// Pass an object with a null prototype from JavaScript.
// It should be seen as a Dart Map.
final JS_CODE = """
// Call anonymous function to create a local scope.
(function() {
var o = Object.create(null);
o.eggs = 3;
var foo = new MessageEvent('stuff', {data: o});
window.dispatchEvent(foo);
})();
""";
var completed = false;
var subscription = null;
subscription = window.on['stuff'].listen(expectAsyncUntil(
(MessageEvent e) {
var data = e.data;
if (data is String) return; // Messages from unit test protocol.
completed = true;
subscription.cancel();
expect(data, isMap);
expect(data['eggs'], equals(3));
},
() => completed));
injectSource(JS_CODE);
});
});
group('typed_arrays', () {
var array_buffer = new Uint8List(16).buffer;
var view_a = new Float32List.view(array_buffer, 0, 4);