chromium/components/update_client/protocol_parser_json_unittest.cc

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

#include "components/update_client/protocol_parser_json.h"

#include <memory>

#include "testing/gtest/include/gtest/gtest.h"

namespace update_client {

const char* kJSONValid =;

const char* kJSONHash =;

const char* kJSONInvalidSizes =;

const char* kJSONInvalidMissingCodebase =;

const char* kJSONInvalidMissingManifest =;

// `manifest` is supposed to be a dictionary. It is a list here.
const char* kJSONInvalidManifest =;

const char* kJSONMissingAppId =;

const char* kJSONInvalidCodebase =;

const char* kJSONMissingVersion =;

const char* kJSONInvalidVersion =;

// Includes a <daystart> tag.
const char* kJSONWithDaystart =;

// Indicates no updates available.
const char* kJSONNoUpdate =;

// Includes two app objects, one app with an error.
const char* kJSONTwoAppsOneError =;

// Includes two <app> tags, both of which set the cohort.
const char* kJSONTwoAppsSetCohort =;

// Includes a run action for an update check with status='ok'.
const char* kJSONUpdateCheckStatusOkWithRunAction =;

// Includes a run action for an update check with status='noupdate'.
const char* kJSONUpdateCheckStatusNoUpdateWithRunAction =;

// Includes a run action for an update check with status='error'.
const char* kJSONUpdateCheckStatusErrorWithRunAction =;

// Includes nine app objects with status different than 'ok'.
const char* kJSONAppsStatusError =;

// Includes a manifest |run| value for an update check with status='ok'. Also
// includes install data in the `data` element.
const char* kJSONManifestRun =;

// Includes two custom response attributes in the update_check.
const char* kJSONCustomAttributes =;

const char* kBadJSONBadAppIdNoNewlinesBadUCKey =;

TEST(UpdateClientProtocolParserJSONTest, Parse) {}

TEST(UpdateClientProtocolParserJSONTest, ParseAttrs) {}

TEST(UpdateClientProtocolParserJSONTest, ParseBadJSONNoCrash) {}

}  // namespace update_client