This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Get unit tests working with dart2wasm #38784
Merged
eyebrowsoffire
merged 40 commits into
flutter:main
from
eyebrowsoffire:wasm_unit_test_fixes
Jan 18, 2023
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
06f4920
Fixes for wasm unit tests.
eyebrowsoffire 3bb68e6
Some more unit test fixes.
eyebrowsoffire 011b5d5
More unit test fixes.
eyebrowsoffire 0f9ac30
More unit test fixes.
eyebrowsoffire 0e1a39d
Skip a few more tests due to async issues.
eyebrowsoffire f7b32a3
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire b3b7e43
More unit test fixes.
eyebrowsoffire 9f7479e
More unit test fixes.
eyebrowsoffire f33ef33
More unit test fixes.
eyebrowsoffire 15435ee
More unit test stuff.
eyebrowsoffire 6b7fb18
More unit test fixes.
eyebrowsoffire 5b7c587
More unit test fixes.
eyebrowsoffire 5e06d37
Remove debug print.
eyebrowsoffire 12f4310
More unit test fixes.
eyebrowsoffire 4f1ab64
More unit test fixes.
eyebrowsoffire f5077b4
Fix unit test.
eyebrowsoffire 23900e5
More unit test fixes.
eyebrowsoffire f5d4e04
Skipped or removed remaining tests.
eyebrowsoffire c5e6c95
Add skia client dimension to differentiate wasm from js.
eyebrowsoffire bedf2e3
Revert an accidental change.
eyebrowsoffire 4bd2b21
Remove stale workaround.
eyebrowsoffire aa914c6
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire 267138d
Fixups after the merge.
eyebrowsoffire c6edc91
Bump browser versions.
eyebrowsoffire 5e4d00d
Fix analyzer issues.
eyebrowsoffire 8f547f7
Revert an unnecessary change and update license files.
eyebrowsoffire 9cfd66e
Keep skipping text tests on Safari and Firefox.
eyebrowsoffire 1d38008
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire 6b48f55
Fix as per David's suggestion.
eyebrowsoffire 51e052a
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire 91f39d1
Enable RTL test that works now.
eyebrowsoffire f614ae3
Tweak some parameters to increase consistency.
eyebrowsoffire e2766ca
Some fixes as per Mouad's suggestions.
eyebrowsoffire 74a1122
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire 3e0ee0d
Remove workaround for JS object hashCode issues.
eyebrowsoffire c1d8e4e
Oops, messed up the interval tree implementation.
eyebrowsoffire 68ffc14
Fixup after Jonah's changes.
eyebrowsoffire ce23f7e
A few more fixups.
eyebrowsoffire faff65a
Merge branch 'main' into wasm_unit_test_fixes
eyebrowsoffire 16a472a
Unused import.
eyebrowsoffire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,6 +226,11 @@ bool get isFirefox => browserEngine == BrowserEngine.firefox; | |
/// Whether the current browser is Edge. | ||
bool get isEdge => domWindow.navigator.userAgent.contains('Edg/'); | ||
|
||
/// Whether we are running from a wasm module compiled with dart2wasm. | ||
/// Note: Currently the ffi library is available from dart2wasm but not dart2js | ||
/// or dartdevc. | ||
bool get isWasm => const bool.fromEnvironment('dart.library.ffi'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer this, because it's very clearly const. |
||
|
||
/// Use in tests to simulate the detection of iOS 15. | ||
bool? debugIsIOS15; | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means we may end up in a BROWSER x WASM x RENDERER kind of matrix, and I think we only care about BROWSER x MODE where MODE is much more limited than the full matrix. We only care about these modes:
We don't care about testing these:
But maybe it's OK to keep this more expressive than we need.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We definitely do care about testing
HTML-Wasm
andCanvasKit-Wasm
, at least right now. That's what this PR is actually doing, adding tests for those.