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
9b4159c5
Unverified
Commit
9b4159c5
authored
Feb 28, 2020
by
Jonah Williams
Committed by
GitHub
Feb 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] support run -d chrome test scripts (#51658)
parent
266742e1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
6 deletions
+49
-6
test.dart
dev/bots/test.dart
+5
-3
a.dart
dev/integration_tests/web/lib/a.dart
+5
-0
b.dart
dev/integration_tests/web/lib/b.dart
+5
-0
c.dart
dev/integration_tests/web/lib/c.dart
+5
-0
d.dart
dev/integration_tests/web/lib/d.dart
+5
-0
test.dart
dev/integration_tests/web/test/test.dart
+16
-0
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+7
-1
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+1
-2
No files found.
dev/bots/test.dart
View file @
9b4159c5
...
...
@@ -590,7 +590,8 @@ Future<void> _runWebUnitTests() async {
Future
<
void
>
_runWebIntegrationTests
()
async
{
await
_runWebStackTraceTest
(
'profile'
);
await
_runWebStackTraceTest
(
'release'
);
await
_runWebDebugStackTraceTest
();
await
_runWebDebugTest
(
'lib/stack_trace.dart'
);
await
_runWebDebugTest
(
'test/test.dart'
);
}
Future
<
void
>
_runWebStackTraceTest
(
String
buildMode
)
async
{
...
...
@@ -636,7 +637,7 @@ Future<void> _runWebStackTraceTest(String buildMode) async {
/// Debug mode is special because `flutter build web` doesn't build in debug mode.
///
/// Instead, we use `flutter run --debug` and sniff out the standard output.
Future
<
void
>
_runWebDebug
StackTraceTest
(
)
async
{
Future
<
void
>
_runWebDebug
Test
(
String
target
)
async
{
final
String
testAppDirectory
=
path
.
join
(
flutterRoot
,
'dev'
,
'integration_tests'
,
'web'
);
final
CapturedOutput
output
=
CapturedOutput
();
bool
success
=
false
;
...
...
@@ -648,7 +649,8 @@ Future<void> _runWebDebugStackTraceTest() async {
'-d'
,
'chrome'
,
'--web-run-headless'
,
'lib/stack_trace.dart'
,
'-t'
,
target
,
],
output:
output
,
outputMode:
OutputMode
.
capture
,
...
...
dev/integration_tests/web/lib/a.dart
0 → 100644
View file @
9b4159c5
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const
String
message
=
'a'
;
dev/integration_tests/web/lib/b.dart
0 → 100644
View file @
9b4159c5
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const
String
message
=
'b'
;
dev/integration_tests/web/lib/c.dart
0 → 100644
View file @
9b4159c5
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const
String
message
=
'c'
;
dev/integration_tests/web/lib/d.dart
0 → 100644
View file @
9b4159c5
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const
String
message
=
'd'
;
dev/integration_tests/web/test/test.dart
0 → 100644
View file @
9b4159c5
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:web_integration/a.dart'
if
(
dart
.
library
.
io
)
'package:web_integration/b.dart'
as
message1
;
import
'package:web_integration/c.dart'
if
(
dart
.
library
.
html
)
'package:web_integration/d.dart'
as
message2
;
void
main
(
)
{
if
(
message1
.
message
==
'a'
&&
message2
.
message
==
'd'
)
{
print
(
'--- TEST SUCCEEDED ---'
);
}
else
{
print
(
'--- TEST FAILED ---'
);
}
}
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
9b4159c5
...
...
@@ -573,7 +573,13 @@ class _ResidentWebRunner extends ResidentWebRunner {
.
childFile
(
'generated_plugin_registrant.dart'
)
.
absolute
.
path
;
final
Uri
generatedImport
=
packageUriMapper
.
map
(
generatedPath
);
final
String
importedEntrypoint
=
packageUriMapper
.
map
(
main
).
toString
()
??
'file://
$main
'
;
String
importedEntrypoint
=
packageUriMapper
.
map
(
main
)?.
toString
();
// Special handling for entrypoints that are not under lib, such as test scripts.
if
(
importedEntrypoint
==
null
)
{
final
String
parent
=
globals
.
fs
.
file
(
main
).
parent
.
path
;
flutterDevices
.
first
.
generator
.
addFileSystemRoot
(
parent
);
importedEntrypoint
=
'org-dartlang-app:///
${globals.fs.path.basename(main)}
'
;
}
final
String
entrypoint
=
<
String
>[
'import "
$importedEntrypoint
" as entrypoint;'
,
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
9b4159c5
...
...
@@ -427,9 +427,8 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
}));
test
(
'web resident runner is
s
debuggable'
,
()
=>
testbed
.
run
(()
{
test
(
'web resident runner is debuggable'
,
()
=>
testbed
.
run
(()
{
expect
(
residentWebRunner
.
debuggingEnabled
,
true
);
},
overrides:
<
Type
,
Generator
>{
}));
test
(
'Exits when initial compile fails'
,
()
=>
testbed
.
run
(()
async
{
...
...
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