| 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 return it->get(); | 698 return it->get(); |
| 699 } | 699 } |
| 700 return NULL; | 700 return NULL; |
| 701 } | 701 } |
| 702 | 702 |
| 703 void UninstallExtension(const std::string& id, bool expect_success) { | 703 void UninstallExtension(const std::string& id, bool expect_success) { |
| 704 content::WindowedNotificationObserver observer( | 704 content::WindowedNotificationObserver observer( |
| 705 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED | 705 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED |
| 706 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, | 706 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, |
| 707 content::NotificationService::AllSources()); | 707 content::NotificationService::AllSources()); |
| 708 extension_service()->UninstallExtension( | 708 extension_service()->UninstallExtension(id, false, NULL); |
| 709 id, ExtensionService::UNINSTALL_REASON_FOR_TESTING, NULL); | |
| 710 observer.Wait(); | 709 observer.Wait(); |
| 711 } | 710 } |
| 712 | 711 |
| 713 void UpdateProviderPolicy(const PolicyMap& policy) { | 712 void UpdateProviderPolicy(const PolicyMap& policy) { |
| 714 provider_.UpdateChromePolicy(policy); | 713 provider_.UpdateChromePolicy(policy); |
| 715 DCHECK(base::MessageLoop::current()); | 714 DCHECK(base::MessageLoop::current()); |
| 716 base::RunLoop loop; | 715 base::RunLoop loop; |
| 717 loop.RunUntilIdle(); | 716 loop.RunUntilIdle(); |
| 718 } | 717 } |
| 719 | 718 |
| (...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3039 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 3041 browser2->tab_strip_model()->GetActiveWebContents(), | 3040 browser2->tab_strip_model()->GetActiveWebContents(), |
| 3042 "domAutomationController.send(window.showModalDialog !== undefined);", | 3041 "domAutomationController.send(window.showModalDialog !== undefined);", |
| 3043 &result)); | 3042 &result)); |
| 3044 EXPECT_TRUE(result); | 3043 EXPECT_TRUE(result); |
| 3045 } | 3044 } |
| 3046 | 3045 |
| 3047 #endif // !defined(CHROME_OS) | 3046 #endif // !defined(CHROME_OS) |
| 3048 | 3047 |
| 3049 } // namespace policy | 3048 } // namespace policy |
| OLD | NEW |