OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <iostream> | |
6 | |
7 #include "base/string_util.h" | 5 #include "base/string_util.h" |
8 #include "chrome/test/v8_unit_test.h" | 6 #include "chrome/test/v8_unit_test.h" |
9 | 7 |
10 void V8UnitTest::SetUp() { | 8 void V8UnitTest::SetUp() { |
11 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); | 9 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); |
12 global->Set(v8::String::New("log"), | 10 global->Set(v8::String::New("log"), |
13 v8::FunctionTemplate::New(&V8UnitTest::Log)); | 11 v8::FunctionTemplate::New(&V8UnitTest::Log)); |
14 context_ = v8::Context::New(NULL, global); | 12 context_ = v8::Context::New(NULL, global); |
15 } | 13 } |
16 | 14 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 first = false; | 89 first = false; |
92 } else { | 90 } else { |
93 message += " "; | 91 message += " "; |
94 } | 92 } |
95 v8::String::Utf8Value str(args[i]); | 93 v8::String::Utf8Value str(args[i]); |
96 message += *str; | 94 message += *str; |
97 } | 95 } |
98 std::cout << message << "\n"; | 96 std::cout << message << "\n"; |
99 return v8::Undefined(); | 97 return v8::Undefined(); |
100 } | 98 } |
OLD | NEW |