Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Side by Side Diff: chrome/browser/managed_mode/managed_mode_browsertest.cc

Issue 289083004: infobars: Componentize ConfirmInfoBarDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/common/cancelable_request.h" 10 #include "chrome/browser/common/cancelable_request.h"
11 #include "chrome/browser/history/history_service_factory.h" 11 #include "chrome/browser/history/history_service_factory.h"
12 #include "chrome/browser/infobars/confirm_infobar_delegate.h"
13 #include "chrome/browser/infobars/infobar_service.h" 12 #include "chrome/browser/infobars/infobar_service.h"
14 #include "chrome/browser/managed_mode/managed_mode_interstitial.h" 13 #include "chrome/browser/managed_mode/managed_mode_interstitial.h"
15 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h" 14 #include "chrome/browser/managed_mode/managed_mode_navigation_observer.h"
16 #include "chrome/browser/managed_mode/managed_user_constants.h" 15 #include "chrome/browser/managed_mode/managed_user_constants.h"
17 #include "chrome/browser/managed_mode/managed_user_service.h" 16 #include "chrome/browser/managed_mode/managed_user_service.h"
18 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 17 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
19 #include "chrome/browser/managed_mode/managed_user_settings_service.h" 18 #include "chrome/browser/managed_mode/managed_user_settings_service.h"
20 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h" 19 #include "chrome/browser/managed_mode/managed_user_settings_service_factory.h"
21 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/browser.h" 21 #include "chrome/browser/ui/browser.h"
23 #include "chrome/browser/ui/browser_navigator.h" 22 #include "chrome/browser/ui/browser_navigator.h"
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model.h"
25 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 24 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
26 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/pref_names.h" 26 #include "chrome/common/pref_names.h"
28 #include "chrome/test/base/in_process_browser_test.h" 27 #include "chrome/test/base/in_process_browser_test.h"
29 #include "chrome/test/base/ui_test_utils.h" 28 #include "chrome/test/base/ui_test_utils.h"
29 #include "components/infobars/core/confirm_infobar_delegate.h"
30 #include "components/infobars/core/infobar.h" 30 #include "components/infobars/core/infobar.h"
31 #include "components/pref_registry/pref_registry_syncable.h" 31 #include "components/pref_registry/pref_registry_syncable.h"
32 #include "content/public/browser/interstitial_page.h" 32 #include "content/public/browser/interstitial_page.h"
33 #include "content/public/browser/navigation_controller.h" 33 #include "content/public/browser/navigation_controller.h"
34 #include "content/public/browser/navigation_entry.h" 34 #include "content/public/browser/navigation_entry.h"
35 #include "content/public/browser/notification_service.h" 35 #include "content/public/browser/notification_service.h"
36 #include "content/public/browser/web_contents.h" 36 #include "content/public/browser/web_contents.h"
37 #include "content/public/browser/web_contents_observer.h" 37 #include "content/public/browser/web_contents_observer.h"
38 #include "content/public/test/browser_test_utils.h" 38 #include "content/public/test/browser_test_utils.h"
39 #include "grit/generated_resources.h" 39 #include "grit/generated_resources.h"
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 dict.PassAs<base::Value>()); 304 dict.PassAs<base::Value>());
305 EXPECT_EQ( 305 EXPECT_EQ(
306 ManagedUserService::MANUAL_ALLOW, 306 ManagedUserService::MANUAL_ALLOW,
307 managed_user_service_->GetManualBehaviorForHost(test_url.host())); 307 managed_user_service_->GetManualBehaviorForHost(test_url.host()));
308 308
309 observer.Wait(); 309 observer.Wait();
310 EXPECT_EQ(test_url, web_contents->GetURL()); 310 EXPECT_EQ(test_url, web_contents->GetURL());
311 } 311 }
312 312
313 } // namespace 313 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698