flutter_flutter/testing/dart/window_test.dart
Dan Field 6179ac6377
fix up analysis for Dart in Engine (#7404)
* fix up analysis for Dart in Engine, particularly for tests
2019-01-11 13:50:58 -08:00

23 lines
670 B
Dart

// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
import 'dart:typed_data';
import 'dart:ui';
import 'package:test/test.dart';
void main() {
test('window.sendPlatformMessage preserves callback zone', () {
runZoned(() {
final Zone innerZone = Zone.current;
window.sendPlatformMessage('test', new ByteData.view(new Uint8List(0).buffer), expectAsync1((ByteData data) {
final Zone runZone = Zone.current;
expect(runZone, isNotNull);
expect(runZone, same(innerZone));
}));
});
});
}