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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm

Issue 865163003: bookmarks: Move BookmarkNode into 'bookmarks' namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enhanced_bookmarks fix Created 5 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 (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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/mac/scoped_nsobject.h" 6 #include "base/mac/scoped_nsobject.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 8 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" 9 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h" 10 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h"
11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h" 11 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_button_cell.h"
12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" 12 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_unittest_helper.h" 13 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_unittest_helper.h"
14 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 14 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 15 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
16 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" 16 #import "chrome/browser/ui/cocoa/view_resizer_pong.h"
17 #include "chrome/test/base/testing_profile.h" 17 #include "chrome/test/base/testing_profile.h"
18 #include "components/bookmarks/browser/bookmark_model.h" 18 #include "components/bookmarks/browser/bookmark_model.h"
19 #include "components/bookmarks/test/bookmark_test_helpers.h" 19 #include "components/bookmarks/test/bookmark_test_helpers.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #import "testing/gtest_mac.h" 21 #import "testing/gtest_mac.h"
22 #include "testing/platform_test.h" 22 #include "testing/platform_test.h"
23 #include "ui/base/cocoa/animation_utils.h" 23 #include "ui/base/cocoa/animation_utils.h"
24 24
25 #include <cmath> 25 #include <cmath>
26 26
27 using base::ASCIIToUTF16; 27 using base::ASCIIToUTF16;
28 using bookmarks::BookmarkModel; 28 using bookmarks::BookmarkModel;
29 using bookmarks::BookmarkNode;
29 30
30 namespace { 31 namespace {
31 32
32 const int kLotsOfNodesCount = 150; 33 const int kLotsOfNodesCount = 150;
33 34
34 // Deletes the bookmark corresponding to |button|. 35 // Deletes the bookmark corresponding to |button|.
35 void DeleteBookmark(BookmarkButton* button, Profile* profile) { 36 void DeleteBookmark(BookmarkButton* button, Profile* profile) {
36 const BookmarkNode* node = [button bookmarkNode]; 37 const BookmarkNode* node = [button bookmarkNode];
37 if (node) { 38 if (node) {
38 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile); 39 BookmarkModel* model = BookmarkModelFactory::GetForProfile(profile);
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 DeleteBookmark([folder parentButton], profile()); 1642 DeleteBookmark([folder parentButton], profile());
1642 EXPECT_FALSE([folder folderController]); 1643 EXPECT_FALSE([folder folderController]);
1643 } 1644 }
1644 1645
1645 // TODO(jrg): draggingEntered: and draggingExited: trigger timers so 1646 // TODO(jrg): draggingEntered: and draggingExited: trigger timers so
1646 // they are hard to test. Factor out "fire timers" into routines 1647 // they are hard to test. Factor out "fire timers" into routines
1647 // which can be overridden to fire immediately to make behavior 1648 // which can be overridden to fire immediately to make behavior
1648 // confirmable. 1649 // confirmable.
1649 // There is a similar problem with mouseEnteredButton: and 1650 // There is a similar problem with mouseEnteredButton: and
1650 // mouseExitedButton:. 1651 // mouseExitedButton:.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698