| OLD | NEW |
| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { | 519 void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { |
| 520 ExtensionService* service = extensions::ExtensionSystem::Get( | 520 ExtensionService* service = extensions::ExtensionSystem::Get( |
| 521 profile())->extension_service(); | 521 profile())->extension_service(); |
| 522 service->UnloadExtension(extension_id, | 522 service->UnloadExtension(extension_id, |
| 523 extensions::UnloadedExtensionInfo::REASON_DISABLE); | 523 extensions::UnloadedExtensionInfo::REASON_DISABLE); |
| 524 } | 524 } |
| 525 | 525 |
| 526 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { | 526 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { |
| 527 ExtensionService* service = extensions::ExtensionSystem::Get( | 527 ExtensionService* service = extensions::ExtensionSystem::Get( |
| 528 profile())->extension_service(); | 528 profile())->extension_service(); |
| 529 service->UninstallExtension(extension_id, false, NULL); | 529 service->UninstallExtension( |
| 530 extension_id, ExtensionService::kUninstallReasonDefault, NULL); |
| 530 } | 531 } |
| 531 | 532 |
| 532 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { | 533 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { |
| 533 ExtensionService* service = extensions::ExtensionSystem::Get( | 534 ExtensionService* service = extensions::ExtensionSystem::Get( |
| 534 profile())->extension_service(); | 535 profile())->extension_service(); |
| 535 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION); | 536 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION); |
| 536 } | 537 } |
| 537 | 538 |
| 538 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { | 539 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { |
| 539 ExtensionService* service = extensions::ExtensionSystem::Get( | 540 ExtensionService* service = extensions::ExtensionSystem::Get( |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 617 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
| 617 profile(), extension_id, script); | 618 profile(), extension_id, script); |
| 618 } | 619 } |
| 619 | 620 |
| 620 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 621 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
| 621 const std::string& extension_id, | 622 const std::string& extension_id, |
| 622 const std::string& script) { | 623 const std::string& script) { |
| 623 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 624 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
| 624 profile(), extension_id, script); | 625 profile(), extension_id, script); |
| 625 } | 626 } |
| OLD | NEW |