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

Side by Side Diff: chrome/browser/extensions/test_extension_environment.cc

Issue 262883011: Makes PlatformEventSource creation in Env conditional (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « ash/test/ash_test_helper.cc ('k') | chrome/test/base/view_event_test_base.cc » ('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 (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/browser/extensions/test_extension_environment.h" 5 #include "chrome/browser/extensions/test_extension_environment.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace extensions { 26 namespace extensions {
27 27
28 using content::BrowserThread; 28 using content::BrowserThread;
29 29
30 TestExtensionEnvironment::TestExtensionEnvironment() 30 TestExtensionEnvironment::TestExtensionEnvironment()
31 : profile_(new TestingProfile), 31 : profile_(new TestingProfile),
32 extension_service_(NULL), 32 extension_service_(NULL),
33 extension_prefs_(NULL) { 33 extension_prefs_(NULL) {
34 #if defined(USE_AURA) 34 #if defined(USE_AURA)
35 aura::Env::CreateInstance(); 35 aura::Env::CreateInstance(true);
36 #endif 36 #endif
37 } 37 }
38 38
39 TestExtensionEnvironment::~TestExtensionEnvironment() { 39 TestExtensionEnvironment::~TestExtensionEnvironment() {
40 #if defined(USE_AURA) 40 #if defined(USE_AURA)
41 aura::Env::DeleteInstance(); 41 aura::Env::DeleteInstance();
42 #endif 42 #endif
43 } 43 }
44 44
45 TestingProfile* TestExtensionEnvironment::profile() const { 45 TestingProfile* TestExtensionEnvironment::profile() const {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 scoped_ptr<content::WebContents> TestExtensionEnvironment::MakeTab() const { 91 scoped_ptr<content::WebContents> TestExtensionEnvironment::MakeTab() const {
92 scoped_ptr<content::WebContents> contents( 92 scoped_ptr<content::WebContents> contents(
93 content::WebContentsTester::CreateTestWebContents(profile(), NULL)); 93 content::WebContentsTester::CreateTestWebContents(profile(), NULL));
94 // Create a tab id. 94 // Create a tab id.
95 SessionTabHelper::CreateForWebContents(contents.get()); 95 SessionTabHelper::CreateForWebContents(contents.get());
96 return contents.Pass(); 96 return contents.Pass();
97 } 97 }
98 98
99 } // namespace extensions 99 } // namespace extensions
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/test/base/view_event_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698