| 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/files/file_util.h" | 7 #include "base/files/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/array_buffer.h" | 10 #include "gin/array_buffer.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 gin::Runner::Scope scope(&runner); | 72 gin::Runner::Scope scope(&runner); |
| 73 v8::V8::SetCaptureStackTraceForUncaughtExceptions(true); | 73 v8::V8::SetCaptureStackTraceForUncaughtExceptions(true); |
| 74 runner.Run(source, path.AsUTF8Unsafe()); | 74 runner.Run(source, path.AsUTF8Unsafe()); |
| 75 | 75 |
| 76 if (run_until_idle) { | 76 if (run_until_idle) { |
| 77 message_loop.RunUntilIdle(); | 77 message_loop.RunUntilIdle(); |
| 78 } else { | 78 } else { |
| 79 message_loop.Run(); | 79 message_loop.Run(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 v8::Handle<v8::Value> result = runner.global()->Get( | 82 v8::Local<v8::Value> result = runner.global()->Get( |
| 83 StringToSymbol(runner.GetContextHolder()->isolate(), "result")); | 83 StringToSymbol(runner.GetContextHolder()->isolate(), "result")); |
| 84 EXPECT_EQ("PASS", V8ToString(result)); | 84 EXPECT_EQ("PASS", V8ToString(result)); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace gin | 88 } // namespace gin |
| OLD | NEW |