#include "chrome/test/chromedriver/chrome/console_logger.h"
#include <memory>
#include <string>
#include <vector>
#include "base/compiler_specific.h"
#include "base/containers/queue.h"
#include "base/format_macros.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/test/chromedriver/chrome/log.h"
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/stub_devtools_client.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
class FakeDevToolsClient : public StubDevToolsClient { … };
struct LogEntry { … };
class FakeLog : public Log { … };
void FakeLog::AddEntryTimestamped(const base::Time& timestamp,
Level level,
const std::string& source,
const std::string& message) { … }
bool FakeLog::Emptied() const { … }
void ValidateLogEntry(const LogEntry *entry,
Log::Level expected_level,
const std::string& expected_source,
const std::string& expected_message) { … }
void ConsoleLogParams(base::Value::Dict* out_dict,
const std::string& source,
const std::string& url,
const std::string& level,
int line_number,
const std::string& text) { … }
}
TEST(ConsoleLogger, ConsoleMessages) { … }