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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |