OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/extensions/extension_settings_browsertest.h" | 5 #include "chrome/browser/ui/webui/extensions/extension_settings_browsertest.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 using extensions::Extension; | 29 using extensions::Extension; |
30 | 30 |
31 ExtensionSettingsUIBrowserTest::ExtensionSettingsUIBrowserTest() | 31 ExtensionSettingsUIBrowserTest::ExtensionSettingsUIBrowserTest() |
32 : profile_(NULL) {} | 32 : profile_(NULL) {} |
33 | 33 |
34 ExtensionSettingsUIBrowserTest::~ExtensionSettingsUIBrowserTest() {} | 34 ExtensionSettingsUIBrowserTest::~ExtensionSettingsUIBrowserTest() {} |
35 | 35 |
36 Profile* ExtensionSettingsUIBrowserTest::GetProfile() { | 36 Profile* ExtensionSettingsUIBrowserTest::GetProfile() { |
37 if (!profile_) { | 37 if (!profile_) { |
38 profile_ = | 38 profile_ = browser() ? browser()->profile() : |
39 browser() ? browser()->profile() : ProfileManager::GetDefaultProfile(); | 39 ProfileManager::GetActiveUserProfile(); |
40 } | 40 } |
41 return profile_; | 41 return profile_; |
42 } | 42 } |
43 | 43 |
44 void ExtensionSettingsUIBrowserTest::SetUpOnMainThread() { | 44 void ExtensionSettingsUIBrowserTest::SetUpOnMainThread() { |
45 WebUIBrowserTest::SetUpOnMainThread(); | 45 WebUIBrowserTest::SetUpOnMainThread(); |
46 observer_.reset(new ExtensionTestNotificationObserver(browser())); | 46 observer_.reset(new ExtensionTestNotificationObserver(browser())); |
47 } | 47 } |
48 | 48 |
49 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() { | 49 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 iter != errors->end(); ++iter) | 123 iter != errors->end(); ++iter) |
124 VLOG(1) << *iter; | 124 VLOG(1) << *iter; |
125 | 125 |
126 return NULL; | 126 return NULL; |
127 } | 127 } |
128 | 128 |
129 if (!observer_->WaitForExtensionViewsToLoad()) | 129 if (!observer_->WaitForExtensionViewsToLoad()) |
130 return NULL; | 130 return NULL; |
131 return service->GetExtensionById(last_loaded_extension_id(), false); | 131 return service->GetExtensionById(last_loaded_extension_id(), false); |
132 } | 132 } |
OLD | NEW |