Fix typo and clean some includes (flutter/engine#29940)

This commit is contained in:
eggfly 2021-11-30 01:34:38 +08:00 committed by GitHub
parent d9e349481c
commit b87bbe9bc9
10 changed files with 10 additions and 31 deletions

View File

@ -7,7 +7,6 @@
#include <cstdlib>
#include <tuple>
#include "flutter/fml/paths.h"
#include "flutter/fml/posix_wrappers.h"
#include "flutter/fml/trace_event.h"
#include "flutter/lib/io/dart_io.h"

View File

@ -7,7 +7,6 @@
#include "flutter/fml/mapping.h"
#include "flutter/fml/synchronization/count_down_latch.h"
#include "flutter/fml/synchronization/waitable_event.h"
#include "flutter/fml/thread.h"
#include "flutter/runtime/dart_vm.h"
#include "flutter/runtime/dart_vm_lifecycle.h"
#include "flutter/runtime/isolate_configuration.h"
@ -336,7 +335,7 @@ TEST_F(DartSecondaryIsolateTest, CanLaunchSecondaryIsolates) {
// root isolate will be auto-shutdown
}
TEST_F(DartIsolateTest, CanRecieveArguments) {
TEST_F(DartIsolateTest, CanReceiveArguments) {
AddNativeCallback("NotifyNative",
CREATE_NATIVE_ENTRY(([this](Dart_NativeArguments args) {
ASSERT_TRUE(tonic::DartConverter<bool>::FromDart(
@ -354,7 +353,7 @@ TEST_F(DartIsolateTest, CanRecieveArguments) {
thread //
);
auto isolate = RunDartCodeInIsolate(vm_ref, settings, task_runners,
"testCanRecieveArguments", {"arg1"},
"testCanReceiveArguments", {"arg1"},
GetDefaultKernelFilePath());
ASSERT_TRUE(isolate);
ASSERT_EQ(isolate->get()->GetPhase(), DartIsolate::Phase::Running);

View File

@ -6,24 +6,18 @@
#include <sys/stat.h>
#include <mutex>
#include <sstream>
#include <vector>
#include "flutter/common/settings.h"
#include "flutter/fml/compiler_specific.h"
#include "flutter/fml/file.h"
#include "flutter/fml/logging.h"
#include "flutter/fml/mapping.h"
#include "flutter/fml/size.h"
#include "flutter/fml/synchronization/count_down_latch.h"
#include "flutter/fml/time/time_delta.h"
#include "flutter/fml/trace_event.h"
#include "flutter/lib/io/dart_io.h"
#include "flutter/lib/ui/dart_runtime_hooks.h"
#include "flutter/lib/ui/dart_ui.h"
#include "flutter/runtime/dart_isolate.h"
#include "flutter/runtime/dart_service_isolate.h"
#include "flutter/runtime/dart_vm_initializer.h"
#include "flutter/runtime/ptrace_check.h"
#include "third_party/dart/runtime/include/bin/dart_io_api.h"
@ -33,7 +27,6 @@
#include "third_party/tonic/dart_class_provider.h"
#include "third_party/tonic/file_loader/file_loader.h"
#include "third_party/tonic/logging/dart_error.h"
#include "third_party/tonic/scopes/dart_api_scope.h"
#include "third_party/tonic/typed_data/typed_list.h"
namespace dart {

View File

@ -65,7 +65,7 @@ void testCanLaunchSecondaryIsolate() {
}
@pragma('vm:entry-point')
void testCanRecieveArguments(List<String> args) {
void testCanReceiveArguments(List<String> args) {
notifyResult(args.length == 1 && args[0] == 'arg1');
}

View File

@ -11,12 +11,8 @@
#include <vector>
#include "flutter/common/settings.h"
#include "flutter/fml/eintr_wrapper.h"
#include "flutter/fml/file.h"
#include "flutter/fml/make_copyable.h"
#include "flutter/fml/paths.h"
#include "flutter/fml/trace_event.h"
#include "flutter/fml/unique_fd.h"
#include "flutter/lib/snapshot/snapshot.h"
#include "flutter/lib/ui/text/font_collection.h"
#include "flutter/shell/common/animator.h"
@ -24,8 +20,6 @@
#include "flutter/shell/common/shell.h"
#include "rapidjson/document.h"
#include "third_party/dart/runtime/include/dart_tools_api.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
namespace flutter {

View File

@ -253,11 +253,11 @@ void notifyNativeWhenEngineRun(bool success) native 'NotifyNativeWhenEngineRun';
void notifyNativeWhenEngineSpawn(bool success) native 'NotifyNativeWhenEngineSpawn';
@pragma('vm:entry-point')
void canRecieveArgumentsWhenEngineRun(List<String> args) {
void canReceiveArgumentsWhenEngineRun(List<String> args) {
notifyNativeWhenEngineRun(args.length == 2 && args[0] == 'foo' && args[1] == 'bar');
}
@pragma('vm:entry-point')
void canRecieveArgumentsWhenEngineSpawn(List<String> args) {
void canReceiveArgumentsWhenEngineSpawn(List<String> args) {
notifyNativeWhenEngineSpawn(args.length == 2 && args[0] == 'arg1' && args[1] == 'arg2');
}

View File

@ -20,7 +20,6 @@
#include "flutter/fml/message_loop.h"
#include "flutter/fml/paths.h"
#include "flutter/fml/trace_event.h"
#include "flutter/fml/unique_fd.h"
#include "flutter/runtime/dart_vm.h"
#include "flutter/shell/common/engine.h"
#include "flutter/shell/common/skia_event_tracer_impl.h"

View File

@ -4,8 +4,6 @@
#include "flutter/shell/common/shell_io_manager.h"
#include "flutter/common/graphics/persistent_cache.h"
#include "flutter/fml/build_config.h"
#include "flutter/fml/message_loop.h"
#include "flutter/shell/common/context_options.h"
#include "third_party/skia/include/gpu/gl/GrGLInterface.h"

View File

@ -6,15 +6,12 @@
#include <algorithm>
#include <ctime>
#include <functional>
#include <future>
#include <memory>
#include <vector>
#include "assets/directory_asset_bundle.h"
#include "common/graphics/persistent_cache.h"
#include "flutter/common/graphics/persistent_cache.h"
#include "flutter/flow/layers/layer_tree.h"
#include "flutter/flow/layers/picture_layer.h"
#include "flutter/flow/layers/transform_layer.h"
#include "flutter/fml/command_line.h"
@ -2863,13 +2860,13 @@ TEST_F(ShellTest, SpawnWithDartEntrypointArgs) {
auto configuration = RunConfiguration::InferFromSettings(settings);
ASSERT_TRUE(configuration.IsValid());
configuration.SetEntrypoint("canRecieveArgumentsWhenEngineRun");
configuration.SetEntrypoint("canReceiveArgumentsWhenEngineRun");
const std::vector<std::string> entrypoint_args{"foo", "bar"};
configuration.SetEntrypointArgs(entrypoint_args);
auto second_configuration = RunConfiguration::InferFromSettings(settings);
ASSERT_TRUE(second_configuration.IsValid());
second_configuration.SetEntrypoint("canRecieveArgumentsWhenEngineSpawn");
second_configuration.SetEntrypoint("canReceiveArgumentsWhenEngineSpawn");
const std::vector<std::string> second_entrypoint_args{"arg1", "arg2"};
second_configuration.SetEntrypointArgs(second_entrypoint_args);
@ -2902,7 +2899,7 @@ TEST_F(ShellTest, SpawnWithDartEntrypointArgs) {
main_latch.Wait();
ASSERT_TRUE(DartVMRef::IsInstanceRunning());
// Check first Shell ran the first entrypoint.
ASSERT_EQ("canRecieveArgumentsWhenEngineRun", last_entry_point);
ASSERT_EQ("canReceiveArgumentsWhenEngineRun", last_entry_point);
PostSync(
shell->GetTaskRunners().GetPlatformTaskRunner(),
@ -2926,7 +2923,7 @@ TEST_F(ShellTest, SpawnWithDartEntrypointArgs) {
PostSync(spawner->GetTaskRunners().GetUITaskRunner(),
[&spawn, &spawner, initial_route] {
// Check second shell ran the second entrypoint.
ASSERT_EQ("canRecieveArgumentsWhenEngineSpawn",
ASSERT_EQ("canReceiveArgumentsWhenEngineSpawn",
spawn->GetEngine()->GetLastEntrypoint());
ASSERT_EQ(initial_route, spawn->GetEngine()->InitialRoute());

View File

@ -245,7 +245,7 @@ public class PlatformPlugin {
// LEAN BACK
// Available starting at SDK 16
// Should not show overlays, tap to reveal overlays, needs onChange callback
// When the overlays come in on tap, the app does not recieve the gesture and does not know
// When the overlays come in on tap, the app does not receive the gesture and does not know
// the system overlay has changed. The overlays cannot be dismissed, so adding the callback
// support will allow users to restore the system ui and dismiss the overlays.
// Not compatible with top/bottom overlays enabled.