Unverified Commit 1c90ed8b authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

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.

![image](https://github.com/flutter/flutter/assets/1227763/41511efe-4eb8-487a-9758-ccde1720e05a)

Replaces https://github.com/flutter/flutter/pull/137197.
parent 5dd2a4e0
...@@ -285,9 +285,6 @@ class WebDriverCommand { ...@@ -285,9 +285,6 @@ class WebDriverCommand {
/// ///
/// Depending on the platform the communication between `integration_tests` and /// Depending on the platform the communication between `integration_tests` and
/// the `driver_tests` can be different. /// the `driver_tests` can be different.
///
/// For the web implementation [WebCallbackManager].
/// For the io implementation [IOCallbackManager].
abstract class CallbackManager { abstract class CallbackManager {
/// The callback function to response the driver side input. /// The callback function to response the driver side input.
Future<Map<String, dynamic>> callback( Future<Map<String, dynamic>> callback(
......
...@@ -14,10 +14,10 @@ import 'package:flutter/widgets.dart'; ...@@ -14,10 +14,10 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:vm_service/vm_service.dart' as vm; 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 'common.dart';
import 'src/callback.dart' as driver_actions;
import 'src/channel.dart'; import 'src/channel.dart';
import 'src/extension.dart';
const String _success = 'success'; const String _success = 'success';
......
...@@ -8,8 +8,8 @@ import 'dart:ui'; ...@@ -8,8 +8,8 @@ import 'dart:ui';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'common.dart'; import '../common.dart';
import 'src/channel.dart'; import 'channel.dart';
/// The dart:io implementation of [CallbackManager]. /// The dart:io implementation of [CallbackManager].
/// ///
...@@ -19,12 +19,12 @@ import 'src/channel.dart'; ...@@ -19,12 +19,12 @@ import 'src/channel.dart';
CallbackManager get callbackManager => _singletonCallbackManager; CallbackManager get callbackManager => _singletonCallbackManager;
/// IOCallbackManager singleton. /// IOCallbackManager singleton.
final IOCallbackManager _singletonCallbackManager = IOCallbackManager(); final _IOCallbackManager _singletonCallbackManager = _IOCallbackManager();
/// Manages communication between `integration_tests` and the `driver_tests`. /// Manages communication between `integration_tests` and the `driver_tests`.
/// ///
/// This is the dart:io implementation. /// This is the dart:io implementation.
class IOCallbackManager implements CallbackManager { class _IOCallbackManager implements CallbackManager {
@override @override
Future<Map<String, dynamic>> callback( Future<Map<String, dynamic>> callback(
Map<String, String> params, IntegrationTestResults testRunner) async { Map<String, String> params, IntegrationTestResults testRunner) async {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import 'dart:async'; import 'dart:async';
import 'common.dart'; import '../common.dart';
/// The dart:html implementation of [CallbackManager]. /// The dart:html implementation of [CallbackManager].
/// ///
...@@ -14,8 +14,8 @@ import 'common.dart'; ...@@ -14,8 +14,8 @@ import 'common.dart';
CallbackManager get callbackManager => _singletonWebDriverCommandManager; CallbackManager get callbackManager => _singletonWebDriverCommandManager;
/// WebDriverCommandManager singleton. /// WebDriverCommandManager singleton.
final WebCallbackManager _singletonWebDriverCommandManager = final _WebCallbackManager _singletonWebDriverCommandManager =
WebCallbackManager(); _WebCallbackManager();
/// Manages communication between `integration_tests` and the `driver_tests`. /// Manages communication between `integration_tests` and the `driver_tests`.
/// ///
...@@ -26,7 +26,7 @@ final WebCallbackManager _singletonWebDriverCommandManager = ...@@ -26,7 +26,7 @@ final WebCallbackManager _singletonWebDriverCommandManager =
/// WebDriver APIs. /// WebDriver APIs.
/// ///
/// See: https://www.w3.org/TR/webdriver/ /// 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. /// App side tests will put the command requests from WebDriver to this pipe.
Completer<WebDriverCommand> _webDriverCommandPipe = Completer<WebDriverCommand> _webDriverCommandPipe =
Completer<WebDriverCommand>(); Completer<WebDriverCommand>();
......
// 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';
// 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';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment