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(id, false, NULL); | 708 extension_service()->UninstallExtension( |
| 709 id, ExtensionService::UNINSTALL_REASON_DEFAULT, NULL); |
709 observer.Wait(); | 710 observer.Wait(); |
710 } | 711 } |
711 | 712 |
712 void UpdateProviderPolicy(const PolicyMap& policy) { | 713 void UpdateProviderPolicy(const PolicyMap& policy) { |
713 provider_.UpdateChromePolicy(policy); | 714 provider_.UpdateChromePolicy(policy); |
714 DCHECK(base::MessageLoop::current()); | 715 DCHECK(base::MessageLoop::current()); |
715 base::RunLoop loop; | 716 base::RunLoop loop; |
716 loop.RunUntilIdle(); | 717 loop.RunUntilIdle(); |
717 } | 718 } |
718 | 719 |
(...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3039 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3040 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
3040 browser2->tab_strip_model()->GetActiveWebContents(), | 3041 browser2->tab_strip_model()->GetActiveWebContents(), |
3041 "domAutomationController.send(window.showModalDialog !== undefined);", | 3042 "domAutomationController.send(window.showModalDialog !== undefined);", |
3042 &result)); | 3043 &result)); |
3043 EXPECT_TRUE(result); | 3044 EXPECT_TRUE(result); |
3044 } | 3045 } |
3045 | 3046 |
3046 #endif // !defined(CHROME_OS) | 3047 #endif // !defined(CHROME_OS) |
3047 | 3048 |
3048 } // namespace policy | 3049 } // namespace policy |
OLD | NEW |