reland driver vm_service migration (#69126)
* One more reland of "Driver vm service (#68654)" (#69074)" (#69077)" (#69089)"
This reverts commit e5814756a2.
* pub run test
This commit is contained in:
@@ -11,6 +11,7 @@ import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf; // ignor
|
||||
import 'package:test_api/test_api.dart' as test_package show TypeMatcher; // ignore: deprecated_member_use
|
||||
|
||||
export 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf; // ignore: deprecated_member_use
|
||||
export 'package:test_api/fake.dart'; // ignore: deprecated_member_use
|
||||
|
||||
// Defines a 'package:test' shim.
|
||||
// TODO(ianh): Clean this up once https://github.com/dart-lang/matcher/issues/98 is fixed
|
||||
@@ -31,3 +32,6 @@ void tryToDelete(Directory directory) {
|
||||
|
||||
/// Matcher for functions that throw [DriverError].
|
||||
final Matcher throwsDriverError = throwsA(isA<DriverError>());
|
||||
|
||||
/// Matcher for functions that throw [AssertionError].
|
||||
final Matcher throwsAssertionError = throwsA(isA<AssertionError>());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,11 @@
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
import 'package:flutter_driver/src/common/find.dart';
|
||||
import 'package:mockito/mockito.dart';
|
||||
|
||||
import '../../common.dart';
|
||||
|
||||
void main() {
|
||||
final MockDeserialize mockDeserialize = MockDeserialize();
|
||||
final FakeDeserialize fakeDeserialize = FakeDeserialize();
|
||||
|
||||
test('Ancestor finder serialize', () {
|
||||
const SerializableFinder of = ByType('Text');
|
||||
@@ -42,7 +41,7 @@ void main() {
|
||||
'firstMatchOnly': 'true',
|
||||
};
|
||||
|
||||
final Ancestor a = Ancestor.deserialize(serialized, mockDeserialize);
|
||||
final Ancestor a = Ancestor.deserialize(serialized, fakeDeserialize);
|
||||
expect(a.of, isA<ByType>());
|
||||
expect(a.matching, isA<ByValueKey>());
|
||||
expect(a.matchRoot, isTrue);
|
||||
@@ -77,7 +76,7 @@ void main() {
|
||||
'firstMatchOnly': 'true',
|
||||
};
|
||||
|
||||
final Descendant a = Descendant.deserialize(serialized, mockDeserialize);
|
||||
final Descendant a = Descendant.deserialize(serialized, fakeDeserialize);
|
||||
expect(a.of, isA<ByType>());
|
||||
expect(a.matching, isA<ByValueKey>());
|
||||
expect(a.matchRoot, isTrue);
|
||||
@@ -85,4 +84,4 @@ void main() {
|
||||
});
|
||||
}
|
||||
|
||||
class MockDeserialize with Mock, DeserializeFinderFactory { }
|
||||
class FakeDeserialize extends Fake with DeserializeFinderFactory { }
|
||||
|
||||
Reference in New Issue
Block a user