Definition at line 271 of file shell_unittests.cc.
◆ ThreadCheckingAssetResolver()
flutter::testing::ThreadCheckingAssetResolver::ThreadCheckingAssetResolver |
( |
std::shared_ptr< fml::ConcurrentMessageLoop > |
concurrent_loop | ) |
|
|
inlineexplicit |
◆ GetAsMapping()
std::unique_ptr< fml::Mapping > flutter::testing::ThreadCheckingAssetResolver::GetAsMapping |
( |
const std::string & |
asset_name | ) |
const |
|
inlineoverridevirtual |
Implements flutter::AssetResolver.
Definition at line 289 of file shell_unittests.cc.
290 {
291 if (asset_name == "FontManifest.json") {
292
293 return nullptr;
294 }
296 EXPECT_TRUE(concurrent_loop_->RunsTasksOnCurrentThread())
298 return nullptr;
299 }
std::vector< std::string > mapping_requests
std::string BacktraceHere(size_t offset)
#define EXPECT_TRUE(handle)
◆ GetType()
◆ IsValid()
bool flutter::testing::ThreadCheckingAssetResolver::IsValid |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ IsValidAfterAssetManagerChange()
bool flutter::testing::ThreadCheckingAssetResolver::IsValidAfterAssetManagerChange |
( |
| ) |
const |
|
inlineoverridevirtual |
Certain asset resolvers are still valid after the asset manager is replaced before a hot reload, or after a new run configuration is created during a hot restart. By preserving these resolvers and re-inserting them into the new resolver or run configuration, the tooling can avoid needing to sync all application assets through the Dart devFS upon connecting to the VM Service. Besides improving the startup performance of running a Flutter application, it also reduces the occurrence of tool failures due to repeated network flakes caused by damaged cables or hereto unknown bugs in the Dart HTTP server implementation.
- Returns
- Returns whether this resolver is valid after the asset manager or run configuration is updated.
Implements flutter::AssetResolver.
Definition at line 281 of file shell_unittests.cc.
◆ operator==()
bool flutter::testing::ThreadCheckingAssetResolver::operator== |
( |
const AssetResolver & |
other | ) |
const |
|
inlineoverridevirtual |
◆ mapping_requests
std::vector<std::string> flutter::testing::ThreadCheckingAssetResolver::mapping_requests |
|
mutable |
The documentation for this class was generated from the following file: