[macOS] Remove extra setViewController and extra import (flutter/engine#52255)
This stub PR removes and extra `setViewController`, which is unnecessary because the view controller's initializer already attaches itself to the engine. This PR also removes an extra import since `FlutterCompositor` is not used in the engine's definition. As a result, `FlutterEngineTest.mm` needs to import it explicitly. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppDelegate.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterAppLifecycleDelegate.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginMacOS.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterEngineTestUtils.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterViewControllerTestUtils.h"
|
||||
#include "flutter/shell/platform/embedder/embedder.h"
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "flutter/shell/platform/common/app_lifecycle_state.h"
|
||||
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterCompositor.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterPlatformViewController.h"
|
||||
#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterRenderer.h"
|
||||
|
||||
|
||||
@@ -212,7 +212,6 @@ TEST_F(FlutterViewControllerTest, ReparentsPluginWhenAccessibilityDisabled) {
|
||||
nibName:nil
|
||||
bundle:nil];
|
||||
[viewController loadView];
|
||||
[engine setViewController:viewController];
|
||||
// Creates a NSWindow so that sub view can be first responder.
|
||||
NSWindow* window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600)
|
||||
styleMask:NSBorderlessWindowMask
|
||||
|
||||
Reference in New Issue
Block a user