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

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

Issue 421193002: Fix ExtensionServiceTest.ClearExtensionData flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use base::DoNothing for empty callbacks Created 6 years, 4 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { 545 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) {
546 ExtensionService* service = extensions::ExtensionSystem::Get( 546 ExtensionService* service = extensions::ExtensionSystem::Get(
547 profile())->extension_service(); 547 profile())->extension_service();
548 service->UnloadExtension(extension_id, 548 service->UnloadExtension(extension_id,
549 extensions::UnloadedExtensionInfo::REASON_DISABLE); 549 extensions::UnloadedExtensionInfo::REASON_DISABLE);
550 } 550 }
551 551
552 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { 552 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) {
553 ExtensionService* service = extensions::ExtensionSystem::Get( 553 ExtensionService* service = extensions::ExtensionSystem::Get(
554 profile())->extension_service(); 554 profile())->extension_service();
555 service->UninstallExtension( 555 service->UninstallExtension(extension_id,
556 extension_id, extensions::UNINSTALL_REASON_FOR_TESTING, NULL); 556 extensions::UNINSTALL_REASON_FOR_TESTING,
557 base::Bind(&base::DoNothing),
558 NULL);
557 } 559 }
558 560
559 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { 561 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) {
560 ExtensionService* service = extensions::ExtensionSystem::Get( 562 ExtensionService* service = extensions::ExtensionSystem::Get(
561 profile())->extension_service(); 563 profile())->extension_service();
562 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION); 564 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION);
563 } 565 }
564 566
565 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { 567 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) {
566 ExtensionService* service = extensions::ExtensionSystem::Get( 568 ExtensionService* service = extensions::ExtensionSystem::Get(
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( 645 return extensions::browsertest_util::ExecuteScriptInBackgroundPage(
644 profile(), extension_id, script); 646 profile(), extension_id, script);
645 } 647 }
646 648
647 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( 649 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait(
648 const std::string& extension_id, 650 const std::string& extension_id,
649 const std::string& script) { 651 const std::string& script) {
650 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( 652 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait(
651 profile(), extension_id, script); 653 profile(), extension_id, script);
652 } 654 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/data_deleter.cc ('k') | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698