OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/test/base/module_system_test.h" | 5 #include "chrome/test/base/module_system_test.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 EXPECT_EQ(should_assertions_be_made_, | 181 EXPECT_EQ(should_assertions_be_made_, |
182 assert_natives_->assertion_made()); | 182 assert_natives_->assertion_made()); |
183 EXPECT_FALSE(assert_natives_->failed()); | 183 EXPECT_FALSE(assert_natives_->failed()); |
184 } | 184 } |
185 | 185 |
186 void ModuleSystemTest::ExpectNoAssertionsMade() { | 186 void ModuleSystemTest::ExpectNoAssertionsMade() { |
187 should_assertions_be_made_ = false; | 187 should_assertions_be_made_ = false; |
188 } | 188 } |
189 | 189 |
190 v8::Handle<v8::Object> ModuleSystemTest::CreateGlobal(const std::string& name) { | 190 v8::Handle<v8::Object> ModuleSystemTest::CreateGlobal(const std::string& name) { |
191 v8::HandleScope handle_scope; | 191 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); |
192 v8::Handle<v8::Object> object = v8::Object::New(); | 192 v8::Handle<v8::Object> object = v8::Object::New(); |
193 v8::Context::GetCurrent()->Global()->Set(v8::String::New(name.c_str()), | 193 v8::Context::GetCurrent()->Global()->Set(v8::String::New(name.c_str()), |
194 object); | 194 object); |
195 return handle_scope.Close(object); | 195 return handle_scope.Close(object); |
196 } | 196 } |
OLD | NEW |