web_extension_test.dart 730 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
// Copyright 2014 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.

@Tags(<String>['web'])
import 'dart:js' as js;

import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';

void main() {
  IntegrationTestWidgetsFlutterBinding();

  test('IntegrationTestWidgetsFlutterBinding on the web should register certain global properties', () {
    expect(js.context.hasProperty(r'$flutterDriver'), true);
    expect(js.context[r'$flutterDriver'], isNotNull);

    expect(js.context.hasProperty(r'$flutterDriverResult'), true);
    expect(js.context[r'$flutterDriverResult'], isNull);
  });
}