diff --git a/packages/integration_test/lib/common.dart b/packages/integration_test/lib/common.dart index e5307f924e..e148851b38 100644 --- a/packages/integration_test/lib/common.dart +++ b/packages/integration_test/lib/common.dart @@ -285,9 +285,6 @@ class WebDriverCommand { /// /// Depending on the platform the communication between `integration_tests` and /// the `driver_tests` can be different. -/// -/// For the web implementation [WebCallbackManager]. -/// For the io implementation [IOCallbackManager]. abstract class CallbackManager { /// The callback function to response the driver side input. Future> callback( diff --git a/packages/integration_test/lib/integration_test.dart b/packages/integration_test/lib/integration_test.dart index 811f1c244e..244cfbd98e 100644 --- a/packages/integration_test/lib/integration_test.dart +++ b/packages/integration_test/lib/integration_test.dart @@ -14,10 +14,10 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:vm_service/vm_service.dart' as vm; -import '_callback_io.dart' if (dart.library.html) '_callback_web.dart' as driver_actions; -import '_extension_io.dart' if (dart.library.html) '_extension_web.dart'; import 'common.dart'; +import 'src/callback.dart' as driver_actions; import 'src/channel.dart'; +import 'src/extension.dart'; const String _success = 'success'; diff --git a/packages/integration_test/lib/_callback_io.dart b/packages/integration_test/lib/src/_callback_io.dart similarity index 95% rename from packages/integration_test/lib/_callback_io.dart rename to packages/integration_test/lib/src/_callback_io.dart index 40850d6859..e2181cee60 100644 --- a/packages/integration_test/lib/_callback_io.dart +++ b/packages/integration_test/lib/src/_callback_io.dart @@ -8,8 +8,8 @@ import 'dart:ui'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'common.dart'; -import 'src/channel.dart'; +import '../common.dart'; +import 'channel.dart'; /// The dart:io implementation of [CallbackManager]. /// @@ -19,12 +19,12 @@ import 'src/channel.dart'; CallbackManager get callbackManager => _singletonCallbackManager; /// IOCallbackManager singleton. -final IOCallbackManager _singletonCallbackManager = IOCallbackManager(); +final _IOCallbackManager _singletonCallbackManager = _IOCallbackManager(); /// Manages communication between `integration_tests` and the `driver_tests`. /// /// This is the dart:io implementation. -class IOCallbackManager implements CallbackManager { +class _IOCallbackManager implements CallbackManager { @override Future> callback( Map params, IntegrationTestResults testRunner) async { diff --git a/packages/integration_test/lib/_callback_web.dart b/packages/integration_test/lib/src/_callback_web.dart similarity index 97% rename from packages/integration_test/lib/_callback_web.dart rename to packages/integration_test/lib/src/_callback_web.dart index c56eb0813e..88d01c6d26 100644 --- a/packages/integration_test/lib/_callback_web.dart +++ b/packages/integration_test/lib/src/_callback_web.dart @@ -4,7 +4,7 @@ import 'dart:async'; -import 'common.dart'; +import '../common.dart'; /// The dart:html implementation of [CallbackManager]. /// @@ -14,8 +14,8 @@ import 'common.dart'; CallbackManager get callbackManager => _singletonWebDriverCommandManager; /// WebDriverCommandManager singleton. -final WebCallbackManager _singletonWebDriverCommandManager = - WebCallbackManager(); +final _WebCallbackManager _singletonWebDriverCommandManager = + _WebCallbackManager(); /// Manages communication between `integration_tests` and the `driver_tests`. /// @@ -26,7 +26,7 @@ final WebCallbackManager _singletonWebDriverCommandManager = /// WebDriver APIs. /// /// See: https://www.w3.org/TR/webdriver/ -class WebCallbackManager implements CallbackManager { +class _WebCallbackManager implements CallbackManager { /// App side tests will put the command requests from WebDriver to this pipe. Completer _webDriverCommandPipe = Completer(); diff --git a/packages/integration_test/lib/_extension_io.dart b/packages/integration_test/lib/src/_extension_io.dart similarity index 100% rename from packages/integration_test/lib/_extension_io.dart rename to packages/integration_test/lib/src/_extension_io.dart diff --git a/packages/integration_test/lib/_extension_web.dart b/packages/integration_test/lib/src/_extension_web.dart similarity index 100% rename from packages/integration_test/lib/_extension_web.dart rename to packages/integration_test/lib/src/_extension_web.dart diff --git a/packages/integration_test/lib/src/callback.dart b/packages/integration_test/lib/src/callback.dart new file mode 100644 index 0000000000..c10e2d27c6 --- /dev/null +++ b/packages/integration_test/lib/src/callback.dart @@ -0,0 +1,5 @@ +// 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. + +export '_callback_io.dart' if (dart.library.html) '_callback_web.dart'; diff --git a/packages/integration_test/lib/src/extension.dart b/packages/integration_test/lib/src/extension.dart new file mode 100644 index 0000000000..a2cb861fbf --- /dev/null +++ b/packages/integration_test/lib/src/extension.dart @@ -0,0 +1,5 @@ +// 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. + +export '_extension_io.dart' if (dart.library.html) '_extension_web.dart';