ozone: DCHECK page_flip_request instead of page_flip_request_
[chromium-blink-merge.git] / gin / test / run_js_tests.cc
blobb83dc9f2ee6accdb3cebf510a0f350b02f948563
1 // 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.
5 #include "base/files/file_util.h"
6 #include "base/path_service.h"
7 #include "gin/test/file_runner.h"
8 #include "testing/gtest/include/gtest/gtest.h"
10 namespace gin {
11 namespace {
13 base::FilePath BasePath() {
14 base::FilePath path;
15 PathService::Get(base::DIR_SOURCE_ROOT, &path);
16 return path.AppendASCII("gin");
19 void RunTest(const base::FilePath& path) {
20 FileRunnerDelegate delegate;
21 RunTestFromFile(path, &delegate);
24 TEST(JSTest, File) {
25 RunTest(BasePath()
26 .AppendASCII("test")
27 .AppendASCII("file_unittests.js"));
30 TEST(JSTest, GTest) {
31 RunTest(BasePath()
32 .AppendASCII("test")
33 .AppendASCII("gtest_unittests.js"));
36 TEST(JSTest, ModuleRegistry) {
37 RunTest(BasePath()
38 .AppendASCII("modules")
39 .AppendASCII("module_registry_unittests.js"));
42 } // namespace
43 } // gin