Skip to content

Commit

Permalink
Update the Fuchsia runner to use fpromise instead of fit::promise (fl…
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Jul 15, 2021
1 parent bdaaa4f commit 84247f2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/accessibility_bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ AccessibilityBridge::AccessibilityBridge(
inspector.GetRoot().CreateChild(kTreeDumpInspectRootName),
&inspector);
}
return fit::make_ok_promise(std::move(inspector));
return fpromise::make_ok_promise(std::move(inspector));
});
#endif // !FLUTTER_RELEASE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AccessibilityBridgeTest : public testing::Test {
loop_.ResetQuit();
}

void RunPromiseToCompletion(fit::promise<> promise) {
void RunPromiseToCompletion(fpromise::promise<> promise) {
bool done = false;
executor_.schedule_task(
std::move(promise).and_then([&done]() { done = true; }));
Expand Down Expand Up @@ -1013,11 +1013,11 @@ TEST_F(AccessibilityBridgeTest, InspectData) {
accessibility_bridge_->AddSemanticsNodeUpdate(std::move(updates), 1.f);
RunLoopUntilIdle();

fit::result<inspect::Hierarchy> hierarchy;
fpromise::result<inspect::Hierarchy> hierarchy;
ASSERT_FALSE(hierarchy.is_ok());
RunPromiseToCompletion(
inspect::ReadFromInspector(*inspector_)
.then([&hierarchy](fit::result<inspect::Hierarchy>& result) {
.then([&hierarchy](fpromise::result<inspect::Hierarchy>& result) {
hierarchy = std::move(result);
}));
ASSERT_TRUE(hierarchy.is_ok());
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/fuchsia/flutter/runner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ Runner::Runner(fml::RefPtr<fml::TaskRunner> task_runner,
name = out[0].name;
}
inspector.GetRoot().CreateString("vm_service_port", name, &inspector);
return fit::make_ok_promise(inspector);
return fpromise::make_ok_promise(inspector);
},
inspector);

Expand Down

0 comments on commit 84247f2

Please sign in to comment.