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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc

Issue 2539623002: [Extensions] Move [Chrome]ExtensionTestNotificationObserver into extensions:: (Closed)
Patch Set: Created 4 years 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
OLDNEW
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
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 ChromeExtensionTestNotificationObserver(browser())); 61 observer_.reset(
62 new extensions::ChromeExtensionTestNotificationObserver(browser()));
62 } 63 }
63 64
64 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() { 65 void ExtensionSettingsUIBrowserTest::InstallGoodExtension() {
65 EXPECT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx"))); 66 EXPECT_TRUE(InstallExtension(test_data_dir_.AppendASCII("good.crx")));
66 } 67 }
67 68
68 void ExtensionSettingsUIBrowserTest::InstallErrorsExtension() { 69 void ExtensionSettingsUIBrowserTest::InstallErrorsExtension() {
69 EXPECT_TRUE(InstallUnpackedExtension( 70 EXPECT_TRUE(InstallUnpackedExtension(
70 test_data_dir_.AppendASCII("error_console") 71 test_data_dir_.AppendASCII("error_console")
71 .AppendASCII("runtime_and_manifest_errors"))); 72 .AppendASCII("runtime_and_manifest_errors")));
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 iter != errors->end(); ++iter) 196 iter != errors->end(); ++iter)
196 VLOG(1) << *iter; 197 VLOG(1) << *iter;
197 198
198 return nullptr; 199 return nullptr;
199 } 200 }
200 201
201 if (!observer_->WaitForExtensionViewsToLoad()) 202 if (!observer_->WaitForExtensionViewsToLoad())
202 return nullptr; 203 return nullptr;
203 return service->GetExtensionById(last_loaded_extension_id(), false); 204 return service->GetExtensionById(last_loaded_extension_id(), false);
204 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698