| 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/managed_mode.h" | 5 #include "chrome/browser/managed_mode/managed_mode.h" |
| 6 #include "chrome/browser/extensions/extension_apitest.h" | 6 #include "chrome/browser/extensions/extension_apitest.h" |
| 7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
| 9 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
| 10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
| 11 | 11 |
| 12 // Tests enabling and querying managed mode. | 12 // Tests enabling and querying managed mode. |
| 13 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) { | 13 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeGetAndEnable) { |
| 14 ASSERT_FALSE(ManagedMode::IsInManagedMode()); | 14 ASSERT_FALSE(ManagedMode::IsInManagedMode()); |
| 15 | 15 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 // Fire the extension event when entering managed mode. We directly call | 39 // Fire the extension event when entering managed mode. We directly call |
| 40 // SetInManagedMode() to bypass any confirmation dialogs etc. | 40 // SetInManagedMode() to bypass any confirmation dialogs etc. |
| 41 ManagedMode::GetInstance()->SetInManagedMode(browser()->profile()); | 41 ManagedMode::GetInstance()->SetInManagedMode(browser()->profile()); |
| 42 | 42 |
| 43 // Fire the extension event when leaving managed mode. | 43 // Fire the extension event when leaving managed mode. |
| 44 ManagedMode::GetInstance()->SetInManagedMode(NULL); | 44 ManagedMode::GetInstance()->SetInManagedMode(NULL); |
| 45 | 45 |
| 46 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 46 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 47 } | 47 } |
| OLD | NEW |