| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" | 9 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h" |
| 10 #include "chrome/browser/infobars/infobar.h" | 10 #include "chrome/browser/infobars/infobar.h" |
| 11 #include "chrome/browser/infobars/infobar_tab_helper.h" | 11 #include "chrome/browser/infobars/infobar_tab_helper.h" |
| 12 #include "chrome/browser/managed_mode/managed_mode.h" | 12 #include "chrome/browser/managed_mode/managed_mode.h" |
| 13 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" | 13 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" |
| 14 #include "chrome/browser/managed_mode/managed_user_service.h" | 14 #include "chrome/browser/managed_mode/managed_user_service.h" |
| 15 #include "chrome/browser/managed_mode/managed_user_service_factory.h" | 15 #include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| 16 #include "chrome/browser/prefs/pref_registry_syncable.h" | |
| 17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/browser/ui/browser_navigator.h" | 18 #include "chrome/browser/ui/browser_navigator.h" |
| 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 21 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 20 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
| 22 #include "chrome/common/chrome_notification_types.h" | 21 #include "chrome/common/chrome_notification_types.h" |
| 23 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 25 #include "chrome/test/base/in_process_browser_test.h" | 24 #include "chrome/test/base/in_process_browser_test.h" |
| 26 #include "chrome/test/base/ui_test_utils.h" | 25 #include "chrome/test/base/ui_test_utils.h" |
| 26 #include "components/user_prefs/pref_registry_syncable.h" |
| 27 #include "content/public/browser/interstitial_page.h" | 27 #include "content/public/browser/interstitial_page.h" |
| 28 #include "content/public/browser/navigation_controller.h" | 28 #include "content/public/browser/navigation_controller.h" |
| 29 #include "content/public/browser/navigation_entry.h" | 29 #include "content/public/browser/navigation_entry.h" |
| 30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
| 31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/browser/web_contents_observer.h" | 32 #include "content/public/browser/web_contents_observer.h" |
| 33 | 33 |
| 34 using content::InterstitialPage; | 34 using content::InterstitialPage; |
| 35 using content::NavigationController; | 35 using content::NavigationController; |
| 36 using content::NavigationEntry; | 36 using content::NavigationEntry; |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 // Get the ManagedModeInterstitial delegate. | 544 // Get the ManagedModeInterstitial delegate. |
| 545 content::InterstitialPageDelegate* delegate = | 545 content::InterstitialPageDelegate* delegate = |
| 546 interstitial_page->GetDelegateForTesting(); | 546 interstitial_page->GetDelegateForTesting(); |
| 547 | 547 |
| 548 // Simulate the click on the "preview" button. | 548 // Simulate the click on the "preview" button. |
| 549 delegate->CommandReceived("\"preview\""); | 549 delegate->CommandReceived("\"preview\""); |
| 550 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 550 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 551 WebContentsModalDialogManager::FromWebContents(tab); | 551 WebContentsModalDialogManager::FromWebContents(tab); |
| 552 EXPECT_TRUE(web_contents_modal_dialog_manager->IsShowingDialog()); | 552 EXPECT_TRUE(web_contents_modal_dialog_manager->IsShowingDialog()); |
| 553 } | 553 } |
| OLD | NEW |