Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

blasten
Copy link

@blasten blasten commented Jun 13, 2020

Description

This PR implements the external view embedder (C++ side). There's a bit of refactoring that was required to make the code unit testable. The refactor primarily consisted on making public interfaces that can be compiled with the host toolchain.

I saw that gmock can be used on virtual methods to assert method calls such as the calls to Java.

Related Issues

flutter/flutter#55270

Tests

I added the following tests: Unit tests.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the contributor guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the C++, Objective-C, Java style guides for the engine.
  • I read the tree hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation.
  • All existing and new tests are passing.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read handling breaking changes.

@blasten blasten force-pushed the external_embedder branch from f89bc4f to a6adf29 Compare June 18, 2020 00:37
using ::testing::ByMove;
using ::testing::Return;

class SurfaceMock : public Surface {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be moved to flow if the general pattern looks ok, so other unit tests can use the mock.

@@ -18,6 +18,7 @@ source_set("testing_lib") {

public_deps = [
"//flutter/fml",
"//third_party/googletest:gmock",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brings gmock

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@blasten blasten marked this pull request as ready for review June 18, 2020 05:12
@auto-assign auto-assign bot requested a review from gaaclarke June 18, 2020 05:12
@blasten blasten merged commit b990ad1 into flutter:master Jun 20, 2020
@blasten blasten deleted the external_embedder branch June 20, 2020 19:52
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants