Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions shell/testing/tester_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ int RunTester(const blink::Settings& settings, bool run_forever) {
return EXIT_FAILURE;
}

// Initialize default testing locales. There is no platform to
// pass locales on the tester, so to retain expected locale behavior,
// we emulate it in here by passing in 'en_US' and 'zh_CN' as test locales.
const char* locale_json =
"{\"method\":\"setLocale\",\"args\":[\"en\",\"US\",\"\",\"\",\"zh\","
"\"CN\",\"\",\"\"]}";
std::vector<uint8_t> locale_bytes(locale_json,
locale_json + std::strlen(locale_json));
fml::RefPtr<blink::PlatformMessageResponse> response;
shell->GetPlatformView()->DispatchPlatformMessage(
fml::MakeRefCounted<blink::PlatformMessage>("flutter/localization",
locale_bytes, response));

std::initializer_list<fml::FileMapping::Protection> protection = {
fml::FileMapping::Protection::kRead};
auto main_dart_file_mapping = std::make_unique<fml::FileMapping>(
Expand Down