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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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/ui/views/bookmarks/bookmark_context_menu.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/prefs/pref_service.h"
15 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
16 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
17 #include "base/values.h" 16 #include "base/values.h"
18 #include "build/build_config.h" 17 #include "build/build_config.h"
19 #include "chrome/app/chrome_command_ids.h" 18 #include "chrome/app/chrome_command_ids.h"
20 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 19 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
21 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h" 20 #include "chrome/browser/bookmarks/managed_bookmark_service_factory.h"
22 #include "chrome/browser/profiles/profile.h" 21 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h" 22 #include "chrome/browser/ui/bookmarks/bookmark_utils_desktop.h"
24 #include "chrome/test/base/testing_profile.h" 23 #include "chrome/test/base/testing_profile.h"
25 #include "components/bookmarks/browser/bookmark_model.h" 24 #include "components/bookmarks/browser/bookmark_model.h"
26 #include "components/bookmarks/common/bookmark_pref_names.h" 25 #include "components/bookmarks/common/bookmark_pref_names.h"
27 #include "components/bookmarks/managed/managed_bookmark_service.h" 26 #include "components/bookmarks/managed/managed_bookmark_service.h"
28 #include "components/bookmarks/test/bookmark_test_helpers.h" 27 #include "components/bookmarks/test/bookmark_test_helpers.h"
28 #include "components/prefs/pref_service.h"
29 #include "content/public/browser/page_navigator.h" 29 #include "content/public/browser/page_navigator.h"
30 #include "content/public/test/test_browser_thread.h" 30 #include "content/public/test/test_browser_thread.h"
31 #include "content/public/test/test_browser_thread_bundle.h" 31 #include "content/public/test/test_browser_thread_bundle.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 #include "ui/base/clipboard/clipboard.h" 33 #include "ui/base/clipboard/clipboard.h"
34 #include "ui/events/platform/platform_event_source.h" 34 #include "ui/events/platform/platform_event_source.h"
35 #include "ui/views/controls/menu/menu_item_view.h" 35 #include "ui/views/controls/menu/menu_item_view.h"
36 36
37 #if defined(OS_WIN) 37 #if defined(OS_WIN)
38 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 38 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 controller.reset(new BookmarkContextMenu( 371 controller.reset(new BookmarkContextMenu(
372 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false)); 372 NULL, NULL, profile_.get(), NULL, nodes[0]->parent(), nodes, false));
373 EXPECT_TRUE(controller->IsCommandVisible(IDC_BOOKMARK_BAR_NEW_FOLDER)); 373 EXPECT_TRUE(controller->IsCommandVisible(IDC_BOOKMARK_BAR_NEW_FOLDER));
374 EXPECT_TRUE( 374 EXPECT_TRUE(
375 controller->IsCommandVisible(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS)); 375 controller->IsCommandVisible(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS));
376 menu = controller->menu(); 376 menu = controller->menu();
377 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_NEW_FOLDER)->visible()); 377 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_NEW_FOLDER)->visible());
378 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS) 378 EXPECT_TRUE(menu->GetMenuItemByID(IDC_BOOKMARK_BAR_SHOW_MANAGED_BOOKMARKS)
379 ->visible()); 379 ->visible());
380 } 380 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698