OLD | NEW |
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/browser/ui/bookmarks/bookmark_utils.h" | 5 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/test/base/testing_profile.h" | 8 #include "chrome/test/base/testing_profile.h" |
9 #include "components/bookmarks/core/browser/bookmark_model.h" | 9 #include "components/bookmarks/browser/bookmark_model.h" |
10 #include "components/bookmarks/core/test/test_bookmark_client.h" | 10 #include "components/bookmarks/test/test_bookmark_client.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 13 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
14 | 14 |
15 using base::ASCIIToUTF16; | 15 using base::ASCIIToUTF16; |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 TEST(BookmarkUIUtilsTest, HasBookmarkURLs) { | 19 TEST(BookmarkUIUtilsTest, HasBookmarkURLs) { |
20 test::TestBookmarkClient client; | 20 test::TestBookmarkClient client; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 const BookmarkNode* subfolder1 = | 112 const BookmarkNode* subfolder1 = |
113 model->AddFolder(folder1, 0, ASCIIToUTF16("Subfolder1")); | 113 model->AddFolder(folder1, 0, ASCIIToUTF16("Subfolder1")); |
114 | 114 |
115 // Now add the URL to that |subfolder1|. | 115 // Now add the URL to that |subfolder1|. |
116 model->AddURL(subfolder1, 0, ASCIIToUTF16("BAR"), GURL("http://bar-foo.com")); | 116 model->AddURL(subfolder1, 0, ASCIIToUTF16("BAR"), GURL("http://bar-foo.com")); |
117 EXPECT_FALSE(chrome::HasBookmarkURLsAllowedInIncognitoMode(nodes, &profile)); | 117 EXPECT_FALSE(chrome::HasBookmarkURLsAllowedInIncognitoMode(nodes, &profile)); |
118 } | 118 } |
119 | 119 |
120 } // namespace | 120 } // namespace |
121 #endif | 121 #endif |
OLD | NEW |