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

Side by Side Diff: extensions/renderer/module_system_test.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/renderer/module_system_test.h" 5 #include "extensions/renderer/module_system_test.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 }; 122 };
123 123
124 ModuleSystemTestEnvironment::ModuleSystemTestEnvironment(v8::Isolate* isolate) 124 ModuleSystemTestEnvironment::ModuleSystemTestEnvironment(v8::Isolate* isolate)
125 : isolate_(isolate), 125 : isolate_(isolate),
126 context_holder_(new gin::ContextHolder(isolate_)), 126 context_holder_(new gin::ContextHolder(isolate_)),
127 handle_scope_(isolate_), 127 handle_scope_(isolate_),
128 source_map_(new StringSourceMap()) { 128 source_map_(new StringSourceMap()) {
129 context_holder_->SetContext(v8::Context::New( 129 context_holder_->SetContext(v8::Context::New(
130 isolate, g_v8_extension_configurator.Get().GetConfiguration())); 130 isolate, g_v8_extension_configurator.Get().GetConfiguration()));
131 context_.reset(new ScriptContext(context_holder_->context(), 131 context_.reset(new ScriptContext(context_holder_->context(),
132 NULL, // WebFrame 132 nullptr, // WebFrame
133 NULL, // Extension 133 nullptr, // Extension
134 Feature::BLESSED_EXTENSION_CONTEXT, 134 Feature::BLESSED_EXTENSION_CONTEXT,
135 NULL, // Effective Extension 135 nullptr, // Effective Extension
136 Feature::BLESSED_EXTENSION_CONTEXT)); 136 Feature::BLESSED_EXTENSION_CONTEXT));
137 context_->v8_context()->Enter(); 137 context_->v8_context()->Enter();
138 assert_natives_ = new AssertNatives(context_.get()); 138 assert_natives_ = new AssertNatives(context_.get());
139 139
140 { 140 {
141 scoped_ptr<ModuleSystem> module_system( 141 scoped_ptr<ModuleSystem> module_system(
142 new ModuleSystem(context_.get(), source_map_.get())); 142 new ModuleSystem(context_.get(), source_map_.get()));
143 context_->set_module_system(module_system.Pass()); 143 context_->set_module_system(module_system.Pass());
144 } 144 }
145 ModuleSystem* module_system = context_->module_system(); 145 ModuleSystem* module_system = context_->module_system();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 246
247 void ModuleSystemTest::ExpectNoAssertionsMade() { 247 void ModuleSystemTest::ExpectNoAssertionsMade() {
248 should_assertions_be_made_ = false; 248 should_assertions_be_made_ = false;
249 } 249 }
250 250
251 void ModuleSystemTest::RunResolvedPromises() { 251 void ModuleSystemTest::RunResolvedPromises() {
252 isolate_->RunMicrotasks(); 252 isolate_->RunMicrotasks();
253 } 253 }
254 254
255 } // namespace extensions 255 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698