Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
android
jni
jni_mock_unittest.cc
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 "flutter/shell/platform/android/jni/jni_mock.h"
6
7
#include "gmock/gmock.h"
8
#include "gtest/gtest.h"
9
10
namespace
flutter
{
11
namespace
testing {
12
13
TEST
(
JNIMock
, FlutterViewHandlePlatformMessage) {
14
JNIMock
mock;
15
16
auto
message
= std::make_unique<PlatformMessage>(
"<channel-name>"
,
nullptr
);
17
auto
response_id = 1;
18
19
EXPECT_CALL(mock,
20
FlutterViewHandlePlatformMessage(
21
::testing::Property(&std::unique_ptr<PlatformMessage>::get,
22
message
.get()),
23
response_id));
24
25
mock.
FlutterViewHandlePlatformMessage
(std::move(
message
), response_id);
26
}
27
28
}
// namespace testing
29
}
// namespace flutter
TEST
#define TEST(S, s, D, expected)
Definition
FitsInTest.cpp:15
flutter::JNIMock
Definition
jni_mock.h:17
flutter::PlatformViewAndroidJNI::FlutterViewHandlePlatformMessage
virtual void FlutterViewHandlePlatformMessage(std::unique_ptr< flutter::PlatformMessage > message, int responseId)=0
Sends a platform message. The message may be empty.
message
Win32Message message
Definition
keyboard_unittests.cc:139
flutter
Definition
asset_manager.cc:10
Generated on Fri Apr 26 2024 06:14:21 for Flutter Engine by
1.9.8