Fix structure of pkg:integration_test (#137283)
The private _ libraries should not be advertised as importable. Moving them to the src directory. I noticed this while browsing our dart docs. This should remove the underscore entries.  Replaces https://github.com/flutter/flutter/pull/137197.
This commit is contained in:
committed by
GitHub
parent
5dd2a4e0aa
commit
1c90ed8b64
@@ -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<Map<String, dynamic>> callback(
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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<Map<String, dynamic>> callback(
|
||||
Map<String, String> params, IntegrationTestResults testRunner) async {
|
||||
@@ -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<WebDriverCommand> _webDriverCommandPipe =
|
||||
Completer<WebDriverCommand>();
|
||||
5
packages/integration_test/lib/src/callback.dart
Normal file
5
packages/integration_test/lib/src/callback.dart
Normal file
@@ -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';
|
||||
5
packages/integration_test/lib/src/extension.dart
Normal file
5
packages/integration_test/lib/src/extension.dart
Normal file
@@ -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';
|
||||
Reference in New Issue
Block a user