chromium/third_party/blink/renderer/modules/push_messaging/push_manager_test.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/modules/push_messaging/push_manager.h"

#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_arraybuffer_arraybufferview_string.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_push_subscription_options_init.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/modules/push_messaging/push_subscription_options.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/text/base64.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {
namespace {

const unsigned kMaxKeyLength =;

// NIST P-256 public key made available to tests. Must be an uncompressed
// point in accordance with SEC1 2.3.3.
const unsigned kApplicationServerKeyLength =;
const uint8_t kApplicationServerKey[kApplicationServerKeyLength] =;

void IsApplicationServerKeyValid(PushSubscriptionOptions* output) {}

TEST(PushManagerTest, ValidSenderKey) {}

// applicationServerKey should be Unpadded 'base64url'
// https://tools.ietf.org/html/rfc7515#appendix-C
inline bool RemovePad(UChar character) {}

TEST(PushManagerTest, ValidBase64URLWithoutPaddingSenderKey) {}

TEST(PushManagerTest, InvalidSenderKeyLength) {}

TEST(PushManagerTest, InvalidBase64SenderKey) {}

TEST(PushManagerTest, InvalidBase64URLWithPaddingSenderKey) {}

}  // namespace
}  // namespace blink