#include "extensions/renderer/bindings/api_last_error.h"
#include <optional>
#include <string_view>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "extensions/renderer/bindings/api_binding_test.h"
#include "extensions/renderer/bindings/api_binding_test_util.h"
#include "gin/converter.h"
#include "gin/public/context_holder.h"
namespace extensions {
namespace {
v8::Local<v8::Value> GetLastError(v8::Local<v8::Object> parent,
v8::Local<v8::Context> context) { … }
std::string GetLastErrorMessage(v8::Local<v8::Object> parent,
v8::Local<v8::Context> context) { … }
ContextParentPair;
ParentList;
v8::Local<v8::Object> GetParent(const ParentList& parents,
v8::Local<v8::Context> context,
v8::Local<v8::Object>* secondary_parent) { … }
}
APILastErrorTest;
TEST_F(APILastErrorTest, TestLastError) { … }
TEST_F(APILastErrorTest, ReportIfUnchecked) { … }
TEST_F(APILastErrorTest, ReportUncheckedError) { … }
TEST_F(APILastErrorTest, NonLastErrorObject) { … }
TEST_F(APILastErrorTest, MultipleContexts) { … }
TEST_F(APILastErrorTest, SecondaryParent) { … }
}