Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
3fa355c9
Unverified
Commit
3fa355c9
authored
May 25, 2022
by
Michael Goderbauer
Committed by
GitHub
May 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dead code in tools tests (#104567)
parent
7a2b187c
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
0 additions
and
510 deletions
+0
-510
attach_test.dart
...utter_tools/test/commands.shard/hermetic/attach_test.dart
+0
-123
custom_devices_test.dart
...ols/test/commands.shard/hermetic/custom_devices_test.dart
+0
-7
doctor_test.dart
...utter_tools/test/commands.shard/hermetic/doctor_test.dart
+0
-6
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+0
-8
gradle_test.dart
...flutter_tools/test/general.shard/android/gradle_test.dart
+0
-10
file_system_test.dart
...utter_tools/test/general.shard/base/file_system_test.dart
+0
-1
android_test.dart
...test/general.shard/build_system/targets/android_test.dart
+0
-2
icon_tree_shaker_test.dart
...ral.shard/build_system/targets/icon_tree_shaker_test.dart
+0
-2
windows_test.dart
...test/general.shard/build_system/targets/windows_test.dart
+0
-6
cache_test.dart
packages/flutter_tools/test/general.shard/cache_test.dart
+0
-13
daemon_test.dart
packages/flutter_tools/test/general.shard/daemon_test.dart
+0
-29
drive_service_test.dart
...er_tools/test/general.shard/drive/drive_service_test.dart
+0
-30
flutter_platform_test.dart
...utter_tools/test/general.shard/flutter_platform_test.dart
+0
-14
fuchsia_device_start_test.dart
...test/general.shard/fuchsia/fuchsia_device_start_test.dart
+0
-12
fuchsia_device_test.dart
...tools/test/general.shard/fuchsia/fuchsia_device_test.dart
+0
-20
generate_localizations_test.dart
...tools/test/general.shard/generate_localizations_test.dart
+0
-5
hot_test.dart
packages/flutter_tools/test/general.shard/hot_test.dart
+0
-34
integration_test_device_test.dart
...ools/test/general.shard/integration_test_device_test.dart
+0
-12
cocoapods_test.dart
...lutter_tools/test/general.shard/macos/cocoapods_test.dart
+0
-3
macos_project_migration_test.dart
...est/general.shard/macos/macos_project_migration_test.dart
+0
-17
resident_devtools_handler_test.dart
...ls/test/general.shard/resident_devtools_handler_test.dart
+0
-15
terminal_handler_test.dart
...utter_tools/test/general.shard/terminal_handler_test.dart
+0
-15
vmservice_test.dart
...ages/flutter_tools/test/general.shard/vmservice_test.dart
+0
-33
plugins_test.dart
...lutter_tools/test/general.shard/windows/plugins_test.dart
+0
-14
test_support.dart
...ls/test/integration.shard/debug_adapter/test_support.dart
+0
-1
test_utils.dart
...ages/flutter_tools/test/integration.shard/test_utils.dart
+0
-9
context.dart
packages/flutter_tools/test/src/context.dart
+0
-3
custom_devices_common.dart
packages/flutter_tools/test/src/custom_devices_common.dart
+0
-8
fakes.dart
packages/flutter_tools/test/src/fakes.dart
+0
-58
No files found.
packages/flutter_tools/test/commands.shard/hermetic/attach_test.dart
View file @
3fa355c9
...
...
@@ -5,7 +5,6 @@
// @dart = 2.8
import
'dart:async'
;
import
'dart:io'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/android/android_device.dart'
;
...
...
@@ -36,28 +35,8 @@ import 'package:vm_service/vm_service.dart' as vm_service;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
import
'../../src/fake_devices.dart'
;
import
'../../src/fake_vm_services.dart'
;
import
'../../src/test_flutter_command_runner.dart'
;
final
vm_service
.
Isolate
fakeUnpausedIsolate
=
vm_service
.
Isolate
(
id:
'1'
,
pauseEvent:
vm_service
.
Event
(
kind:
vm_service
.
EventKind
.
kResume
,
timestamp:
0
),
breakpoints:
<
vm_service
.
Breakpoint
>[],
exceptionPauseMode:
null
,
isolateFlags:
<
vm_service
.
IsolateFlag
>[],
libraries:
<
vm_service
.
LibraryRef
>[],
livePorts:
0
,
name:
'test'
,
number:
'1'
,
pauseOnExit:
false
,
runnable:
true
,
startTime:
0
,
isSystemIsolate:
false
,
);
void
main
(
)
{
tearDown
(()
{
MacOSDesignedForIPadDevices
.
allowDiscovery
=
false
;
...
...
@@ -688,108 +667,6 @@ Future<void> expectLoggerInterruptEndsTask(Future<void> task, StreamLogger logge
);
}
VMServiceConnector
getFakeVmServiceFactory
(
{
@required
Completer
<
void
>
vmServiceDoneCompleter
,
})
{
assert
(
vmServiceDoneCompleter
!=
null
);
return
(
Uri
httpUri
,
{
ReloadSources
reloadSources
,
Restart
restart
,
CompileExpression
compileExpression
,
GetSkSLMethod
getSkSLMethod
,
PrintStructuredErrorLogMethod
printStructuredErrorLogMethod
,
CompressionOptions
compression
,
Device
device
,
Logger
logger
,
})
async
{
final
FakeVmServiceHost
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
FakeVmServiceRequest
(
method:
kListViewsMethod
,
args:
null
,
jsonResponse:
<
String
,
Object
>{
'views'
:
<
Object
>[
<
String
,
Object
>{
'id'
:
'1'
,
'isolate'
:
fakeUnpausedIsolate
.
toJson
(),
},
],
},
),
FakeVmServiceRequest
(
method:
'getVM'
,
args:
null
,
jsonResponse:
vm_service
.
VM
.
parse
(<
String
,
Object
>{})
.
toJson
(),
),
FakeVmServiceRequest
(
method:
'_createDevFS'
,
args:
<
String
,
Object
>{
'fsName'
:
globals
.
fs
.
currentDirectory
.
absolute
.
path
,
},
jsonResponse:
<
String
,
Object
>{
'uri'
:
globals
.
fs
.
currentDirectory
.
absolute
.
path
,
},
),
FakeVmServiceRequest
(
method:
kListViewsMethod
,
args:
null
,
jsonResponse:
<
String
,
Object
>{
'views'
:
<
Object
>[
<
String
,
Object
>{
'id'
:
'1'
,
'isolate'
:
fakeUnpausedIsolate
.
toJson
(),
},
],
},
),
],
);
return
fakeVmServiceHost
.
vmService
;
};
}
class
TestHotRunnerFactory
extends
HotRunnerFactory
{
HotRunner
_runner
;
@override
HotRunner
build
(
List
<
FlutterDevice
>
devices
,
{
String
target
,
DebuggingOptions
debuggingOptions
,
bool
benchmarkMode
=
false
,
File
applicationBinary
,
bool
hostIsIde
=
false
,
String
projectRootPath
,
String
packagesFilePath
,
String
dillOutputPath
,
bool
stayResident
=
true
,
bool
ipv6
=
false
,
FlutterProject
flutterProject
,
})
{
_runner
??=
HotRunner
(
devices
,
target:
target
,
debuggingOptions:
debuggingOptions
,
benchmarkMode:
benchmarkMode
,
applicationBinary:
applicationBinary
,
hostIsIde:
hostIsIde
,
projectRootPath:
projectRootPath
,
dillOutputPath:
dillOutputPath
,
stayResident:
stayResident
,
ipv6:
ipv6
,
);
return
_runner
;
}
Future
<
void
>
exitApp
()
async
{
assert
(
_runner
!=
null
);
await
_runner
.
exit
();
}
}
class
FakeDartDevelopmentService
extends
Fake
implements
DartDevelopmentService
{
@override
Future
<
void
>
get
done
=>
noopCompleter
.
future
;
...
...
packages/flutter_tools/test/commands.shard/hermetic/custom_devices_test.dart
View file @
3fa355c9
...
...
@@ -163,13 +163,6 @@ const String defaultConfigLinux2 = r'''
}
'''
;
final
Platform
linuxPlatform
=
FakePlatform
(
environment:
<
String
,
String
>{
'FLUTTER_ROOT'
:
linuxFlutterRoot
,
'HOME'
:
'/'
,
}
);
final
Platform
windowsPlatform
=
FakePlatform
(
operatingSystem:
'windows'
,
environment:
<
String
,
String
>{
...
...
packages/flutter_tools/test/commands.shard/hermetic/doctor_test.dart
View file @
3fa355c9
...
...
@@ -19,7 +19,6 @@ import 'package:flutter_tools/src/android/android_studio_validator.dart';
import
'package:flutter_tools/src/android/android_workflow.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/base/terminal.dart'
;
import
'package:flutter_tools/src/base/user_messages.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
...
...
@@ -42,11 +41,6 @@ import '../../src/context.dart';
import
'../../src/fakes.dart'
;
import
'../../src/test_flutter_command_runner.dart'
;
final
Platform
macPlatform
=
FakePlatform
(
operatingSystem:
'macos'
,
environment:
<
String
,
String
>{
'HOME'
:
'/foo/bar'
}
);
void
main
(
)
{
FakeFlutterVersion
flutterVersion
;
BufferLogger
logger
;
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
3fa355c9
...
...
@@ -801,14 +801,6 @@ class FakeAndroidSdk extends Fake implements AndroidSdk {
String
get
adbPath
=>
'adb'
;
}
class
TestRunCommand
extends
RunCommand
{
@override
// ignore: must_call_super
Future
<
void
>
validateCommand
()
async
{
devices
=
await
globals
.
deviceManager
.
getDevices
();
}
}
// Unfortunately Device, despite not being immutable, has an `operator ==`.
// Until we fix that, we have to also ignore related lints here.
// ignore: avoid_implementing_value_types
...
...
packages/flutter_tools/test/general.shard/android/gradle_test.dart
View file @
3fa355c9
...
...
@@ -17,7 +17,6 @@ import 'package:flutter_tools/src/build_info.dart';
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/globals.dart'
as
globals
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:test/fake.dart'
;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
...
...
@@ -704,12 +703,3 @@ flutter:
// TODO(zanderso): This is an integration test and should be moved to the integration shard.
},
skip:
true
);
// https://github.com/flutter/flutter/issues/87922
}
class
FakeGradleUtils
extends
GradleUtils
{
@override
String
getExecutable
(
FlutterProject
project
)
{
return
'gradlew'
;
}
}
class
FakeAndroidSdk
extends
Fake
implements
AndroidSdk
{
}
packages/flutter_tools/test/general.shard/base/file_system_test.dart
View file @
3fa355c9
...
...
@@ -183,4 +183,3 @@ class FakeProcessSignal extends Fake implements io.ProcessSignal {
@override
Stream
<
io
.
ProcessSignal
>
watch
()
=>
controller
.
stream
;
}
class
FakeFile
extends
Fake
implements
File
{
}
packages/flutter_tools/test/general.shard/build_system/targets/android_test.dart
View file @
3fa355c9
...
...
@@ -10,7 +10,6 @@ import 'package:flutter_tools/src/artifacts.dart';
import
'package:flutter_tools/src/base/deferred_component.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_system/build_system.dart'
;
import
'package:flutter_tools/src/build_system/depfile.dart'
;
...
...
@@ -21,7 +20,6 @@ import '../../../src/common.dart';
import
'../../../src/context.dart'
;
import
'../../../src/fake_process_manager.dart'
;
final
Platform
platform
=
FakePlatform
();
void
main
(
)
{
FakeProcessManager
processManager
;
FileSystem
fileSystem
;
...
...
packages/flutter_tools/test/general.shard/build_system/targets/icon_tree_shaker_test.dart
View file @
3fa355c9
...
...
@@ -6,7 +6,6 @@ import 'package:file/memory.dart';
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_system/build_system.dart'
;
import
'package:flutter_tools/src/build_system/targets/icon_tree_shaker.dart'
;
...
...
@@ -16,7 +15,6 @@ import '../../../src/common.dart';
import
'../../../src/fake_process_manager.dart'
;
import
'../../../src/fakes.dart'
;
final
Platform
kNoAnsiPlatform
=
FakePlatform
();
const
List
<
int
>
_kTtfHeaderBytes
=
<
int
>[
0
,
1
,
0
,
0
,
0
,
15
,
0
,
128
,
0
,
3
,
0
,
112
];
const
String
inputPath
=
'/input/fonts/MaterialIcons-Regular.otf'
;
...
...
packages/flutter_tools/test/general.shard/build_system/targets/windows_test.dart
View file @
3fa355c9
...
...
@@ -9,7 +9,6 @@ import 'package:file_testing/file_testing.dart';
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/build_system/build_system.dart'
;
import
'package:flutter_tools/src/build_system/depfile.dart'
;
...
...
@@ -20,11 +19,6 @@ import 'package:flutter_tools/src/convert.dart';
import
'../../../src/common.dart'
;
import
'../../../src/context.dart'
;
final
Platform
kWindowsPlatform
=
FakePlatform
(
operatingSystem:
'windows'
,
environment:
<
String
,
String
>{},
);
void
main
(
)
{
testWithoutContext
(
'UnpackWindows copies files to the correct windows/ cache directory'
,
()
async
{
final
Artifacts
artifacts
=
Artifacts
.
test
();
...
...
packages/flutter_tools/test/general.shard/cache_test.dart
View file @
3fa355c9
...
...
@@ -1062,19 +1062,6 @@ class FakeSimpleArtifact extends CachedArtifact {
Future
<
void
>
updateInner
(
ArtifactUpdater
artifactUpdater
,
FileSystem
fileSystem
,
OperatingSystemUtils
operatingSystemUtils
)
async
{
}
}
class
FakeDownloadedArtifact
extends
CachedArtifact
{
FakeDownloadedArtifact
(
this
.
downloadedFile
,
Cache
cache
)
:
super
(
'fake'
,
cache
,
DevelopmentArtifact
.
universal
,
);
final
File
downloadedFile
;
@override
Future
<
void
>
updateInner
(
ArtifactUpdater
artifactUpdater
,
FileSystem
fileSystem
,
OperatingSystemUtils
operatingSystemUtils
)
async
{
}
}
class
FakeSecondaryCachedArtifact
extends
Fake
implements
CachedArtifact
{
bool
upToDate
=
false
;
bool
didUpdate
=
false
;
...
...
packages/flutter_tools/test/general.shard/daemon_test.dart
View file @
3fa355c9
...
...
@@ -3,13 +3,10 @@
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:typed_data'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/daemon.dart'
;
import
'package:test/fake.dart'
;
import
'../src/common.dart'
;
...
...
@@ -388,29 +385,3 @@ Future<List<_DaemonMessageAndBinary>> _readAllBinaries(Stream<DaemonMessage> inp
}
return
outputs
;
}
class
FakeSocket
extends
Fake
implements
Socket
{
bool
closeCalled
=
false
;
final
StreamController
<
Uint8List
>
controller
=
StreamController
<
Uint8List
>();
final
List
<
Object
?>
writtenObjects
=
<
Object
?>[];
@override
StreamSubscription
<
Uint8List
>
listen
(
void
Function
(
Uint8List
event
)?
onData
,
{
Function
?
onError
,
void
Function
()?
onDone
,
bool
?
cancelOnError
,
})
{
return
controller
.
stream
.
listen
(
onData
,
onError:
onError
,
onDone:
onDone
,
cancelOnError:
cancelOnError
);
}
@override
void
write
(
Object
?
object
)
{
writtenObjects
.
add
(
object
);
}
@override
Future
<
void
>
close
()
async
{
closeCalled
=
true
;
}
}
packages/flutter_tools/test/general.shard/drive/drive_service_test.dart
View file @
3fa355c9
...
...
@@ -55,36 +55,6 @@ final vm_service.Isolate fakeUnpausedIsolate = vm_service.Isolate(
isolateFlags:
<
vm_service
.
IsolateFlag
>[],
);
final
vm_service
.
Isolate
fakePausedIsolate
=
vm_service
.
Isolate
(
id:
'1'
,
pauseEvent:
vm_service
.
Event
(
kind:
vm_service
.
EventKind
.
kPauseException
,
timestamp:
0
),
breakpoints:
<
vm_service
.
Breakpoint
>[
vm_service
.
Breakpoint
(
breakpointNumber:
123
,
id:
'test-breakpoint'
,
location:
vm_service
.
SourceLocation
(
tokenPos:
0
,
script:
vm_service
.
ScriptRef
(
id:
'test-script'
,
uri:
'foo.dart'
),
),
enabled:
true
,
resolved:
true
,
),
],
exceptionPauseMode:
null
,
libraries:
<
vm_service
.
LibraryRef
>[],
livePorts:
0
,
name:
'test'
,
number:
'1'
,
pauseOnExit:
false
,
runnable:
true
,
startTime:
0
,
isSystemIsolate:
false
,
isolateFlags:
<
vm_service
.
IsolateFlag
>[],
);
final
vm_service
.
VM
fakeVM
=
vm_service
.
VM
(
isolates:
<
vm_service
.
IsolateRef
>[
fakeUnpausedIsolate
],
pid:
1
,
...
...
packages/flutter_tools/test/general.shard/flutter_platform_test.dart
View file @
3fa355c9
...
...
@@ -121,17 +121,3 @@ void main() {
}
class
FakeSuitePlatform
extends
Fake
implements
SuitePlatform
{
}
// A FlutterPlatform with enough fields set to load and start a test.
class
TestFlutterPlatform
extends
FlutterPlatform
{
TestFlutterPlatform
()
:
super
(
shellPath:
'/'
,
debuggingOptions:
DebuggingOptions
.
enabled
(
const
BuildInfo
(
BuildMode
.
debug
,
''
,
treeShakeIcons:
false
,
),
),
);
}
packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_start_test.dart
View file @
3fa355c9
...
...
@@ -9,7 +9,6 @@ import 'dart:convert';
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/artifacts.dart'
;
import
'package:flutter_tools/src/base/common.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/os.dart'
;
...
...
@@ -734,17 +733,6 @@ class FakeFuchsiaKernelCompiler implements FuchsiaKernelCompiler {
}
}
class
FailingKernelCompiler
implements
FuchsiaKernelCompiler
{
@override
Future
<
void
>
build
({
@required
FuchsiaProject
fuchsiaProject
,
@required
String
target
,
// E.g., lib/main.dart
BuildInfo
buildInfo
=
BuildInfo
.
debug
,
})
async
{
throwToolExit
(
'Build process failed'
);
}
}
class
FakeFuchsiaFfx
implements
FuchsiaFfx
{
@override
Future
<
List
<
String
>>
list
({
Duration
timeout
})
async
{
...
...
packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
View file @
3fa355c9
...
...
@@ -876,26 +876,6 @@ class FakePortForwarder extends Fake implements DevicePortForwarder {
}
}
class
FuchsiaDeviceWithFakeDiscovery
extends
FuchsiaDevice
{
FuchsiaDeviceWithFakeDiscovery
(
String
id
,
{
String
name
})
:
super
(
id
,
name:
name
);
@override
FuchsiaIsolateDiscoveryProtocol
getIsolateDiscoveryProtocol
(
String
isolateName
)
{
return
FakeFuchsiaIsolateDiscoveryProtocol
();
}
@override
Future
<
TargetPlatform
>
get
targetPlatform
async
=>
TargetPlatform
.
fuchsia_arm64
;
}
class
FakeFuchsiaIsolateDiscoveryProtocol
implements
FuchsiaIsolateDiscoveryProtocol
{
@override
FutureOr
<
Uri
>
get
uri
=>
Uri
.
parse
(
'http://[::1]:37'
);
@override
void
dispose
()
{}
}
class
FakeFuchsiaFfx
implements
FuchsiaFfx
{
@override
Future
<
List
<
String
>>
list
({
Duration
timeout
})
async
{
...
...
packages/flutter_tools/test/general.shard/generate_localizations_test.dart
View file @
3fa355c9
...
...
@@ -39,11 +39,6 @@ const String singleEsMessageArbFileString = '''
{
"title": "Título"
}'''
;
const
String
twoEsMessageArbFileString
=
'''
{
"title": "Título",
"subtitle": "Subtitular"
}'''
;
const
String
singleZhMessageArbFileString
=
'''
{
"title": "标题"
...
...
packages/flutter_tools/test/general.shard/hot_test.dart
View file @
3fa355c9
...
...
@@ -27,42 +27,8 @@ import 'package:vm_service/vm_service.dart' as vm_service;
import
'../src/common.dart'
;
import
'../src/context.dart'
;
import
'../src/fake_vm_services.dart'
;
import
'../src/fakes.dart'
;
final
vm_service
.
Isolate
fakeUnpausedIsolate
=
vm_service
.
Isolate
(
id:
'1'
,
pauseEvent:
vm_service
.
Event
(
kind:
vm_service
.
EventKind
.
kResume
,
timestamp:
0
),
breakpoints:
<
vm_service
.
Breakpoint
>[],
exceptionPauseMode:
null
,
libraries:
<
vm_service
.
LibraryRef
>[],
livePorts:
0
,
name:
'test'
,
number:
'1'
,
pauseOnExit:
false
,
runnable:
true
,
startTime:
0
,
isSystemIsolate:
false
,
isolateFlags:
<
vm_service
.
IsolateFlag
>[],
);
final
FlutterView
fakeFlutterView
=
FlutterView
(
id:
'a'
,
uiIsolate:
fakeUnpausedIsolate
,
);
final
FakeVmServiceRequest
listViews
=
FakeVmServiceRequest
(
method:
kListViewsMethod
,
jsonResponse:
<
String
,
Object
>{
'views'
:
<
Object
>[
fakeFlutterView
.
toJson
(),
],
},
);
void
main
(
)
{
group
(
'validateReloadReport'
,
()
{
testUsingContext
(
'invalid'
,
()
async
{
...
...
packages/flutter_tools/test/general.shard/integration_test_device_test.dart
View file @
3fa355c9
...
...
@@ -21,18 +21,6 @@ import '../src/context.dart';
import
'../src/fake_devices.dart'
;
import
'../src/fake_vm_services.dart'
;
final
Map
<
String
,
Object
>
vm
=
<
String
,
dynamic
>{
'isolates'
:
<
dynamic
>[
<
String
,
dynamic
>{
'type'
:
'@Isolate'
,
'fixedId'
:
true
,
'id'
:
'isolates/242098474'
,
'name'
:
'main.dart:main()'
,
'number'
:
242098474
,
},
],
};
final
vm_service
.
Isolate
isolate
=
vm_service
.
Isolate
(
id:
'1'
,
pauseEvent:
vm_service
.
Event
(
...
...
packages/flutter_tools/test/general.shard/macos/cocoapods_test.dart
View file @
3fa355c9
...
...
@@ -6,7 +6,6 @@
import
'package:file/file.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/platform.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
...
...
@@ -22,8 +21,6 @@ import '../../src/common.dart';
import
'../../src/context.dart'
;
import
'../../src/fake_process_manager.dart'
;
typedef
InvokeProcess
=
Future
<
ProcessResult
>
Function
();
void
main
(
)
{
FileSystem
fileSystem
;
FakeProcessManager
fakeProcessManager
;
...
...
packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart
View file @
3fa355c9
...
...
@@ -5,7 +5,6 @@
import
'package:file/file.dart'
;
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/project_migrator.dart'
;
import
'package:flutter_tools/src/macos/migrations/remove_macos_framework_link_and_embedding_migration.dart'
;
import
'package:flutter_tools/src/reporting/reporting.dart'
;
import
'package:flutter_tools/src/xcode_project.dart'
;
...
...
@@ -159,19 +158,3 @@ class FakeMacOSProject extends Fake implements MacOSProject {
@override
File
xcodeProjectInfoFile
=
MemoryFileSystem
.
test
().
file
(
'xcodeProjectInfoFile'
);
}
class
FakeMacOSMigrator
extends
ProjectMigrator
{
FakeMacOSMigrator
({
required
this
.
succeeds
})
:
super
(
BufferLogger
.
test
());
final
bool
succeeds
;
@override
bool
migrate
()
{
return
succeeds
;
}
@override
String
migrateLine
(
String
line
)
{
return
line
;
}
}
packages/flutter_tools/test/general.shard/resident_devtools_handler_test.dart
View file @
3fa355c9
...
...
@@ -48,21 +48,6 @@ final vm_service.Isolate isolate = vm_service.Isolate(
extensionRPCs:
<
String
>[
'ext.flutter.connectedVmServiceUri'
],
);
final
vm_service
.
VM
fakeVM
=
vm_service
.
VM
(
isolates:
<
vm_service
.
IsolateRef
>[
isolate
],
pid:
1
,
hostCPU:
''
,
isolateGroups:
<
vm_service
.
IsolateGroupRef
>[],
targetCPU:
''
,
startTime:
0
,
name:
'dart'
,
architectureBits:
64
,
operatingSystem:
''
,
version:
''
,
systemIsolateGroups:
<
vm_service
.
IsolateGroupRef
>[],
systemIsolates:
<
vm_service
.
IsolateRef
>[],
);
final
FakeVmServiceRequest
listViews
=
FakeVmServiceRequest
(
method:
kListViewsMethod
,
jsonResponse:
<
String
,
Object
>{
...
...
packages/flutter_tools/test/general.shard/terminal_handler_test.dart
View file @
3fa355c9
...
...
@@ -52,21 +52,6 @@ final vm_service.Isolate fakeUnpausedIsolate = vm_service.Isolate(
isolateFlags:
<
vm_service
.
IsolateFlag
>[],
);
final
vm_service
.
VM
fakeVM
=
vm_service
.
VM
(
isolates:
<
vm_service
.
IsolateRef
>[
fakeUnpausedIsolate
],
pid:
1
,
hostCPU:
''
,
isolateGroups:
<
vm_service
.
IsolateGroupRef
>[],
targetCPU:
''
,
startTime:
0
,
name:
'dart'
,
architectureBits:
64
,
operatingSystem:
''
,
version:
''
,
systemIsolateGroups:
<
vm_service
.
IsolateGroupRef
>[],
systemIsolates:
<
vm_service
.
IsolateRef
>[],
);
final
FlutterView
fakeFlutterView
=
FlutterView
(
id:
'a'
,
uiIsolate:
fakeUnpausedIsolate
,
...
...
packages/flutter_tools/test/general.shard/vmservice_test.dart
View file @
3fa355c9
...
...
@@ -11,7 +11,6 @@ import 'package:flutter_tools/src/base/io.dart' as io;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:flutter_tools/src/version.dart'
;
import
'package:flutter_tools/src/vmservice.dart'
;
import
'package:test/fake.dart'
;
import
'package:vm_service/vm_service.dart'
as
vm_service
;
...
...
@@ -20,31 +19,6 @@ import '../src/common.dart';
import
'../src/context.dart'
hide
testLogger
;
import
'../src/fake_vm_services.dart'
;
final
Map
<
String
,
Object
>
vm
=
<
String
,
dynamic
>{
'type'
:
'VM'
,
'name'
:
'vm'
,
'architectureBits'
:
64
,
'targetCPU'
:
'x64'
,
'hostCPU'
:
' Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz'
,
'version'
:
'2.1.0-dev.7.1.flutter-45f9462398 (Fri Oct 19 19:27:56 2018 +0000) on "linux_x64"'
,
'_profilerMode'
:
'Dart'
,
'_nativeZoneMemoryUsage'
:
0
,
'pid'
:
103707
,
'startTime'
:
1540426121876
,
'_embedder'
:
'Flutter'
,
'_maxRSS'
:
312614912
,
'_currentRSS'
:
33091584
,
'isolates'
:
<
dynamic
>[
<
String
,
dynamic
>{
'type'
:
'@Isolate'
,
'fixedId'
:
true
,
'id'
:
'isolates/242098474'
,
'name'
:
'main.dart:main()'
,
'number'
:
242098474
,
},
],
};
const
String
kExtensionName
=
'ext.flutter.test.interestingExtension'
;
final
vm_service
.
Isolate
isolate
=
vm_service
.
Isolate
(
...
...
@@ -87,8 +61,6 @@ final FakeVmServiceRequest listViewsRequest = FakeVmServiceRequest(
},
);
typedef
ServiceCallback
=
Future
<
Map
<
String
,
dynamic
>>
Function
(
Map
<
String
,
Object
>);
void
main
(
)
{
testWithoutContext
(
'VmService registers reloadSources'
,
()
async
{
Future
<
void
>
reloadSources
(
String
isolateId
,
{
bool
pause
,
bool
force
})
async
{}
...
...
@@ -880,11 +852,6 @@ class MockVMService extends Fake implements vm_service.VmService {
// ignore: avoid_implementing_value_types
class
FakeDevice
extends
Fake
implements
Device
{
}
class
FakeFlutterVersion
extends
Fake
implements
FlutterVersion
{
@override
Map
<
String
,
Object
>
toJson
()
=>
const
<
String
,
Object
>{
'Fake'
:
'Version'
};
}
/// A [WebSocketConnector] that always throws an [io.SocketException].
Future
<
io
.
WebSocket
>
failingWebSocketConnector
(
String
url
,
{
...
...
packages/flutter_tools/test/general.shard/windows/plugins_test.dart
View file @
3fa355c9
...
...
@@ -16,20 +16,6 @@ import '../../src/common.dart';
const
TemplateRenderer
renderer
=
MustacheTemplateRenderer
();
const
String
kPluginDependencies
=
r''
'
{
"info":"This is a generated file; do not edit or check into version control.",
"plugins":{
"windows":[
{
"name":"example","path":"C:
\\\\
example
\\\\
",
"dependencies":[]
}
]
}
}
'''
;
void
main
(
)
{
testWithoutContext
(
'Win32 injects Win32 plugins'
,
()
async
{
...
...
packages/flutter_tools/test/integration.shard/debug_adapter/test_support.dart
View file @
3fa355c9
...
...
@@ -31,7 +31,6 @@ final bool useInProcessDap = Platform.environment['DAP_TEST_INTERNAL'] == 'true'
/// Service traffic (wrapped in a custom 'dart.log' event).
final
bool
verboseLogging
=
Platform
.
environment
[
'DAP_TEST_VERBOSE'
]
==
'true'
;
const
String
startOfErrorOutputMarker
=
'══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════'
;
const
String
endOfErrorOutputMarker
=
'════════════════════════════════════════════════════════════════════════════════════════════════════'
;
/// Expects the lines in [actual] to match the relevant matcher in [expected],
...
...
packages/flutter_tools/test/integration.shard/test_utils.dart
View file @
3fa355c9
...
...
@@ -54,15 +54,6 @@ test:${fileSystem.path.join(fileSystem.currentDirectory.path, 'lib')}/
'''
);
}
void
writePubspec
(
String
folder
)
{
writeFile
(
fileSystem
.
path
.
join
(
folder
,
'pubspec.yaml'
),
'''
name: test
dependencies:
flutter:
sdk: flutter
'''
);
}
Future
<
void
>
getPackages
(
String
folder
)
async
{
final
List
<
String
>
command
=
<
String
>[
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
),
...
...
packages/flutter_tools/test/src/context.dart
View file @
3fa355c9
...
...
@@ -51,9 +51,6 @@ export 'fake_process_manager.dart' show ProcessManager, FakeProcessManager, Fake
BufferLogger
get
testLogger
=>
context
.
get
<
Logger
>()
as
BufferLogger
;
FakeDeviceManager
get
testDeviceManager
=>
context
.
get
<
DeviceManager
>()
as
FakeDeviceManager
;
FakeDoctor
get
testDoctor
=>
context
.
get
<
Doctor
>()
as
FakeDoctor
;
typedef
ContextInitializer
=
void
Function
(
AppContext
testContext
);
@isTest
void
testUsingContext
(
...
...
packages/flutter_tools/test/src/custom_devices_common.dart
View file @
3fa355c9
...
...
@@ -38,14 +38,6 @@ final CustomDeviceConfig testConfig = CustomDeviceConfig(
forwardPortSuccessRegex:
RegExp
(
'testforwardportsuccess'
)
);
const
String
testConfigPingSuccessOutput
=
'testpingsuccess
\n
'
;
const
String
testConfigForwardPortSuccessOutput
=
'testforwardportsuccess
\n
'
;
final
CustomDeviceConfig
disabledTestConfig
=
testConfig
.
copyWith
(
enabled:
false
);
final
CustomDeviceConfig
testConfigNonForwarding
=
testConfig
.
copyWith
(
explicitForwardPortCommand:
true
,
explicitForwardPortSuccessRegex:
true
,
);
const
Map
<
String
,
dynamic
>
testConfigJson
=
<
String
,
dynamic
>{
'id'
:
'testid'
,
'label'
:
'testlabel'
,
...
...
packages/flutter_tools/test/src/fakes.dart
View file @
3fa355c9
...
...
@@ -68,51 +68,6 @@ class FakeProcess implements Process {
}
}
/// A process that prompts the user to proceed, then asynchronously writes
/// some lines to stdout before it exits.
class
PromptingProcess
implements
Process
{
PromptingProcess
({
bool
stdinError
=
false
,
})
:
_stdin
=
CompleterIOSink
(
throwOnAdd:
stdinError
);
Future
<
void
>
showPrompt
(
String
prompt
,
List
<
String
>
outputLines
)
async
{
try
{
_stdoutController
.
add
(
utf8
.
encode
(
prompt
));
final
List
<
int
>
bytesOnStdin
=
await
_stdin
.
future
;
// Echo stdin to stdout.
_stdoutController
.
add
(
bytesOnStdin
);
if
(
bytesOnStdin
.
isNotEmpty
&&
bytesOnStdin
[
0
]
==
utf8
.
encode
(
'y'
)[
0
])
{
for
(
final
String
line
in
outputLines
)
{
_stdoutController
.
add
(
utf8
.
encode
(
'
$line
\n
'
));
}
}
}
finally
{
await
_stdoutController
.
close
();
}
}
final
StreamController
<
List
<
int
>>
_stdoutController
=
StreamController
<
List
<
int
>>();
final
CompleterIOSink
_stdin
;
@override
Stream
<
List
<
int
>>
get
stdout
=>
_stdoutController
.
stream
;
@override
Stream
<
List
<
int
>>
get
stderr
=>
const
Stream
<
List
<
int
>>.
empty
();
@override
IOSink
get
stdin
=>
_stdin
;
@override
Future
<
int
>
get
exitCode
async
{
await
_stdoutController
.
done
;
return
0
;
}
@override
dynamic
noSuchMethod
(
Invocation
invocation
)
=>
null
;
}
/// An IOSink that completes a future with the first line written to it.
class
CompleterIOSink
extends
MemoryIOSink
{
CompleterIOSink
({
...
...
@@ -480,19 +435,6 @@ class TestFeatureFlags implements FeatureFlags {
}
}
class
FakeStatusLogger
extends
DelegatingLogger
{
FakeStatusLogger
(
super
.
delegate
);
late
Status
status
;
@override
Status
startProgress
(
String
message
,
{
String
?
progressId
,
bool
multilineOutput
=
false
,
int
progressIndicatorPadding
=
kDefaultStatusPadding
,
})
=>
status
;
}
class
FakeOperatingSystemUtils
extends
Fake
implements
OperatingSystemUtils
{
FakeOperatingSystemUtils
({
this
.
hostPlatform
=
HostPlatform
.
linux_x64
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment