OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #library('TransferableTest'); |
| 6 #import('../../lib/unittest/unittest.dart'); |
| 7 #import('../../lib/unittest/html_config.dart'); |
| 8 #import('dart:html'); |
| 9 |
| 10 main() { |
| 11 useHtmlConfiguration(); |
| 12 |
| 13 asyncTest('TransferableTest', 1, () { |
| 14 window.on.message.add((messageEvent) { |
| 15 expect(messageEvent.data is ArrayBuffer).isTrue(); |
| 16 callbackDone(); |
| 17 }); |
| 18 final buffer = (new Float32Array(3)).buffer; |
| 19 window.webkitPostMessage(buffer, '*', [buffer]); |
| 20 }); |
| 21 } |
OLD | NEW |