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