Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions
focus_delegate_unittests.cc File Reference
#include <fuchsia/ui/views/cpp/fidl.h>
#include <gtest/gtest.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/async-loop/default.h>
#include <lib/fidl/cpp/binding_set.h>
#include <lib/zx/eventpair.h>
#include "focus_delegate.h"
#include "tests/fakes/focuser.h"
#include "tests/fakes/platform_message.h"
#include "tests/fakes/view_ref_focused.h"
#include "third_party/rapidjson/include/rapidjson/document.h"

Go to the source code of this file.

Classes

class  flutter_runner::testing::FocusDelegateTest
 

Namespaces

namespace  flutter_runner
 
namespace  flutter_runner::testing
 

Functions

rapidjson::Value ParsePlatformMessage (std::string json)
 
 flutter_runner::testing::TEST_F (FocusDelegateTest, WatchCallbackSeries)
 
 flutter_runner::testing::TEST_F (FocusDelegateTest, RequestFocusTest)
 
 flutter_runner::testing::TEST_F (FocusDelegateTest, RequestFocusFailTest)
 

Function Documentation

◆ ParsePlatformMessage()

rapidjson::Value ParsePlatformMessage ( std::string  json)

Definition at line 18 of file focus_delegate_unittests.cc.

18 {
19 rapidjson::Document document;
20 document.Parse(json);
21 if (document.HasParseError() || !document.IsObject()) {
22 FML_LOG(ERROR) << "Could not parse document";
23 return rapidjson::Value();
24 }
25 return document.GetObject();
26}
#define FML_LOG(severity)
Definition: logging.h:82
#define ERROR(message)
Definition: elf_loader.cc:260