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

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

Issue 12832004: content: Move all listeners of NOTIFICATION_RENDER_VIEW_HOST_CREATED out of content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/managed_mode_resource_throttle.h" 5 #include "chrome/browser/managed_mode/managed_mode_resource_throttle.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/managed_mode/managed_user_service.h" 8 #include "chrome/browser/managed_mode/managed_user_service.h"
9 #include "chrome/browser/managed_mode/managed_user_service_factory.h" 9 #include "chrome/browser/managed_mode/managed_user_service_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 30 matching lines...) Expand all
41 managed_user_service_->Init(); 41 managed_user_service_->Init();
42 } 42 }
43 43
44 // Tests that showing the blocking interstitial for a WebContents without a 44 // Tests that showing the blocking interstitial for a WebContents without a
45 // ManagedModeNavigationObserver doesn't crash. 45 // ManagedModeNavigationObserver doesn't crash.
46 IN_PROC_BROWSER_TEST_F(ManagedModeResourceThrottleTest, NoNavigationObserver) { 46 IN_PROC_BROWSER_TEST_F(ManagedModeResourceThrottleTest, NoNavigationObserver) {
47 scoped_ptr<WebContents> web_contents( 47 scoped_ptr<WebContents> web_contents(
48 WebContents::Create(WebContents::CreateParams(browser()->profile()))); 48 WebContents::Create(WebContents::CreateParams(browser()->profile())));
49 NavigationController& controller = web_contents->GetController(); 49 NavigationController& controller = web_contents->GetController();
50 content::TestNavigationObserver observer( 50 content::TestNavigationObserver observer(
51 content::Source<NavigationController>(&controller), NULL, 1); 51 content::Source<NavigationController>(&controller), 1);
52 controller.LoadURL(GURL("http://www.example.com"), content::Referrer(), 52 controller.LoadURL(GURL("http://www.example.com"), content::Referrer(),
53 content::PAGE_TRANSITION_TYPED, std::string()); 53 content::PAGE_TRANSITION_TYPED, std::string());
54 observer.Wait(); 54 observer.Wait();
55 content::NavigationEntry* entry = controller.GetActiveEntry(); 55 content::NavigationEntry* entry = controller.GetActiveEntry();
56 ASSERT_TRUE(entry); 56 ASSERT_TRUE(entry);
57 EXPECT_EQ(content::PAGE_TYPE_INTERSTITIAL, entry->GetPageType()); 57 EXPECT_EQ(content::PAGE_TYPE_INTERSTITIAL, entry->GetPageType());
58 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/history/redirect_browsertest.cc ('k') | chrome/browser/performance_monitor/performance_monitor_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698