Move more string_util functions to base namespace.
[chromium-blink-merge.git] / gin / test / file_runner.h
blob9f7ab4b02057c58a9ba2b39ac842470e18647020
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 #ifndef GIN_TEST_FILE_RUNNER_H_
6 #define GIN_TEST_FILE_RUNNER_H_
8 #include "base/compiler_specific.h"
9 #include "base/files/file_path.h"
10 #include "gin/modules/module_runner_delegate.h"
11 #include "gin/runner.h"
13 namespace gin {
15 // FileRunnerDelegate is a simple RunnerDelegate that's useful for running
16 // tests. The FileRunnerDelegate provides built-in modules for "console" and
17 // "gtest" that are useful when writing unit tests.
19 // TODO(abarth): Rename FileRunnerDelegate to TestRunnerDelegate.
20 class FileRunnerDelegate : public ModuleRunnerDelegate {
21 public:
22 FileRunnerDelegate();
23 ~FileRunnerDelegate() override;
25 private:
26 // From ModuleRunnerDelegate:
27 void UnhandledException(ShellRunner* runner, TryCatch& try_catch) override;
29 DISALLOW_COPY_AND_ASSIGN(FileRunnerDelegate);
32 void RunTestFromFile(const base::FilePath& path, FileRunnerDelegate* delegate,
33 bool run_until_idle = true);
35 } // namespace gin
37 #endif // GIN_TEST_FILE_RUNNER_H_