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
674254c0
Unverified
Commit
674254c0
authored
Feb 17, 2023
by
Jackson Gardner
Committed by
GitHub
Feb 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always use the testbed in web_test.dart so `environment` is populated. (#120984)
parent
298d8c76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
web_test.dart
...ols/test/general.shard/build_system/targets/web_test.dart
+8
-8
No files found.
packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart
View file @
674254c0
...
...
@@ -784,7 +784,7 @@ void main() {
ProcessManager:
()
=>
processManager
,
}));
test
(
'Generated service worker is empty with none-strategy'
,
()
{
test
(
'Generated service worker is empty with none-strategy'
,
()
=>
testbed
.
run
(()
{
final
String
fileGeneratorsPath
=
environment
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterToolsFileGenerators
);
final
String
result
=
generateServiceWorker
(
...
...
@@ -795,9 +795,9 @@ void main() {
);
expect
(
result
,
''
);
});
})
)
;
test
(
'Generated service worker correctly inlines file hashes'
,
()
{
test
(
'Generated service worker correctly inlines file hashes'
,
()
=>
testbed
.
run
(()
{
final
String
fileGeneratorsPath
=
environment
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterToolsFileGenerators
);
final
String
result
=
generateServiceWorker
(
...
...
@@ -808,9 +808,9 @@ void main() {
);
expect
(
result
,
contains
(
'{"/foo": "abcd"};'
));
});
})
)
;
test
(
'Generated service worker includes core files'
,
()
{
test
(
'Generated service worker includes core files'
,
()
=>
testbed
.
run
(()
{
final
String
fileGeneratorsPath
=
environment
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterToolsFileGenerators
);
final
String
result
=
generateServiceWorker
(
...
...
@@ -821,7 +821,7 @@ void main() {
);
expect
(
result
,
contains
(
'"foo",
\n
"bar"'
));
});
})
)
;
test
(
'WebServiceWorker generates a service_worker for a web resource folder'
,
()
=>
testbed
.
run
(()
async
{
environment
.
outputDir
.
childDirectory
(
'a'
).
childFile
(
'a.txt'
)
...
...
@@ -874,7 +874,7 @@ void main() {
contains
(
'"main.dart.js"'
));
}));
test
(
'flutter.js sanity checks'
,
()
{
test
(
'flutter.js sanity checks'
,
()
=>
testbed
.
run
(()
{
final
String
fileGeneratorsPath
=
environment
.
artifacts
.
getArtifactPath
(
Artifact
.
flutterToolsFileGenerators
);
final
String
flutterJsContents
=
...
...
@@ -887,7 +887,7 @@ void main() {
expect
(
flutterJsContents
,
contains
(
'const baseUri = '
));
expect
(
flutterJsContents
,
contains
(
'document.querySelector("base")'
));
expect
(
flutterJsContents
,
contains
(
'.getAttribute("href")'
));
});
})
)
;
test
(
'flutter.js is not dynamically generated'
,
()
=>
testbed
.
run
(()
async
{
globals
.
fs
.
file
(
'bin/cache/flutter_web_sdk/canvaskit/foo'
)
...
...
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