Skip to content

Commit 1c90ed8

Browse files
authored
Fix structure of pkg:integration_test (flutter#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 flutter#137197.
1 parent 5dd2a4e commit 1c90ed8

File tree

8 files changed

+20
-13
lines changed

8 files changed

+20
-13
lines changed

packages/integration_test/lib/common.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ class WebDriverCommand {
285285
///
286286
/// Depending on the platform the communication between `integration_tests` and
287287
/// the `driver_tests` can be different.
288-
///
289-
/// For the web implementation [WebCallbackManager].
290-
/// For the io implementation [IOCallbackManager].
291288
abstract class CallbackManager {
292289
/// The callback function to response the driver side input.
293290
Future<Map<String, dynamic>> callback(

packages/integration_test/lib/integration_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ import 'package:flutter/widgets.dart';
1414
import 'package:flutter_test/flutter_test.dart';
1515
import 'package:vm_service/vm_service.dart' as vm;
1616

17-
import '_callback_io.dart' if (dart.library.html) '_callback_web.dart' as driver_actions;
18-
import '_extension_io.dart' if (dart.library.html) '_extension_web.dart';
1917
import 'common.dart';
18+
import 'src/callback.dart' as driver_actions;
2019
import 'src/channel.dart';
20+
import 'src/extension.dart';
2121

2222
const String _success = 'success';
2323

packages/integration_test/lib/_callback_io.dart renamed to packages/integration_test/lib/src/_callback_io.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import 'dart:ui';
88
import 'package:flutter/services.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

11-
import 'common.dart';
12-
import 'src/channel.dart';
11+
import '../common.dart';
12+
import 'channel.dart';
1313

1414
/// The dart:io implementation of [CallbackManager].
1515
///
@@ -19,12 +19,12 @@ import 'src/channel.dart';
1919
CallbackManager get callbackManager => _singletonCallbackManager;
2020

2121
/// IOCallbackManager singleton.
22-
final IOCallbackManager _singletonCallbackManager = IOCallbackManager();
22+
final _IOCallbackManager _singletonCallbackManager = _IOCallbackManager();
2323

2424
/// Manages communication between `integration_tests` and the `driver_tests`.
2525
///
2626
/// This is the dart:io implementation.
27-
class IOCallbackManager implements CallbackManager {
27+
class _IOCallbackManager implements CallbackManager {
2828
@override
2929
Future<Map<String, dynamic>> callback(
3030
Map<String, String> params, IntegrationTestResults testRunner) async {

packages/integration_test/lib/_callback_web.dart renamed to packages/integration_test/lib/src/_callback_web.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'dart:async';
66

7-
import 'common.dart';
7+
import '../common.dart';
88

99
/// The dart:html implementation of [CallbackManager].
1010
///
@@ -14,8 +14,8 @@ import 'common.dart';
1414
CallbackManager get callbackManager => _singletonWebDriverCommandManager;
1515

1616
/// WebDriverCommandManager singleton.
17-
final WebCallbackManager _singletonWebDriverCommandManager =
18-
WebCallbackManager();
17+
final _WebCallbackManager _singletonWebDriverCommandManager =
18+
_WebCallbackManager();
1919

2020
/// Manages communication between `integration_tests` and the `driver_tests`.
2121
///
@@ -26,7 +26,7 @@ final WebCallbackManager _singletonWebDriverCommandManager =
2626
/// WebDriver APIs.
2727
///
2828
/// See: https://www.w3.org/TR/webdriver/
29-
class WebCallbackManager implements CallbackManager {
29+
class _WebCallbackManager implements CallbackManager {
3030
/// App side tests will put the command requests from WebDriver to this pipe.
3131
Completer<WebDriverCommand> _webDriverCommandPipe =
3232
Completer<WebDriverCommand>();
File renamed without changes.
File renamed without changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
export '_callback_io.dart' if (dart.library.html) '_callback_web.dart';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
export '_extension_io.dart' if (dart.library.html) '_extension_web.dart';

0 commit comments

Comments
 (0)