chromium/v8/test/unittests/libplatform/default-platform-unittest.cc

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/libplatform/default-platform.h"
#include "src/base/platform/semaphore.h"
#include "src/base/platform/time.h"
#include "testing/gmock/include/gmock/gmock.h"

InSequence;
StrictMock;

namespace v8 {
namespace platform {
namespace default_platform_unittest {

namespace {

struct MockTask : public Task {};

struct MockIdleTask : public IdleTask {};

class DefaultPlatformWithMockTime : public DefaultPlatform {};

double DefaultPlatformWithMockTime::mock_time_ =;

template <typename Platform>
class PlatformTest : public ::testing::Test {};

class DefaultPlatformTest : public PlatformTest<DefaultPlatform> {};
class DefaultPlatformTestWithMockTime
    : public PlatformTest<DefaultPlatformWithMockTime> {};

}  // namespace

TEST_F(DefaultPlatformTest, PumpMessageLoop) {}

TEST_F(DefaultPlatformTest, PumpMessageLoopWithTaskRunner) {}

TEST_F(DefaultPlatformTest, PumpMessageLoopNested) {}

TEST_F(DefaultPlatformTestWithMockTime, PumpMessageLoopDelayed) {}

TEST_F(DefaultPlatformTestWithMockTime, PumpMessageLoopNoStarvation) {}

TEST_F(DefaultPlatformTestWithMockTime,
       PendingDelayedTasksAreDestroyedOnShutdown) {}

TEST_F(DefaultPlatformTestWithMockTime, RunIdleTasks) {}

TEST_F(DefaultPlatformTestWithMockTime,
       PendingIdleTasksAreDestroyedOnShutdown) {}

namespace {

class TestBackgroundTask : public Task {};

}  // namespace

TEST(CustomDefaultPlatformTest, RunBackgroundTask) {}

TEST(CustomDefaultPlatformTest, PostForegroundTaskAfterPlatformTermination) {}

}  // namespace default_platform_unittest
}  // namespace platform
}  // namespace v8