Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit a3326dc

Browse files
committed
Feedback
1 parent c7b30d9 commit a3326dc

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lib/ui/window/platform_configuration.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ void PlatformConfiguration::DidCreateIsolate() {
7373
// TODO(loicsharma): This should only be created if the embedder enables the
7474
// implicit view.
7575
// See: https://github.com/flutter/flutter/issues/120306
76-
windows_.insert(
77-
std::make_pair(kImplicitViewId,
78-
std::make_unique<Window>(
79-
kImplicitViewId, ViewportMetrics{1.0, 0.0, 0.0, -1})));
76+
windows_.emplace(kImplicitViewId,
77+
std::make_unique<Window>(
78+
kImplicitViewId, ViewportMetrics{1.0, 0.0, 0.0, -1}));
8079
}
8180

8281
void PlatformConfiguration::UpdateLocales(

shell/platform/embedder/tests/embedder_unittests.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ TEST_F(EmbedderTest, ExecutableNameNotNull) {
177177
TEST_F(EmbedderTest, ImplicitViewNotNull) {
178178
auto& context = GetEmbedderContext(EmbedderTestContextType::kSoftwareContext);
179179

180+
bool implicitViewNotNull = false;
180181
fml::AutoResetWaitableEvent latch;
181182
context.AddNativeCallback(
182183
"NotifyBoolValue", CREATE_NATIVE_ENTRY([&](Dart_NativeArguments args) {
183-
const auto dart_bool = tonic::DartConverter<bool>::FromDart(
184+
implicitViewNotNull = tonic::DartConverter<bool>::FromDart(
184185
Dart_GetNativeArgument(args, 0));
185-
EXPECT_TRUE(dart_bool);
186186
latch.Signal();
187187
}));
188188

@@ -191,6 +191,8 @@ TEST_F(EmbedderTest, ImplicitViewNotNull) {
191191
builder.SetDartEntrypoint("implicitViewNotNull");
192192
auto engine = builder.LaunchEngine();
193193
latch.Wait();
194+
195+
EXPECT_TRUE(implicitViewNotNull);
194196
}
195197

196198
std::atomic_size_t EmbedderTestTaskRunner::sEmbedderTaskRunnerIdentifiers = {};

0 commit comments

Comments
 (0)