| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 Profile* ExtensionSettingsUIBrowserTest::GetProfile() { | 51 Profile* ExtensionSettingsUIBrowserTest::GetProfile() { |
| 52 if (!profile_) { | 52 if (!profile_) { |
| 53 profile_ = browser() ? browser()->profile() : | 53 profile_ = browser() ? browser()->profile() : |
| 54 ProfileManager::GetActiveUserProfile(); | 54 ProfileManager::GetActiveUserProfile(); |
| 55 } | 55 } |
| 56 return profile_; | 56 return profile_; |
| 57 } | 57 } |
| 58 | 58 |
| 59 void ExtensionSettingsUIBrowserTest::SetUpOnMainThread() { | 59 void ExtensionSettingsUIBrowserTest::SetUpOnMainThread() { |
| 60 WebUIBrowserTest::SetUpOnMainThread(); | 60 WebUIBrowserTest::SetUpOnMainThread(); |
| 61 observer_.reset(new ExtensionTestNotificationObserver(browser())); | 61 observer_.reset(new ChromeExtensionTestNotificationObserver(browser())); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() { | 64 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() { |
| 65 EXPECT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"))); | 65 EXPECT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"))); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void ExtensionSettingsUIBrowserTest::InstallErrorsExtension() { | 68 void ExtensionSettingsUIBrowserTest::InstallErrorsExtension() { |
| 69 EXPECT_TRUE(InstallUnpackedExtension( | 69 EXPECT_TRUE(InstallUnpackedExtension( |
| 70 test_data_dir_.AppendASCII("error_console") | 70 test_data_dir_.AppendASCII("error_console") |
| 71 .AppendASCII("runtime_and_manifest_errors"))); | 71 .AppendASCII("runtime_and_manifest_errors"))); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 iter != errors->end(); ++iter) | 195 iter != errors->end(); ++iter) |
| 196 VLOG(1) << *iter; | 196 VLOG(1) << *iter; |
| 197 | 197 |
| 198 return nullptr; | 198 return nullptr; |
| 199 } | 199 } |
| 200 | 200 |
| 201 if (!observer_->WaitForExtensionViewsToLoad()) | 201 if (!observer_->WaitForExtensionViewsToLoad()) |
| 202 return nullptr; | 202 return nullptr; |
| 203 return service->GetExtensionById(last_loaded_extension_id(), false); | 203 return service->GetExtensionById(last_loaded_extension_id(), false); |
| 204 } | 204 } |
| OLD | NEW |