Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: chrome/test/base/module_system_test.cc

Issue 359413004: Add support for using AMD modules from extensions modules. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/base/module_system_test.cc
diff --git a/chrome/test/base/module_system_test.cc b/chrome/test/base/module_system_test.cc
index bfc8308f1576ae9b8592e06962814397009e7e63..8edfc687776cd8b6f46b689a55aad51b3afa366a 100644
--- a/chrome/test/base/module_system_test.cc
+++ b/chrome/test/base/module_system_test.cc
@@ -121,18 +121,19 @@ class ModuleSystemTest::StringSourceMap : public ModuleSystem::SourceMap {
};
ModuleSystemTest::ModuleSystemTest()
- : isolate_(v8::Isolate::GetCurrent()),
- handle_scope_(isolate_),
- context_(
- new extensions::ChromeV8Context(
- v8::Context::New(
- isolate_,
- g_v8_extension_configurator.Get().GetConfiguration()),
- NULL, // WebFrame
- NULL, // Extension
- extensions::Feature::UNSPECIFIED_CONTEXT)),
+ : isolate_holder_(v8::Isolate::GetCurrent(), NULL),
not at google - send to devlin 2014/07/01 18:13:05 actually test requireAsync somewhere?
Sam McNally 2014/07/02 03:26:35 Done.
+ context_holder_(isolate_holder_.isolate()),
+ handle_scope_(isolate_holder_.isolate()),
source_map_(new StringSourceMap()),
should_assertions_be_made_(true) {
+ context_holder_.SetContext(
+ v8::Context::New(isolate_holder_.isolate(),
+ g_v8_extension_configurator.Get().GetConfiguration()));
+ context_.reset(new extensions::ChromeV8Context(
+ context_holder_.context(),
+ NULL, // WebFrame
+ NULL, // Extension
+ extensions::Feature::UNSPECIFIED_CONTEXT));
context_->v8_context()->Enter();
assert_natives_ = new AssertNatives(context_.get());

Powered by Google App Engine
This is Rietveld 408576698