167#if defined(OS_FUCHSIA)
169 <<
"This test fails after the CF V2 migration. https://fxbug.dev/110019 ";
175 std::string dart_isolate_time_str;
177 dart_isolate_time_str =
184 bool continue_fixture =
true;
188 fixture_latch.
Wait();
190 args, continue_fixture);
193 auto settings = CreateSettingsForFixture();
195 configuration.SetEntrypoint(
"timezonesChange");
197 std::unique_ptr<Shell> shell = CreateShell(settings);
198 ASSERT_NE(shell.get(),
nullptr);
200 RunEngine(shell.get(), std::move(configuration));
205 SetTimezone(GetLocalTimezone());
206 AssertTimezone(GetLocalTimezone(), GetSettings());
207 std::string expected = GetLocalTime();
208 std::string actual =
"undefined";
209 RunCoroutineWithRetry(10, &fixture_latch, &latch, [&]() {
210 actual = dart_isolate_time_str;
211 FML_LOG(INFO) <<
"reference: " << expected <<
", actual: " << actual;
212 return expected == actual;
214 ASSERT_EQ(expected, actual)
215 <<
"The Dart isolate was expected to show the same time as the test "
216 <<
"fixture eventually, but that didn't happen after multiple retries.";
219 SetTimezone(
"America/New_York");
220 AssertTimezone(
"America/New_York", GetSettings());
221 RunCoroutineWithRetry(10, &fixture_latch, &latch, [&]() {
222 actual = dart_isolate_time_str;
223 FML_LOG(INFO) <<
"reference: " << expected <<
", actual: " << actual;
224 return expected != actual;
226 ASSERT_NE(expected, actual)
227 <<
"The Dart isolate was expected to show a time different from the test "
228 <<
"fixture eventually, but that didn't happen after multiple retries.";
232 SetTimezone(
"Europe/Amsterdam");
233 AssertTimezone(
"Europe/Amsterdam", GetSettings());
234 RunCoroutineWithRetry(10, &fixture_latch, &latch, [&]() {
235 actual = dart_isolate_time_str;
236 FML_LOG(INFO) <<
"reference: " << expected <<
", actual: " << actual;
237 return expected != actual;
239 ASSERT_NE(expected, actual)
240 <<
"The Dart isolate was expected to show a time different from the "
241 <<
"prior timezone eventually, but that didn't happen after multiple "
246 SetTimezone(
"America/New_York");
247 AssertTimezone(
"America/New_York", GetSettings());
248 RunCoroutineWithRetry(10, &fixture_latch, &latch, [&]() {
249 actual = dart_isolate_time_str;
250 FML_LOG(INFO) <<
"reference: " << expected <<
", actual: " << actual;
251 return expected != actual;
253 ASSERT_NE(expected, actual)
254 <<
"The Dart isolate was expected to show a time different from the "
255 <<
"prior timezone eventually, but that didn't happen after multiple "
260 continue_fixture =
false;
262 DestroyShell(std::move(shell));
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...