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

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

Issue 10690113: Moving test_api to api/test . (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Adding "extensions::" one more Created 8 years, 5 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
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_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_test_api.h" 10 #include "chrome/browser/extensions/api/test/test_api.h"
11 #include "chrome/browser/extensions/unpacked_installer.h" 11 #include "chrome/browser/extensions/unpacked_installer.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/extensions/application_launch.h" 15 #include "chrome/browser/ui/extensions/application_launch.h"
16 #include "chrome/common/chrome_notification_types.h" 16 #include "chrome/common/chrome_notification_types.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/test/base/ui_test_utils.h" 18 #include "chrome/test/base/ui_test_utils.h"
19 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 default: 95 default:
96 NOTREACHED(); 96 NOTREACHED();
97 } 97 }
98 } 98 }
99 99
100 void ExtensionApiTest::SetUpInProcessBrowserTestFixture() { 100 void ExtensionApiTest::SetUpInProcessBrowserTestFixture() {
101 DCHECK(!test_config_.get()) << "Previous test did not clear config state."; 101 DCHECK(!test_config_.get()) << "Previous test did not clear config state.";
102 test_config_.reset(new DictionaryValue()); 102 test_config_.reset(new DictionaryValue());
103 test_config_->SetString(kTestDataDirectory, 103 test_config_->SetString(kTestDataDirectory,
104 net::FilePathToFileURL(test_data_dir_).spec()); 104 net::FilePathToFileURL(test_data_dir_).spec());
105 ExtensionTestGetConfigFunction::set_test_config_state(test_config_.get()); 105 extensions::ExtensionTestGetConfigFunction::set_test_config_state(
106 test_config_.get());
106 } 107 }
107 108
108 void ExtensionApiTest::TearDownInProcessBrowserTestFixture() { 109 void ExtensionApiTest::TearDownInProcessBrowserTestFixture() {
109 ExtensionTestGetConfigFunction::set_test_config_state(NULL); 110 extensions::ExtensionTestGetConfigFunction::set_test_config_state(NULL);
110 test_config_.reset(NULL); 111 test_config_.reset(NULL);
111 } 112 }
112 113
113 bool ExtensionApiTest::RunExtensionTest(const char* extension_name) { 114 bool ExtensionApiTest::RunExtensionTest(const char* extension_name) {
114 return RunExtensionTestImpl(extension_name, "", kFlagEnableFileAccess); 115 return RunExtensionTestImpl(extension_name, "", kFlagEnableFileAccess);
115 } 116 }
116 117
117 bool ExtensionApiTest::RunExtensionTestIncognito(const char* extension_name) { 118 bool ExtensionApiTest::RunExtensionTestIncognito(const char* extension_name) {
118 return RunExtensionTestImpl( 119 return RunExtensionTestImpl(
119 extension_name, "", kFlagEnableIncognito | kFlagEnableFileAccess); 120 extension_name, "", kFlagEnableIncognito | kFlagEnableFileAccess);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 293
293 void PlatformAppApiTest::SetUpCommandLine(CommandLine* command_line) { 294 void PlatformAppApiTest::SetUpCommandLine(CommandLine* command_line) {
294 ExtensionApiTest::SetUpCommandLine(command_line); 295 ExtensionApiTest::SetUpCommandLine(command_line);
295 296
296 // If someone is using this class, we're going to insist on management of the 297 // If someone is using this class, we're going to insist on management of the
297 // relevant flags. If these flags are already set, die. 298 // relevant flags. If these flags are already set, die.
298 DCHECK(!command_line->HasSwitch(switches::kEnableExperimentalExtensionApis)); 299 DCHECK(!command_line->HasSwitch(switches::kEnableExperimentalExtensionApis));
299 300
300 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis); 301 command_line->AppendSwitch(switches::kEnableExperimentalExtensionApis);
301 } 302 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698