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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 29 matching lines...) Expand all
40 #include "ui/aura/window.h" 40 #include "ui/aura/window.h"
41 #include "ui/base/clipboard/clipboard.h" 41 #include "ui/base/clipboard/clipboard.h"
42 #include "ui/base/test/ui_controls.h" 42 #include "ui/base/test/ui_controls.h"
43 #include "ui/events/keycodes/keyboard_codes.h" 43 #include "ui/events/keycodes/keyboard_codes.h"
44 #include "ui/views/controls/button/menu_button.h" 44 #include "ui/views/controls/button/menu_button.h"
45 #include "ui/views/controls/menu/menu_controller.h" 45 #include "ui/views/controls/menu/menu_controller.h"
46 #include "ui/views/controls/menu/menu_item_view.h" 46 #include "ui/views/controls/menu/menu_item_view.h"
47 #include "ui/views/controls/menu/submenu_view.h" 47 #include "ui/views/controls/menu/submenu_view.h"
48 #include "ui/views/widget/widget.h" 48 #include "ui/views/widget/widget.h"
49 49
50 #if defined(OS_WIN)
51 #include "chrome/browser/prefs/incognito_mode_prefs.h"
52 #endif // defined(OS_WIN)
53
50 using base::ASCIIToUTF16; 54 using base::ASCIIToUTF16;
51 using bookmarks::BookmarkModel; 55 using bookmarks::BookmarkModel;
52 using bookmarks::BookmarkNode; 56 using bookmarks::BookmarkNode;
53 using content::BrowserThread; 57 using content::BrowserThread;
54 using content::OpenURLParams; 58 using content::OpenURLParams;
55 using content::PageNavigator; 59 using content::PageNavigator;
56 using content::WebContents; 60 using content::WebContents;
57 61
58 namespace { 62 namespace {
59 63
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void SetUp() override { 260 void SetUp() override {
257 content_client_.reset(new ChromeContentClient); 261 content_client_.reset(new ChromeContentClient);
258 content::SetContentClient(content_client_.get()); 262 content::SetContentClient(content_client_.get());
259 browser_content_client_.reset(new chrome::ChromeContentBrowserClient()); 263 browser_content_client_.reset(new chrome::ChromeContentBrowserClient());
260 content::SetBrowserClientForTesting(browser_content_client_.get()); 264 content::SetBrowserClientForTesting(browser_content_client_.get());
261 265
262 views::MenuController::TurnOffMenuSelectionHoldForTest(); 266 views::MenuController::TurnOffMenuSelectionHoldForTest();
263 BookmarkBarView::DisableAnimationsForTesting(true); 267 BookmarkBarView::DisableAnimationsForTesting(true);
264 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient()); 268 SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
265 269
270 #if defined(OS_WIN)
271 IncognitoModePrefs::InitializePlatformParentalControls();
272 #endif // defined(OS_WIN)
273
266 profile_.reset(new TestingProfile()); 274 profile_.reset(new TestingProfile());
267 profile_->CreateBookmarkModel(true); 275 profile_->CreateBookmarkModel(true);
268 model_ = BookmarkModelFactory::GetForProfile(profile_.get()); 276 model_ = BookmarkModelFactory::GetForProfile(profile_.get());
269 bookmarks::test::WaitForBookmarkModelToLoad(model_); 277 bookmarks::test::WaitForBookmarkModelToLoad(model_);
270 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true); 278 profile_->GetPrefs()->SetBoolean(bookmarks::prefs::kShowBookmarkBar, true);
271 279
272 Browser::CreateParams native_params(profile_.get(), 280 Browser::CreateParams native_params(profile_.get(),
273 chrome::GetActiveDesktop()); 281 chrome::GetActiveDesktop());
274 browser_.reset( 282 browser_.reset(
275 chrome::CreateBrowserWithTestWindowForParams(&native_params)); 283 chrome::CreateBrowserWithTestWindowForParams(&native_params));
(...skipping 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after
2053 }; 2061 };
2054 2062
2055 #if defined(OS_WIN) 2063 #if defined(OS_WIN)
2056 // This test times out on Windows. TODO(pkotwicz): Find out why. 2064 // This test times out on Windows. TODO(pkotwicz): Find out why.
2057 #define MAYBE_CloseSourceBrowserDuringDrag DISABLED_CloseSourceBrowserDuringDrag 2065 #define MAYBE_CloseSourceBrowserDuringDrag DISABLED_CloseSourceBrowserDuringDrag
2058 #else 2066 #else
2059 #define MAYBE_CloseSourceBrowserDuringDrag CloseSourceBrowserDuringDrag 2067 #define MAYBE_CloseSourceBrowserDuringDrag CloseSourceBrowserDuringDrag
2060 #endif 2068 #endif
2061 2069
2062 VIEW_TEST(BookmarkBarViewTest22, MAYBE_CloseSourceBrowserDuringDrag) 2070 VIEW_TEST(BookmarkBarViewTest22, MAYBE_CloseSourceBrowserDuringDrag)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698