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

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

Issue 565523003: Add scoped path overrides for system directories for ExtensionBrowserTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 3 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
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 installed_(false), 62 installed_(false),
63 #if defined(OS_CHROMEOS) 63 #if defined(OS_CHROMEOS)
64 set_chromeos_user_(true), 64 set_chromeos_user_(true),
65 #endif 65 #endif
66 // Default channel is STABLE but override with UNKNOWN so that unlaunched 66 // Default channel is STABLE but override with UNKNOWN so that unlaunched
67 // or incomplete APIs can write tests. 67 // or incomplete APIs can write tests.
68 current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN), 68 current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN),
69 override_prompt_for_external_extensions_( 69 override_prompt_for_external_extensions_(
70 FeatureSwitch::prompt_for_external_extensions(), 70 FeatureSwitch::prompt_for_external_extensions(),
71 false), 71 false),
72 #if defined(OS_WIN)
73 user_desktop_override_(base::DIR_USER_DESKTOP),
74 common_desktop_override_(base::DIR_COMMON_DESKTOP),
75 user_quick_launch_override_(base::DIR_USER_QUICK_LAUNCH),
76 start_menu_override_(base::DIR_START_MENU),
77 common_start_menu_override_(base::DIR_COMMON_START_MENU),
78 #endif
72 profile_(NULL) { 79 profile_(NULL) {
73 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); 80 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
74 } 81 }
75 82
76 ExtensionBrowserTest::~ExtensionBrowserTest() { 83 ExtensionBrowserTest::~ExtensionBrowserTest() {
77 } 84 }
78 85
79 Profile* ExtensionBrowserTest::profile() { 86 Profile* ExtensionBrowserTest::profile() {
80 if (!profile_) { 87 if (!profile_) {
81 if (browser()) 88 if (browser())
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( 652 return extensions::browsertest_util::ExecuteScriptInBackgroundPage(
646 profile(), extension_id, script); 653 profile(), extension_id, script);
647 } 654 }
648 655
649 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( 656 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait(
650 const std::string& extension_id, 657 const std::string& extension_id,
651 const std::string& script) { 658 const std::string& script) {
652 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( 659 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait(
653 profile(), extension_id, script); 660 profile(), extension_id, script);
654 } 661 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698