#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_EXCEPTION_STATE_MATCHERS_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_TESTING_EXCEPTION_STATE_MATCHERS_H_
#include <string>
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
namespace blink {
void PrintTo(const ExceptionState& exception_state, std::ostream* os);
namespace internal {
std::string ExceptionCodeToString(ExceptionCode code);
}
MATCHER(HadException, "") { … }
MATCHER_P(HadException,
code,
internal::ExceptionCodeToString(ToExceptionCode(code))) { … }
MATCHER_P2(HadException,
code,
message,
internal::ExceptionCodeToString(ToExceptionCode(code)) + ": " +
testing::PrintToString(message)) { … }
MATCHER(HadNoException, "") { … }
}
#endif