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
7a0b4669
Unverified
Commit
7a0b4669
authored
Jul 12, 2021
by
Jonah Williams
Committed by
GitHub
Jul 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] switch web integration tests to use html (#85325)
parent
d6a84436
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
17 deletions
+23
-17
hot_reload_project.dart
.../test/integration.shard/test_data/hot_reload_project.dart
+10
-1
debugger_stepping_web_test.dart
...tter_tools/test/web.shard/debugger_stepping_web_test.dart
+2
-3
expression_evaluation_web_test.dart
..._tools/test/web.shard/expression_evaluation_web_test.dart
+4
-6
hot_reload_web_test.dart
...ges/flutter_tools/test/web.shard/hot_reload_web_test.dart
+2
-2
vm_service_web_test.dart
...ges/flutter_tools/test/web.shard/vm_service_web_test.dart
+4
-4
web_run_test.dart
packages/flutter_tools/test/web.shard/web_run_test.dart
+1
-1
No files found.
packages/flutter_tools/test/integration.shard/test_data/hot_reload_project.dart
View file @
7a0b4669
...
...
@@ -25,12 +25,21 @@ class HotReloadProject extends Project {
import '
package:
flutter
/
scheduler
.
dart
';
import '
package:
flutter
/
services
.
dart
';
import '
package:
flutter
/
widgets
.
dart
';
import '
package:
flutter
/
foundation
.
dart
';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final ByteData message = const StringCodec().encodeMessage('
AppLifecycleState
.
resumed
')!;
await ServicesBinding.instance!.defaultBinaryMessenger.handlePlatformMessage('
flutter
/
lifecycle
', message, (_) { });
runApp(MyApp());
// See https://github.com/flutter/flutter/issues/86202
if (kIsWeb) {
while (true) {
runApp(MyApp());
await Future.delayed(const Duration(seconds: 1));
}
} else {
runApp(MyApp());
}
}
int count = 1;
...
...
packages/flutter_tools/test/web.shard/debugger_stepping_web_test.dart
View file @
7a0b4669
...
...
@@ -27,7 +27,7 @@ void main() {
await
flutter
.
run
(
withDebugger:
true
,
startPaused:
true
,
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
await
flutter
.
addBreakpoint
(
_project
.
breakpointUri
,
_project
.
breakpointLine
);
await
flutter
.
resume
();
await
flutter
.
waitForPause
();
// Now we should be on the breakpoint.
...
...
@@ -48,8 +48,7 @@ void main() {
reason:
'After
$i
steps, debugger should stop at
$expectedLine
but stopped at
$actualLine
'
);
}
},
skip:
true
,
// Flaky: https://github.com/flutter/flutter/issues/83260
);
});
tearDown
(()
async
{
await
flutter
.
stop
();
...
...
packages/flutter_tools/test/web.shard/expression_evaluation_web_test.dart
View file @
7a0b4669
...
...
@@ -36,7 +36,7 @@ void main() {
await
flutter
.
run
(
withDebugger:
true
,
chrome:
true
,
expressionEvaluation:
expressionEvaluation
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
}
Future
<
void
>
breakInBuildMethod
(
FlutterTestDriver
flutter
)
async
{
...
...
@@ -104,8 +104,7 @@ void main() {
await
start
(
expressionEvaluation:
true
);
await
evaluateComplexExpressionsInLibrary
(
flutter
);
});
},
skip:
true
,
// Flaky tests: https://github.com/flutter/flutter/issues/84012
);
});
group
(
'Flutter test for web'
,
()
{
final
TestsProject
project
=
TestsProject
();
...
...
@@ -140,7 +139,7 @@ void main() {
withDebugger:
true
,
chrome:
true
,
expressionEvaluation:
expressionEvaluation
,
startPaused:
true
,
script:
project
.
testFilePath
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
}
testWithoutContext
(
'cannot evaluate expressions if feature is disabled'
,
()
async
{
...
...
@@ -170,8 +169,7 @@ void main() {
await
startPaused
(
expressionEvaluation:
true
);
await
evaluateComplexExpressionsInLibrary
(
flutter
);
});
},
skip:
true
,
// Flaky tests: https://github.com/flutter/flutter/issues/84012
);
});
}
Future
<
void
>
failToEvaluateExpression
(
FlutterTestDriver
flutter
)
async
{
...
...
packages/flutter_tools/test/web.shard/hot_reload_web_test.dart
View file @
7a0b4669
...
...
@@ -31,7 +31,7 @@ void main() {
});
testWithoutContext
(
'hot restart works without error'
,
()
async
{
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
await
flutter
.
hotRestart
();
});
...
...
@@ -43,7 +43,7 @@ void main() {
completer
.
complete
();
}
});
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
project
.
uncommentHotReloadPrint
();
try
{
await
flutter
.
hotRestart
();
...
...
packages/flutter_tools/test/web.shard/vm_service_web_test.dart
View file @
7a0b4669
...
...
@@ -36,7 +36,7 @@ void main() {
testWithoutContext
(
'can validate flutter version'
,
()
async
{
await
flutter
.
run
(
withDebugger:
true
,
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
expect
(
flutter
.
vmServiceWsUri
,
isNotNull
);
...
...
@@ -48,7 +48,7 @@ void main() {
testWithoutContext
(
'can validate flutter version in parallel'
,
()
async
{
await
flutter
.
run
(
withDebugger:
true
,
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
expect
(
flutter
.
vmServiceWsUri
,
isNotNull
);
...
...
@@ -80,7 +80,7 @@ void main() {
testWithoutContext
(
'can validate flutter version'
,
()
async
{
await
flutter
.
run
(
withDebugger:
true
,
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
expect
(
flutter
.
vmServiceWsUri
,
isNotNull
);
...
...
@@ -93,7 +93,7 @@ void main() {
testWithoutContext
(
'can validate flutter version in parallel'
,
()
async
{
await
flutter
.
run
(
withDebugger:
true
,
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
expect
(
flutter
.
vmServiceWsUri
,
isNotNull
);
...
...
packages/flutter_tools/test/web.shard/web_run_test.dart
View file @
7a0b4669
...
...
@@ -29,6 +29,6 @@ void main() {
});
testWithoutContext
(
'flutter run works on web devices with a unary main function'
,
()
async
{
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
]);
await
flutter
.
run
(
chrome:
true
,
additionalCommandArgs:
<
String
>[
'--verbose'
,
'--web-renderer=html'
]);
});
}
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