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

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

Issue 184043024: Limit scope of settings API configuration and proxy permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Bernhard's comments Created 6 years, 9 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
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/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 syncer::StringOrdinal::CreateInitialOrdinal()); 178 syncer::StringOrdinal::CreateInitialOrdinal());
179 179
180 // Toggling incognito or file access will reload the extension, so wait for 180 // Toggling incognito or file access will reload the extension, so wait for
181 // the reload and grab the new extension instance. The default state is 181 // the reload and grab the new extension instance. The default state is
182 // incognito disabled and file access enabled, so we don't wait in those 182 // incognito disabled and file access enabled, so we don't wait in those
183 // cases. 183 // cases.
184 { 184 {
185 content::WindowedNotificationObserver load_signal( 185 content::WindowedNotificationObserver load_signal(
186 chrome::NOTIFICATION_EXTENSION_LOADED, 186 chrome::NOTIFICATION_EXTENSION_LOADED,
187 content::Source<Profile>(profile())); 187 content::Source<Profile>(profile()));
188 CHECK(!extensions::util::IsIncognitoEnabled(extension_id, profile()) || 188 CHECK(!extensions::util::IsIncognitoEnabled(extension_id, profile()));
189 extension->force_incognito_enabled());
190 189
191 if (flags & kFlagEnableIncognito) { 190 if (flags & kFlagEnableIncognito) {
192 extensions::util::SetIsIncognitoEnabled(extension_id, profile(), true); 191 extensions::util::SetIsIncognitoEnabled(extension_id, profile(), true);
193 load_signal.Wait(); 192 load_signal.Wait();
194 extension = service->GetExtensionById(extension_id, false); 193 extension = service->GetExtensionById(extension_id, false);
195 CHECK(extension) << extension_id << " not found after reloading."; 194 CHECK(extension) << extension_id << " not found after reloading.";
196 } 195 }
197 } 196 }
198 197
199 { 198 {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 EXPECT_EQ(expected_hosts, num_hosts); 589 EXPECT_EQ(expected_hosts, num_hosts);
591 return host; 590 return host;
592 } 591 }
593 592
594 std::string ExtensionBrowserTest::ExecuteScriptInBackgroundPage( 593 std::string ExtensionBrowserTest::ExecuteScriptInBackgroundPage(
595 const std::string& extension_id, 594 const std::string& extension_id,
596 const std::string& script) { 595 const std::string& script) {
597 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( 596 return extensions::browsertest_util::ExecuteScriptInBackgroundPage(
598 profile(), extension_id, script); 597 profile(), extension_id, script);
599 } 598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698