chromium/third_party/blink/renderer/bindings/core/v8/script_decoder_test.cc

// Copyright 2024 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/bindings/core/v8/script_decoder.h"

#include "base/notreached.h"
#include "base/run_loop.h"
#include "base/sequence_checker.h"
#include "base/test/bind.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/renderer/core/html/parser/text_resource_decoder.h"
#include "third_party/blink/renderer/platform/loader/fetch/response_body_loader_client.h"
#include "third_party/blink/renderer/platform/loader/fetch/text_resource_decoder_options.h"
#include "third_party/blink/renderer/platform/scheduler/public/worker_pool.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"

namespace blink {
namespace {

const unsigned char kFooUTF8WithBOM[] =;
// SHA256 hash of 'foo' in hex:
//   echo -n 'foo' | sha256sum | xxd -r -p | xxd -i
const unsigned char kExpectedDigest[] =;

class DummyResponseBodyLoaderClient
    : public GarbageCollected<DummyResponseBodyLoaderClient>,
      public ResponseBodyLoaderClient {};

}  // namespace

class ScriptDecoderTest : public ::testing::Test {};

TEST_F(ScriptDecoderTest, WithClient) {}

TEST_F(ScriptDecoderTest, PartiallySendDifferentThread) {}

TEST_F(ScriptDecoderTest, Simple) {}

}  // namespace blink