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

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

Issue 13590004: Revert 192504 "Re-apply 192420: Move login switches to src/chromeos" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 8 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 28 matching lines...) Expand all
39 #include "chrome/test/base/ui_test_utils.h" 39 #include "chrome/test/base/ui_test_utils.h"
40 #include "content/public/browser/navigation_controller.h" 40 #include "content/public/browser/navigation_controller.h"
41 #include "content/public/browser/navigation_entry.h" 41 #include "content/public/browser/navigation_entry.h"
42 #include "content/public/browser/notification_registrar.h" 42 #include "content/public/browser/notification_registrar.h"
43 #include "content/public/browser/notification_service.h" 43 #include "content/public/browser/notification_service.h"
44 #include "content/public/browser/render_view_host.h" 44 #include "content/public/browser/render_view_host.h"
45 #include "content/public/test/browser_test_utils.h" 45 #include "content/public/test/browser_test_utils.h"
46 #include "extensions/common/constants.h" 46 #include "extensions/common/constants.h"
47 #include "sync/api/string_ordinal.h" 47 #include "sync/api/string_ordinal.h"
48 48
49 #if defined(OS_CHROMEOS)
50 #include "chromeos/chromeos_switches.h"
51 #endif
52
53 using extensions::Extension; 49 using extensions::Extension;
54 using extensions::ExtensionCreator; 50 using extensions::ExtensionCreator;
55 using extensions::FeatureSwitch; 51 using extensions::FeatureSwitch;
56 using extensions::Manifest; 52 using extensions::Manifest;
57 53
58 ExtensionBrowserTest::ExtensionBrowserTest() 54 ExtensionBrowserTest::ExtensionBrowserTest()
59 : loaded_(false), 55 : loaded_(false),
60 installed_(false), 56 installed_(false),
61 extension_installs_observed_(0), 57 extension_installs_observed_(0),
62 extension_load_errors_observed_(0), 58 extension_load_errors_observed_(0),
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 94 }
99 95
100 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { 96 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) {
101 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); 97 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
102 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); 98 test_data_dir_ = test_data_dir_.AppendASCII("extensions");
103 99
104 #if defined(OS_CHROMEOS) 100 #if defined(OS_CHROMEOS)
105 // This makes sure that we create the Default profile first, with no 101 // This makes sure that we create the Default profile first, with no
106 // ExtensionService and then the real profile with one, as we do when 102 // ExtensionService and then the real profile with one, as we do when
107 // running on chromeos. 103 // running on chromeos.
108 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, 104 command_line->AppendSwitchASCII(switches::kLoginUser,
109 "TestUser@gmail.com"); 105 "TestUser@gmail.com");
110 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 106 command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
111 #endif 107 #endif
112 } 108 }
113 109
114 void ExtensionBrowserTest::SetUpOnMainThread() { 110 void ExtensionBrowserTest::SetUpOnMainThread() {
115 InProcessBrowserTest::SetUpOnMainThread(); 111 InProcessBrowserTest::SetUpOnMainThread();
116 } 112 }
117 113
118 const Extension* ExtensionBrowserTest::LoadExtensionWithFlags( 114 const Extension* ExtensionBrowserTest::LoadExtensionWithFlags(
119 const base::FilePath& path, int flags) { 115 const base::FilePath& path, int flags) {
120 ExtensionService* service = extensions::ExtensionSystem::Get( 116 ExtensionService* service = extensions::ExtensionSystem::Get(
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 case content::NOTIFICATION_LOAD_STOP: 727 case content::NOTIFICATION_LOAD_STOP:
732 VLOG(1) << "Got LOAD_STOP notification."; 728 VLOG(1) << "Got LOAD_STOP notification.";
733 MessageLoopForUI::current()->Quit(); 729 MessageLoopForUI::current()->Quit();
734 break; 730 break;
735 731
736 default: 732 default:
737 NOTREACHED(); 733 NOTREACHED();
738 break; 734 break;
739 } 735 }
740 } 736 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/extensions/component_loader.cc ('k') | trunk/src/chrome/browser/extensions/extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698