| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gin/test/file_runner.h" | 5 #include "gin/test/file_runner.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "gin/converter.h" | 10 #include "gin/converter.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 PathService::Get(base::DIR_SOURCE_ROOT, &search_paths[0]); | 24 PathService::Get(base::DIR_SOURCE_ROOT, &search_paths[0]); |
| 25 PathService::Get(base::DIR_EXE, &search_paths[1]); | 25 PathService::Get(base::DIR_EXE, &search_paths[1]); |
| 26 search_paths[1] = search_paths[1].AppendASCII("gen"); | 26 search_paths[1] = search_paths[1].AppendASCII("gen"); |
| 27 return search_paths; | 27 return search_paths; |
| 28 } | 28 } |
| 29 | 29 |
| 30 } // namespace | 30 } // namespace |
| 31 | 31 |
| 32 FileRunnerDelegate::FileRunnerDelegate() | 32 FileRunnerDelegate::FileRunnerDelegate() |
| 33 : ModuleRunnerDelegate(GetModuleSearchPaths()) { | 33 : ModuleRunnerDelegate(GetModuleSearchPaths()) { |
| 34 AddBuiltinModule(Console::kModuleName, Console::GetTemplate); | 34 AddBuiltinModule(Console::kModuleName, Console::GetModule); |
| 35 AddBuiltinModule(GTest::kModuleName, GTest::GetTemplate); | 35 AddBuiltinModule(GTest::kModuleName, GTest::GetModule); |
| 36 } | 36 } |
| 37 | 37 |
| 38 FileRunnerDelegate::~FileRunnerDelegate() { | 38 FileRunnerDelegate::~FileRunnerDelegate() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 void FileRunnerDelegate::UnhandledException(Runner* runner, | 41 void FileRunnerDelegate::UnhandledException(Runner* runner, |
| 42 TryCatch& try_catch) { | 42 TryCatch& try_catch) { |
| 43 ModuleRunnerDelegate::UnhandledException(runner, try_catch); | 43 ModuleRunnerDelegate::UnhandledException(runner, try_catch); |
| 44 FAIL() << try_catch.GetStackTrace(); | 44 FAIL() << try_catch.GetStackTrace(); |
| 45 } | 45 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 60 | 60 |
| 61 message_loop.RunUntilIdle(); | 61 message_loop.RunUntilIdle(); |
| 62 | 62 |
| 63 v8::Handle<v8::Value> result = runner.context()->Global()->Get( | 63 v8::Handle<v8::Value> result = runner.context()->Global()->Get( |
| 64 StringToSymbol(runner.isolate(), "result")); | 64 StringToSymbol(runner.isolate(), "result")); |
| 65 EXPECT_EQ("PASS", V8ToString(result)); | 65 EXPECT_EQ("PASS", V8ToString(result)); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace gin | 69 } // namespace gin |
| OLD | NEW |