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

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

Issue 498513002: Respect the clipboardRead and clipboardWrite permissions in content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address more comments Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « extensions/renderer/dispatcher_delegate.h ('k') | extensions/renderer/script_context.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 NULL, // WebFrame
133 NULL, // Extension 133 NULL, // Extension
134 Feature::BLESSED_EXTENSION_CONTEXT,
135 NULL, // Effective Extension
134 Feature::BLESSED_EXTENSION_CONTEXT)); 136 Feature::BLESSED_EXTENSION_CONTEXT));
135 context_->v8_context()->Enter(); 137 context_->v8_context()->Enter();
136 assert_natives_ = new AssertNatives(context_.get()); 138 assert_natives_ = new AssertNatives(context_.get());
137 139
138 { 140 {
139 scoped_ptr<ModuleSystem> module_system( 141 scoped_ptr<ModuleSystem> module_system(
140 new ModuleSystem(context_.get(), source_map_.get())); 142 new ModuleSystem(context_.get(), source_map_.get()));
141 context_->set_module_system(module_system.Pass()); 143 context_->set_module_system(module_system.Pass());
142 } 144 }
143 ModuleSystem* module_system = context_->module_system(); 145 ModuleSystem* module_system = context_->module_system();
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 231
230 void ModuleSystemTest::ExpectNoAssertionsMade() { 232 void ModuleSystemTest::ExpectNoAssertionsMade() {
231 should_assertions_be_made_ = false; 233 should_assertions_be_made_ = false;
232 } 234 }
233 235
234 void ModuleSystemTest::RunResolvedPromises() { 236 void ModuleSystemTest::RunResolvedPromises() {
235 isolate_->RunMicrotasks(); 237 isolate_->RunMicrotasks();
236 } 238 }
237 239
238 } // namespace extensions 240 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher_delegate.h ('k') | extensions/renderer/script_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698