| 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_path.h" | 10 #include "base/file_path.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 service->UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_DISABLE); | 348 service->UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_DISABLE); |
| 349 } | 349 } |
| 350 | 350 |
| 351 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { | 351 void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { |
| 352 ExtensionService* service = browser()->profile()->GetExtensionService(); | 352 ExtensionService* service = browser()->profile()->GetExtensionService(); |
| 353 service->UninstallExtension(extension_id, false, NULL); | 353 service->UninstallExtension(extension_id, false, NULL); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { | 356 void ExtensionBrowserTest::DisableExtension(const std::string& extension_id) { |
| 357 ExtensionService* service = browser()->profile()->GetExtensionService(); | 357 ExtensionService* service = browser()->profile()->GetExtensionService(); |
| 358 service->DisableExtension(extension_id); | 358 service->DisableExtension(extension_id, Extension::DISABLE_USER_ACTION); |
| 359 } | 359 } |
| 360 | 360 |
| 361 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { | 361 void ExtensionBrowserTest::EnableExtension(const std::string& extension_id) { |
| 362 ExtensionService* service = browser()->profile()->GetExtensionService(); | 362 ExtensionService* service = browser()->profile()->GetExtensionService(); |
| 363 service->EnableExtension(extension_id); | 363 service->EnableExtension(extension_id); |
| 364 } | 364 } |
| 365 | 365 |
| 366 bool ExtensionBrowserTest::WaitForPageActionCountChangeTo(int count) { | 366 bool ExtensionBrowserTest::WaitForPageActionCountChangeTo(int count) { |
| 367 LocationBarTesting* location_bar = | 367 LocationBarTesting* location_bar = |
| 368 browser()->window()->GetLocationBar()->GetLocationBarForTesting(); | 368 browser()->window()->GetLocationBar()->GetLocationBarForTesting(); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 MessageLoopForUI::current()->Quit(); | 532 MessageLoopForUI::current()->Quit(); |
| 533 } | 533 } |
| 534 break; | 534 break; |
| 535 } | 535 } |
| 536 | 536 |
| 537 default: | 537 default: |
| 538 NOTREACHED(); | 538 NOTREACHED(); |
| 539 break; | 539 break; |
| 540 } | 540 } |
| 541 } | 541 } |
| OLD | NEW |