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

Side by Side Diff: chrome/test/base/browser_with_test_window_test.cc

Issue 950053002: Cache the Windows Parental Controls Platform Answer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit Test Fixes Created 5 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
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 "chrome/test/base/browser_with_test_window_test.h" 5 #include "chrome/test/base/browser_with_test_window_test.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/profiles/profile_destroyer.h" 8 #include "chrome/browser/profiles/profile_destroyer.h"
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_navigator.h" 10 #include "chrome/browser/ui/browser_navigator.h"
(...skipping 17 matching lines...) Expand all
28 #include "ash/test/ash_test_helper.h" 28 #include "ash/test/ash_test_helper.h"
29 #include "ash/test/ash_test_views_delegate.h" 29 #include "ash/test/ash_test_views_delegate.h"
30 #endif 30 #endif
31 31
32 #if defined(TOOLKIT_VIEWS) 32 #if defined(TOOLKIT_VIEWS)
33 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" 33 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
34 #include "components/constrained_window/constrained_window_views.h" 34 #include "components/constrained_window/constrained_window_views.h"
35 #include "ui/views/test/test_views_delegate.h" 35 #include "ui/views/test/test_views_delegate.h"
36 #endif 36 #endif
37 37
38 #if defined(OS_WIN)
39 #include "chrome/browser/prefs/incognito_mode_prefs.h"
40 #endif
41
38 using content::NavigationController; 42 using content::NavigationController;
39 using content::RenderFrameHost; 43 using content::RenderFrameHost;
40 using content::RenderFrameHostTester; 44 using content::RenderFrameHostTester;
41 using content::WebContents; 45 using content::WebContents;
42 46
43 BrowserWithTestWindowTest::BrowserWithTestWindowTest() 47 BrowserWithTestWindowTest::BrowserWithTestWindowTest()
44 : browser_type_(Browser::TYPE_TABBED), 48 : browser_type_(Browser::TYPE_TABBED),
45 host_desktop_type_(chrome::HOST_DESKTOP_TYPE_NATIVE), 49 host_desktop_type_(chrome::HOST_DESKTOP_TYPE_NATIVE),
46 hosted_app_(false) { 50 hosted_app_(false) {
47 } 51 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 new wm::DefaultActivationClient(aura_test_helper_->root_window()); 84 new wm::DefaultActivationClient(aura_test_helper_->root_window());
81 #endif // USE_AURA 85 #endif // USE_AURA
82 86
83 #if defined(TOOLKIT_VIEWS) 87 #if defined(TOOLKIT_VIEWS)
84 #if !defined(OS_CHROMEOS) 88 #if !defined(OS_CHROMEOS)
85 views_delegate_.reset(CreateViewsDelegate()); 89 views_delegate_.reset(CreateViewsDelegate());
86 #endif // !OS_CHROMEOS 90 #endif // !OS_CHROMEOS
87 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); 91 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
88 #endif // TOOLKIT_VIEWS 92 #endif // TOOLKIT_VIEWS
89 93
94 #if defined(OS_WIN)
95 IncognitoModePrefs::InitializePlatformParentalControls();
96 #endif // OS_WIN
97
90 // Subclasses can provide their own Profile. 98 // Subclasses can provide their own Profile.
91 profile_ = CreateProfile(); 99 profile_ = CreateProfile();
92 // Subclasses can provide their own test BrowserWindow. If they return NULL 100 // Subclasses can provide their own test BrowserWindow. If they return NULL
93 // then Browser will create the a production BrowserWindow and the subclass 101 // then Browser will create the a production BrowserWindow and the subclass
94 // is responsible for cleaning it up (usually by NativeWidget destruction). 102 // is responsible for cleaning it up (usually by NativeWidget destruction).
95 window_.reset(CreateBrowserWindow()); 103 window_.reset(CreateBrowserWindow());
96 104
97 browser_.reset(CreateBrowser(profile(), browser_type_, hosted_app_, 105 browser_.reset(CreateBrowser(profile(), browser_type_, hosted_app_,
98 host_desktop_type_, window_.get())); 106 host_desktop_type_, window_.get()));
99 } 107 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 259
252 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS) 260 #if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
253 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() { 261 views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
254 #if defined(USE_ASH) 262 #if defined(USE_ASH)
255 return new ash::test::AshTestViewsDelegate; 263 return new ash::test::AshTestViewsDelegate;
256 #else 264 #else
257 return new views::TestViewsDelegate; 265 return new views::TestViewsDelegate;
258 #endif 266 #endif
259 } 267 }
260 #endif 268 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698