Flutter iOS Embedder
ios_surface_noop_unittests.mm
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include <QuartzCore/QuartzCore.h>
6 #import <XCTest/XCTest.h>
7 
9 
10 #import "flutter/common/task_runners.h"
11 #import "flutter/fml/message_loop.h"
12 #import "flutter/fml/thread.h"
13 #import "flutter/lib/ui/window/platform_message.h"
14 #import "flutter/lib/ui/window/platform_message_response.h"
15 #import "flutter/shell/common/thread_host.h"
18 
20 
21 @interface IOSSurfaceNoopTest : XCTestCase
22 @end
23 
24 @implementation IOSSurfaceNoopTest
25 - (void)testCreateSurface {
26  auto context = std::make_shared<flutter::IOSContextNoop>();
27  flutter::IOSSurfaceNoop noop(context);
28 
29  XCTAssertTrue(noop.IsValid());
30  XCTAssertTrue(!!noop.CreateGPUSurface());
31 }
32 
33 @end
flutter::IOSSurfaceNoop::IsValid
bool IsValid() const override
Definition: ios_surface_noop.mm:28
ios_context_noop.h
flutter::IOSSurfaceNoop::CreateGPUSurface
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context=nullptr) override
Definition: ios_surface_noop.mm:34
FlutterMacros.h
IOSSurfaceNoopTest
Definition: ios_surface_noop_unittests.mm:21
flutter::IOSSurfaceNoop
A rendering surface that accepts rendering intent but does not render anything.
Definition: ios_surface_noop.h:23
FLUTTER_ASSERT_ARC
Definition: FlutterChannelKeyResponder.mm:13
ios_surface_noop.h