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

Side by Side Diff: chrome/browser/extensions/api/management/management_api_browsertest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/extensions/api/management/management_api.h" 10 #include "chrome/browser/extensions/api/management/management_api.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 SetEnabled(true, false, keys::kGestureNeededForEscalationError); 250 SetEnabled(true, false, keys::kGestureNeededForEscalationError);
251 251
252 // Expect an error that user cancelled the dialog. 252 // Expect an error that user cancelled the dialog.
253 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 253 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
254 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); 254 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel");
255 SetEnabled(true, true, keys::kUserDidNotReEnableError); 255 SetEnabled(true, true, keys::kUserDidNotReEnableError);
256 256
257 // This should succeed when user accepts dialog. 257 // This should succeed when user accepts dialog.
258 CommandLine::ForCurrentProcess()->AppendSwitchASCII( 258 CommandLine::ForCurrentProcess()->AppendSwitchASCII(
259 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); 259 switches::kAppsGalleryInstallAutoConfirmForTests, "accept");
260 SetEnabled(true, true, ""); 260 SetEnabled(true, true, std::string());
261 261
262 // Crash the extension. Mock a reload by disabling and then enabling. The 262 // Crash the extension. Mock a reload by disabling and then enabling. The
263 // extension should be reloaded and enabled. 263 // extension should be reloaded and enabled.
264 ASSERT_TRUE(CrashEnabledExtension(kId)); 264 ASSERT_TRUE(CrashEnabledExtension(kId));
265 SetEnabled(false, true, ""); 265 SetEnabled(false, true, std::string());
266 SetEnabled(true, true, ""); 266 SetEnabled(true, true, std::string());
267 const Extension* extension = ExtensionSystem::Get(browser()->profile())-> 267 const Extension* extension = ExtensionSystem::Get(browser()->profile())
268 extension_service()->GetExtensionById(kId, false); 268 ->extension_service()->GetExtensionById(kId, false);
269 EXPECT_TRUE(extension); 269 EXPECT_TRUE(extension);
270 } 270 }
271 271
272 } // namespace extensions 272 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_apitest.cc ('k') | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698