Flutter Engine
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 =
17  fml::MakeRefCounted<PlatformMessage>("<channel-name>", nullptr);
18  auto response_id = 1;
19 
20  EXPECT_CALL(mock, FlutterViewHandlePlatformMessage(message, response_id));
21 
22  mock.FlutterViewHandlePlatformMessage(message, response_id);
23 }
24 
25 } // namespace testing
26 } // namespace flutter
virtual void FlutterViewHandlePlatformMessage(fml::RefPtr< flutter::PlatformMessage > message, int responseId)=0
Sends a platform message. The message may be empty.
TEST(EmbeddedViewParams, GetBoundingRectAfterMutationsWithNoMutations)