OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/supervised_user/supervised_user_resource_throttle.h" | 5 #include "chrome/browser/supervised_user/supervised_user_resource_throttle.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/prefs/pref_service.h" | |
9 #include "base/values.h" | 8 #include "base/values.h" |
10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 10 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
12 #include "chrome/browser/supervised_user/supervised_user_service.h" | 11 #include "chrome/browser/supervised_user/supervised_user_service.h" |
13 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | 12 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" |
14 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 13 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
15 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" | 14 #include "chrome/browser/supervised_user/supervised_user_settings_service_factor
y.h" |
16 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 17 #include "chrome/test/base/in_process_browser_test.h" |
| 18 #include "components/prefs/pref_service.h" |
19 #include "content/public/browser/navigation_entry.h" | 19 #include "content/public/browser/navigation_entry.h" |
20 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
21 #include "content/public/common/page_type.h" | 21 #include "content/public/common/page_type.h" |
22 #include "content/public/test/test_navigation_observer.h" | 22 #include "content/public/test/test_navigation_observer.h" |
23 #include "content/public/test/test_utils.h" | 23 #include "content/public/test/test_utils.h" |
24 | 24 |
25 using content::MessageLoopRunner; | 25 using content::MessageLoopRunner; |
26 using content::NavigationController; | 26 using content::NavigationController; |
27 using content::WebContents; | 27 using content::WebContents; |
28 | 28 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 WebContents::Create(WebContents::CreateParams(profile))); | 64 WebContents::Create(WebContents::CreateParams(profile))); |
65 NavigationController& controller = web_contents->GetController(); | 65 NavigationController& controller = web_contents->GetController(); |
66 content::TestNavigationObserver observer(web_contents.get()); | 66 content::TestNavigationObserver observer(web_contents.get()); |
67 controller.LoadURL(GURL("http://www.example.com"), content::Referrer(), | 67 controller.LoadURL(GURL("http://www.example.com"), content::Referrer(), |
68 ui::PAGE_TRANSITION_TYPED, std::string()); | 68 ui::PAGE_TRANSITION_TYPED, std::string()); |
69 observer.Wait(); | 69 observer.Wait(); |
70 content::NavigationEntry* entry = controller.GetActiveEntry(); | 70 content::NavigationEntry* entry = controller.GetActiveEntry(); |
71 ASSERT_TRUE(entry); | 71 ASSERT_TRUE(entry); |
72 EXPECT_EQ(content::PAGE_TYPE_INTERSTITIAL, entry->GetPageType()); | 72 EXPECT_EQ(content::PAGE_TYPE_INTERSTITIAL, entry->GetPageType()); |
73 } | 73 } |
OLD | NEW |