Remove hidden dependencies on the default LocalPlatform (#147342)
This is part 13 of a broken down version of the #140101 refactor. This only makes one dependency explicit. Further PRs will do the same for other dependencies, until these APIs have no hidden dependencies.
This commit is contained in:
parent
94a7151eb8
commit
e1e742ac35
@ -59,7 +59,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
|
|||||||
if (FlutterPostSubmitFileComparator.isForEnvironment(platform)) {
|
if (FlutterPostSubmitFileComparator.isForEnvironment(platform)) {
|
||||||
goldenFileComparator = await FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
goldenFileComparator = await FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: goldenFileComparator as LocalFileComparator,
|
localFileComparator: goldenFileComparator as LocalFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
log: print,
|
log: print,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -67,7 +67,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
|
|||||||
} else if (FlutterPreSubmitFileComparator.isForEnvironment(platform)) {
|
} else if (FlutterPreSubmitFileComparator.isForEnvironment(platform)) {
|
||||||
goldenFileComparator = await FlutterPreSubmitFileComparator.fromLocalFileComparator(
|
goldenFileComparator = await FlutterPreSubmitFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: goldenFileComparator as LocalFileComparator,
|
localFileComparator: goldenFileComparator as LocalFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
log: print,
|
log: print,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -78,6 +78,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
|
|||||||
'Golden file testing is not executed on Cirrus, or LUCI environments '
|
'Golden file testing is not executed on Cirrus, or LUCI environments '
|
||||||
'outside of flutter/flutter, or in test shards that are not configured '
|
'outside of flutter/flutter, or in test shards that are not configured '
|
||||||
'for using goldctl.',
|
'for using goldctl.',
|
||||||
|
platform: platform,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
log: print,
|
log: print,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -85,7 +86,7 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
|
|||||||
} else {
|
} else {
|
||||||
goldenFileComparator = await FlutterLocalFileComparator.fromLocalFileComparator(
|
goldenFileComparator = await FlutterLocalFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: goldenFileComparator as LocalFileComparator,
|
localFileComparator: goldenFileComparator as LocalFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
log: print,
|
log: print,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -133,15 +134,12 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
|
|||||||
/// information and files for interacting with the [skiaClient]. When testing
|
/// information and files for interacting with the [skiaClient]. When testing
|
||||||
/// locally, the [basedir] will also contain any diffs from failed tests, or
|
/// locally, the [basedir] will also contain any diffs from failed tests, or
|
||||||
/// goldens generated from newly introduced tests.
|
/// goldens generated from newly introduced tests.
|
||||||
///
|
|
||||||
/// The [platform] parameter is useful in tests, where the default
|
|
||||||
/// platform can be replaced by a mock instance.
|
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
FlutterGoldenFileComparator(
|
FlutterGoldenFileComparator(
|
||||||
this.basedir,
|
this.basedir,
|
||||||
this.skiaClient, {
|
this.skiaClient, {
|
||||||
required this.fs,
|
required this.fs,
|
||||||
this.platform = const LocalPlatform(),
|
required this.platform,
|
||||||
this.namePrefix,
|
this.namePrefix,
|
||||||
required this.log,
|
required this.log,
|
||||||
});
|
});
|
||||||
@ -157,8 +155,8 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
|
|||||||
/// The file system used to perform file access.
|
/// The file system used to perform file access.
|
||||||
final FileSystem fs;
|
final FileSystem fs;
|
||||||
|
|
||||||
/// A wrapper for the [dart:io.Platform] API.
|
/// The environment (current working directory, identity of the OS,
|
||||||
@visibleForTesting
|
/// environment variables, etc).
|
||||||
final Platform platform;
|
final Platform platform;
|
||||||
|
|
||||||
/// The prefix that is added to all golden names.
|
/// The prefix that is added to all golden names.
|
||||||
@ -186,8 +184,8 @@ abstract class FlutterGoldenFileComparator extends GoldenFileComparator {
|
|||||||
@protected
|
@protected
|
||||||
@visibleForTesting
|
@visibleForTesting
|
||||||
static Directory getBaseDirectory(
|
static Directory getBaseDirectory(
|
||||||
LocalFileComparator defaultComparator,
|
LocalFileComparator defaultComparator, {
|
||||||
Platform platform, {
|
required Platform platform,
|
||||||
String? suffix,
|
String? suffix,
|
||||||
required FileSystem fs,
|
required FileSystem fs,
|
||||||
}) {
|
}) {
|
||||||
@ -260,13 +258,13 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// Creates a [FlutterPostSubmitFileComparator] that will test golden file
|
/// Creates a [FlutterPostSubmitFileComparator] that will test golden file
|
||||||
/// images against Skia Gold.
|
/// images against Skia Gold.
|
||||||
///
|
///
|
||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] parameter is useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system can be replaced by mock instances.
|
||||||
FlutterPostSubmitFileComparator(
|
FlutterPostSubmitFileComparator(
|
||||||
super.basedir,
|
super.basedir,
|
||||||
super.skiaClient, {
|
super.skiaClient, {
|
||||||
required super.fs,
|
required super.fs,
|
||||||
super.platform,
|
required super.platform,
|
||||||
super.namePrefix,
|
super.namePrefix,
|
||||||
required super.log,
|
required super.log,
|
||||||
});
|
});
|
||||||
@ -275,27 +273,32 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// path resolution of the provided `localFileComparator`.
|
/// path resolution of the provided `localFileComparator`.
|
||||||
///
|
///
|
||||||
/// The [goldens] parameter is visible for testing purposes only.
|
/// The [goldens] parameter is visible for testing purposes only.
|
||||||
static Future<FlutterPostSubmitFileComparator> fromLocalFileComparator(
|
static Future<FlutterPostSubmitFileComparator> fromLocalFileComparator({
|
||||||
final Platform platform, {
|
|
||||||
SkiaGoldClient? goldens,
|
SkiaGoldClient? goldens,
|
||||||
required LocalFileComparator localFileComparator,
|
required LocalFileComparator localFileComparator,
|
||||||
|
required Platform platform,
|
||||||
String? namePrefix,
|
String? namePrefix,
|
||||||
required LogCallback log,
|
required LogCallback log,
|
||||||
required FileSystem fs,
|
required FileSystem fs,
|
||||||
}) async {
|
}) async {
|
||||||
final Directory baseDirectory = FlutterGoldenFileComparator.getBaseDirectory(
|
final Directory baseDirectory = FlutterGoldenFileComparator.getBaseDirectory(
|
||||||
localFileComparator,
|
localFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
suffix: 'flutter_goldens_postsubmit.',
|
suffix: 'flutter_goldens_postsubmit.',
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
baseDirectory.createSync(recursive: true);
|
baseDirectory.createSync(recursive: true);
|
||||||
|
|
||||||
goldens ??= SkiaGoldClient(baseDirectory, log: log);
|
goldens ??= SkiaGoldClient(
|
||||||
|
baseDirectory,
|
||||||
|
log: log,
|
||||||
|
platform: platform,
|
||||||
|
);
|
||||||
await goldens.auth();
|
await goldens.auth();
|
||||||
return FlutterPostSubmitFileComparator(
|
return FlutterPostSubmitFileComparator(
|
||||||
baseDirectory.uri,
|
baseDirectory.uri,
|
||||||
goldens,
|
goldens,
|
||||||
|
platform: platform,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -342,13 +345,13 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// Creates a [FlutterPreSubmitFileComparator] that will test golden file
|
/// Creates a [FlutterPreSubmitFileComparator] that will test golden file
|
||||||
/// images against baselines requested from Flutter Gold.
|
/// images against baselines requested from Flutter Gold.
|
||||||
///
|
///
|
||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] parameter is useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system can be replaced by mock instances.
|
||||||
FlutterPreSubmitFileComparator(
|
FlutterPreSubmitFileComparator(
|
||||||
super.basedir,
|
super.basedir,
|
||||||
super.skiaClient, {
|
super.skiaClient, {
|
||||||
required super.fs,
|
required super.fs,
|
||||||
super.platform,
|
required super.platform,
|
||||||
super.namePrefix,
|
super.namePrefix,
|
||||||
required super.log,
|
required super.log,
|
||||||
});
|
});
|
||||||
@ -357,10 +360,10 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// relative path resolution of the default [goldenFileComparator].
|
/// relative path resolution of the default [goldenFileComparator].
|
||||||
///
|
///
|
||||||
/// The [goldens] parameter is visible for testing purposes only.
|
/// The [goldens] parameter is visible for testing purposes only.
|
||||||
static Future<FlutterGoldenFileComparator> fromLocalFileComparator(
|
static Future<FlutterGoldenFileComparator> fromLocalFileComparator({
|
||||||
final Platform platform, {
|
|
||||||
SkiaGoldClient? goldens,
|
SkiaGoldClient? goldens,
|
||||||
required LocalFileComparator localFileComparator,
|
required LocalFileComparator localFileComparator,
|
||||||
|
required Platform platform,
|
||||||
Directory? testBasedir,
|
Directory? testBasedir,
|
||||||
String? namePrefix,
|
String? namePrefix,
|
||||||
required LogCallback log,
|
required LogCallback log,
|
||||||
@ -368,7 +371,7 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
}) async {
|
}) async {
|
||||||
final Directory baseDirectory = testBasedir ?? FlutterGoldenFileComparator.getBaseDirectory(
|
final Directory baseDirectory = testBasedir ?? FlutterGoldenFileComparator.getBaseDirectory(
|
||||||
localFileComparator,
|
localFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
suffix: 'flutter_goldens_presubmit.',
|
suffix: 'flutter_goldens_presubmit.',
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -377,12 +380,17 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
baseDirectory.createSync(recursive: true);
|
baseDirectory.createSync(recursive: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
goldens ??= SkiaGoldClient(baseDirectory, log: log);
|
goldens ??= SkiaGoldClient(
|
||||||
|
baseDirectory,
|
||||||
|
platform: platform,
|
||||||
|
log: log,
|
||||||
|
);
|
||||||
|
|
||||||
await goldens.auth();
|
await goldens.auth();
|
||||||
return FlutterPreSubmitFileComparator(
|
return FlutterPreSubmitFileComparator(
|
||||||
baseDirectory.uri,
|
baseDirectory.uri,
|
||||||
goldens, platform: platform,
|
goldens,
|
||||||
|
platform: platform,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -439,6 +447,7 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
|
|||||||
super.skiaClient,
|
super.skiaClient,
|
||||||
this.reason, {
|
this.reason, {
|
||||||
super.namePrefix,
|
super.namePrefix,
|
||||||
|
required super.platform,
|
||||||
required super.log,
|
required super.log,
|
||||||
required super.fs,
|
required super.fs,
|
||||||
});
|
});
|
||||||
@ -452,16 +461,22 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
|
|||||||
String reason, {
|
String reason, {
|
||||||
required LocalFileComparator localFileComparator,
|
required LocalFileComparator localFileComparator,
|
||||||
String? namePrefix,
|
String? namePrefix,
|
||||||
|
required Platform platform,
|
||||||
required LogCallback log,
|
required LogCallback log,
|
||||||
required FileSystem fs,
|
required FileSystem fs,
|
||||||
}) {
|
}) {
|
||||||
final Uri basedir = localFileComparator.basedir;
|
final Uri basedir = localFileComparator.basedir;
|
||||||
final SkiaGoldClient skiaClient = SkiaGoldClient(fs.directory(basedir), log: log);
|
final SkiaGoldClient skiaClient = SkiaGoldClient(
|
||||||
|
fs.directory(basedir),
|
||||||
|
platform: platform,
|
||||||
|
log: log,
|
||||||
|
);
|
||||||
return FlutterSkippingFileComparator(
|
return FlutterSkippingFileComparator(
|
||||||
basedir,
|
basedir,
|
||||||
skiaClient,
|
skiaClient,
|
||||||
reason,
|
reason,
|
||||||
namePrefix: namePrefix,
|
namePrefix: namePrefix,
|
||||||
|
platform: platform,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -519,13 +534,13 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
/// Creates a [FlutterLocalFileComparator] that will test golden file
|
/// Creates a [FlutterLocalFileComparator] that will test golden file
|
||||||
/// images against baselines requested from Flutter Gold.
|
/// images against baselines requested from Flutter Gold.
|
||||||
///
|
///
|
||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] parameter is useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system can be replaced by mock instances.
|
||||||
FlutterLocalFileComparator(
|
FlutterLocalFileComparator(
|
||||||
super.basedir,
|
super.basedir,
|
||||||
super.skiaClient, {
|
super.skiaClient, {
|
||||||
required super.fs,
|
required super.fs,
|
||||||
super.platform,
|
required super.platform,
|
||||||
required super.log,
|
required super.log,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -534,17 +549,17 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
///
|
///
|
||||||
/// The [goldens] and [baseDirectory] parameters are
|
/// The [goldens] and [baseDirectory] parameters are
|
||||||
/// visible for testing purposes only.
|
/// visible for testing purposes only.
|
||||||
static Future<FlutterGoldenFileComparator> fromLocalFileComparator(
|
static Future<FlutterGoldenFileComparator> fromLocalFileComparator({
|
||||||
final Platform platform, {
|
|
||||||
SkiaGoldClient? goldens,
|
SkiaGoldClient? goldens,
|
||||||
required LocalFileComparator localFileComparator,
|
required LocalFileComparator localFileComparator,
|
||||||
|
required Platform platform,
|
||||||
Directory? baseDirectory,
|
Directory? baseDirectory,
|
||||||
required LogCallback log,
|
required LogCallback log,
|
||||||
required FileSystem fs,
|
required FileSystem fs,
|
||||||
}) async {
|
}) async {
|
||||||
baseDirectory ??= FlutterGoldenFileComparator.getBaseDirectory(
|
baseDirectory ??= FlutterGoldenFileComparator.getBaseDirectory(
|
||||||
localFileComparator,
|
localFileComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -552,7 +567,11 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
baseDirectory.createSync(recursive: true);
|
baseDirectory.createSync(recursive: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
goldens ??= SkiaGoldClient(baseDirectory, log: log);
|
goldens ??= SkiaGoldClient(
|
||||||
|
baseDirectory,
|
||||||
|
platform: platform,
|
||||||
|
log: log,
|
||||||
|
);
|
||||||
try {
|
try {
|
||||||
// Check if we can reach Gold.
|
// Check if we can reach Gold.
|
||||||
await goldens.getExpectationForTest('');
|
await goldens.getExpectationForTest('');
|
||||||
@ -562,6 +581,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
goldens,
|
goldens,
|
||||||
'OSError occurred, could not reach Gold. '
|
'OSError occurred, could not reach Gold. '
|
||||||
'Switching to FlutterSkippingGoldenFileComparator.',
|
'Switching to FlutterSkippingGoldenFileComparator.',
|
||||||
|
platform: platform,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -571,6 +591,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
goldens,
|
goldens,
|
||||||
'SocketException occurred, could not reach Gold. '
|
'SocketException occurred, could not reach Gold. '
|
||||||
'Switching to FlutterSkippingGoldenFileComparator.',
|
'Switching to FlutterSkippingGoldenFileComparator.',
|
||||||
|
platform: platform,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -580,6 +601,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
goldens,
|
goldens,
|
||||||
'FormatException occurred, could not reach Gold. '
|
'FormatException occurred, could not reach Gold. '
|
||||||
'Switching to FlutterSkippingGoldenFileComparator.',
|
'Switching to FlutterSkippingGoldenFileComparator.',
|
||||||
|
platform: platform,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
@ -588,6 +610,7 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
return FlutterLocalFileComparator(
|
return FlutterLocalFileComparator(
|
||||||
baseDirectory.uri,
|
baseDirectory.uri,
|
||||||
goldens,
|
goldens,
|
||||||
|
platform: platform,
|
||||||
log: log,
|
log: log,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
|
@ -44,15 +44,15 @@ class SkiaException implements Exception {
|
|||||||
/// A client for uploading image tests and making baseline requests to the
|
/// A client for uploading image tests and making baseline requests to the
|
||||||
/// Flutter Gold Dashboard.
|
/// Flutter Gold Dashboard.
|
||||||
class SkiaGoldClient {
|
class SkiaGoldClient {
|
||||||
/// Creates a [SkiaGoldClient] with the given [workDirectory].
|
/// Creates a [SkiaGoldClient] with the given [workDirectory] and [Platform].
|
||||||
///
|
///
|
||||||
/// All other parameters are optional. They may be provided in tests to
|
/// All other parameters are optional. They may be provided in tests to
|
||||||
/// override the defaults for [fs], [process], [platform], and [httpClient].
|
/// override the defaults for [fs], [process], and [httpClient].
|
||||||
SkiaGoldClient(
|
SkiaGoldClient(
|
||||||
this.workDirectory, {
|
this.workDirectory, {
|
||||||
this.fs = const LocalFileSystem(),
|
this.fs = const LocalFileSystem(),
|
||||||
this.process = const LocalProcessManager(),
|
this.process = const LocalProcessManager(),
|
||||||
this.platform = const LocalPlatform(),
|
required this.platform,
|
||||||
Abi? abi,
|
Abi? abi,
|
||||||
io.HttpClient? httpClient,
|
io.HttpClient? httpClient,
|
||||||
required this.log,
|
required this.log,
|
||||||
@ -65,10 +65,8 @@ class SkiaGoldClient {
|
|||||||
/// replaced by a memory file system.
|
/// replaced by a memory file system.
|
||||||
final FileSystem fs;
|
final FileSystem fs;
|
||||||
|
|
||||||
/// A wrapper for the [dart:io.Platform] API.
|
/// The environment (current working directory, identity of the OS,
|
||||||
///
|
/// environment variables, etc).
|
||||||
/// This is useful in tests, where the system platform (the default) can be
|
|
||||||
/// replaced by a mock platform instance.
|
|
||||||
final Platform platform;
|
final Platform platform;
|
||||||
|
|
||||||
/// A controller for launching sub-processes.
|
/// A controller for launching sub-processes.
|
||||||
|
@ -716,7 +716,7 @@ void main() {
|
|||||||
defaultComparator.basedir = flutterRoot.childDirectory('baz').uri;
|
defaultComparator.basedir = flutterRoot.childDirectory('baz').uri;
|
||||||
final Directory basedir = FlutterGoldenFileComparator.getBaseDirectory(
|
final Directory basedir = FlutterGoldenFileComparator.getBaseDirectory(
|
||||||
defaultComparator,
|
defaultComparator,
|
||||||
platform,
|
platform: platform,
|
||||||
fs: fs,
|
fs: fs,
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
@ -854,7 +854,7 @@ void main() {
|
|||||||
expect(fakeSkiaClient.initCalls, 0);
|
expect(fakeSkiaClient.initCalls, 0);
|
||||||
FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
||||||
platform,
|
platform: platform,
|
||||||
goldens: fakeSkiaClient,
|
goldens: fakeSkiaClient,
|
||||||
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -940,7 +940,7 @@ void main() {
|
|||||||
expect(fakeSkiaClient.tryInitCalls, 0);
|
expect(fakeSkiaClient.tryInitCalls, 0);
|
||||||
FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
FlutterPostSubmitFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
||||||
platform,
|
platform: platform,
|
||||||
goldens: fakeSkiaClient,
|
goldens: fakeSkiaClient,
|
||||||
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
||||||
fs: fs,
|
fs: fs,
|
||||||
@ -1042,7 +1042,7 @@ void main() {
|
|||||||
fakeSkiaClient.getExpectationForTestThrowable = const OSError("Can't reach Gold");
|
fakeSkiaClient.getExpectationForTestThrowable = const OSError("Can't reach Gold");
|
||||||
final FlutterGoldenFileComparator comparator1 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
final FlutterGoldenFileComparator comparator1 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
||||||
platform,
|
platform: platform,
|
||||||
goldens: fakeSkiaClient,
|
goldens: fakeSkiaClient,
|
||||||
baseDirectory: fakeDirectory,
|
baseDirectory: fakeDirectory,
|
||||||
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
||||||
@ -1053,7 +1053,7 @@ void main() {
|
|||||||
fakeSkiaClient.getExpectationForTestThrowable = const SocketException("Can't reach Gold");
|
fakeSkiaClient.getExpectationForTestThrowable = const SocketException("Can't reach Gold");
|
||||||
final FlutterGoldenFileComparator comparator2 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
final FlutterGoldenFileComparator comparator2 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
||||||
platform,
|
platform: platform,
|
||||||
goldens: fakeSkiaClient,
|
goldens: fakeSkiaClient,
|
||||||
baseDirectory: fakeDirectory,
|
baseDirectory: fakeDirectory,
|
||||||
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
||||||
@ -1064,7 +1064,7 @@ void main() {
|
|||||||
fakeSkiaClient.getExpectationForTestThrowable = const FormatException("Can't reach Gold");
|
fakeSkiaClient.getExpectationForTestThrowable = const FormatException("Can't reach Gold");
|
||||||
final FlutterGoldenFileComparator comparator3 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
final FlutterGoldenFileComparator comparator3 = await FlutterLocalFileComparator.fromLocalFileComparator(
|
||||||
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
localFileComparator: LocalFileComparator(Uri.parse('/test'), pathStyle: path.Style.posix),
|
||||||
platform,
|
platform: platform,
|
||||||
goldens: fakeSkiaClient,
|
goldens: fakeSkiaClient,
|
||||||
baseDirectory: fakeDirectory,
|
baseDirectory: fakeDirectory,
|
||||||
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
log: (String message) => fail('skia gold client printed unexpected output: "$message"'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user