blob: e7f93a64b7a9ba9cd3b6ecd9145bde5481103a1e [file] [log] [blame]
[email protected]a22998a2013-11-10 05:00:501// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef GIN_TEST_V8_TEST_H_
6#define GIN_TEST_V8_TEST_H_
7
[email protected]1b93c232013-11-19 19:25:128#include "base/basictypes.h"
[email protected]a22998a2013-11-10 05:00:509#include "base/compiler_specific.h"
[email protected]1b93c232013-11-19 19:25:1210#include "base/memory/scoped_ptr.h"
[email protected]a22998a2013-11-10 05:00:5011#include "testing/gtest/include/gtest/gtest.h"
12#include "v8/include/v8.h"
13
14namespace gin {
15
[email protected]1b93c232013-11-19 19:25:1216class Gin;
17
[email protected]a22998a2013-11-10 05:00:5018// A base class for tests that use v8.
19class V8Test : public testing::Test {
20 public:
21 V8Test();
22 virtual ~V8Test();
23
24 virtual void SetUp() OVERRIDE;
25 virtual void TearDown() OVERRIDE;
26
27 protected:
[email protected]1b93c232013-11-19 19:25:1228 scoped_ptr<Gin> instance_;
[email protected]a22998a2013-11-10 05:00:5029 v8::Persistent<v8::Context> context_;
[email protected]1b93c232013-11-19 19:25:1230
31 private:
32 DISALLOW_COPY_AND_ASSIGN(V8Test);
[email protected]a22998a2013-11-10 05:00:5033};
34
35} // namespace gin
36
37#endif // GIN_TEST_V8_TEST_H_