chromium/third_party/inspector_protocol/crdtp/dispatch_test.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <vector>

#include "cbor.h"
#include "dispatch.h"
#include "error_support.h"
#include "frontend_channel.h"
#include "json.h"
#include "test_platform.h"

namespace crdtp {
// =============================================================================
// DispatchResponse - Error status and chaining / fall through
// =============================================================================
TEST(DispatchResponseTest, OK) {}

TEST(DispatchResponseTest, ServerError) {}

TEST(DispatchResponseTest, SessionNotFound) {}

TEST(DispatchResponseTest, InternalError) {}

TEST(DispatchResponseTest, InvalidParams) {}

TEST(DispatchResponseTest, FallThrough) {}

// =============================================================================
// Dispatchable - a shallow parser for CBOR encoded DevTools messages
// =============================================================================
TEST(DispatchableTest, MessageMustBeAnObject) {}

TEST(DispatchableTest, MessageMustHaveIntegerIdProperty) {}

TEST(DispatchableTest, MessageMustHaveIntegerIdProperty_IncorrectType) {}

TEST(DispatchableTest, MessageMustHaveStringMethodProperty) {}

TEST(DispatchableTest, MessageMustHaveStringMethodProperty_IncorrectType) {}

TEST(DispatchableTest, MessageMayHaveStringSessionIdProperty) {}

TEST(DispatchableTest, MessageMayHaveObjectParamsProperty) {}

TEST(DispatchableTest, MessageWithUnknownProperty) {}

TEST(DispatchableTest, DuplicateMapKey) {}

TEST(DispatchableTest, ValidMessageParsesOK_NoParams) {}

TEST(DispatchableTest, ValidMessageParsesOK_WithParams) {}

TEST(DispatchableTest, FaultyCBORTrailingJunk) {}

// =============================================================================
// Helpers for creating protocol cresponses and notifications.
// =============================================================================
TEST(CreateErrorResponseTest, SmokeTest) {}

TEST(CreateErrorNotificationTest, SmokeTest) {}

TEST(CreateResponseTest, SmokeTest) {}

TEST(CreateNotificationTest, SmokeTest) {}

// =============================================================================
// UberDispatcher - dispatches between domains (backends).
// =============================================================================
class TestChannel : public FrontendChannel {};

TEST(UberDispatcherTest, MethodNotFound) {}

// A domain dispatcher which captured dispatched and executed commands in fields
// for testing.
class TestDomain : public DomainDispatcher {};

TEST(UberDispatcherTest, DispatchingToDomainWithRedirects) {}
}  // namespace crdtp