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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 } | 702 } |
703 return NULL; | 703 return NULL; |
704 } | 704 } |
705 | 705 |
706 void UninstallExtension(const std::string& id, bool expect_success) { | 706 void UninstallExtension(const std::string& id, bool expect_success) { |
707 content::WindowedNotificationObserver observer( | 707 content::WindowedNotificationObserver observer( |
708 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED | 708 expect_success ? chrome::NOTIFICATION_EXTENSION_UNINSTALLED_DEPRECATED |
709 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, | 709 : chrome::NOTIFICATION_EXTENSION_UNINSTALL_NOT_ALLOWED, |
710 content::NotificationService::AllSources()); | 710 content::NotificationService::AllSources()); |
711 extension_service()->UninstallExtension( | 711 extension_service()->UninstallExtension( |
712 id, extensions::UNINSTALL_REASON_FOR_TESTING, NULL); | 712 id, |
| 713 extensions::UNINSTALL_REASON_FOR_TESTING, |
| 714 base::Bind(&base::DoNothing), |
| 715 NULL); |
713 observer.Wait(); | 716 observer.Wait(); |
714 } | 717 } |
715 | 718 |
716 void UpdateProviderPolicy(const PolicyMap& policy) { | 719 void UpdateProviderPolicy(const PolicyMap& policy) { |
717 provider_.UpdateChromePolicy(policy); | 720 provider_.UpdateChromePolicy(policy); |
718 DCHECK(base::MessageLoop::current()); | 721 DCHECK(base::MessageLoop::current()); |
719 base::RunLoop loop; | 722 base::RunLoop loop; |
720 loop.RunUntilIdle(); | 723 loop.RunUntilIdle(); |
721 } | 724 } |
722 | 725 |
(...skipping 2452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3175 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3178 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3176 browser2->tab_strip_model()->GetActiveWebContents(), | 3179 browser2->tab_strip_model()->GetActiveWebContents(), |
3177 "domAutomationController.send(window.showModalDialog !== undefined);", | 3180 "domAutomationController.send(window.showModalDialog !== undefined);", |
3178 &result)); | 3181 &result)); |
3179 EXPECT_TRUE(result); | 3182 EXPECT_TRUE(result); |
3180 } | 3183 } |
3181 | 3184 |
3182 #endif // !defined(CHROME_OS) | 3185 #endif // !defined(CHROME_OS) |
3183 | 3186 |
3184 } // namespace policy | 3187 } // namespace policy |
OLD | NEW |