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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_ui_utils_unittest.cc

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | Annotate | Revision Log
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/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/browser/bookmarks/bookmark_model.h" 8 #include "chrome/browser/bookmarks/bookmark_model.h"
9 #include "chrome/test/base/testing_profile.h" 9 #include "chrome/test/base/testing_profile.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 #if !defined(OS_ANDROID) && !defined(OS_IOS) 12 #if !defined(OS_ANDROID) && !defined(OS_IOS)
13 13
14 using base::ASCIIToUTF16;
15
14 namespace { 16 namespace {
15 17
16 TEST(BookmarkUIUtilsTest, HasBookmarkURLs) { 18 TEST(BookmarkUIUtilsTest, HasBookmarkURLs) {
17 BookmarkModel model(NULL); 19 BookmarkModel model(NULL);
18 20
19 std::vector<const BookmarkNode*> nodes; 21 std::vector<const BookmarkNode*> nodes;
20 22
21 // This tests that |nodes| contains an URL. 23 // This tests that |nodes| contains an URL.
22 const BookmarkNode* page1 = model.AddURL(model.bookmark_bar_node(), 0, 24 const BookmarkNode* page1 = model.AddURL(model.bookmark_bar_node(), 0,
23 ASCIIToUTF16("Google"), 25 ASCIIToUTF16("Google"),
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 const BookmarkNode* subfolder1 = model.AddFolder(folder1, 0, 106 const BookmarkNode* subfolder1 = model.AddFolder(folder1, 0,
105 ASCIIToUTF16("Subfolder1")); 107 ASCIIToUTF16("Subfolder1"));
106 108
107 // Now add the URL to that |subfolder1|. 109 // Now add the URL to that |subfolder1|.
108 model.AddURL(subfolder1, 0, ASCIIToUTF16("BAR"), GURL("http://bar-foo.com")); 110 model.AddURL(subfolder1, 0, ASCIIToUTF16("BAR"), GURL("http://bar-foo.com"));
109 EXPECT_FALSE(chrome::HasBookmarkURLsAllowedInIncognitoMode(nodes, &profile)); 111 EXPECT_FALSE(chrome::HasBookmarkURLsAllowedInIncognitoMode(nodes, &profile));
110 } 112 }
111 113
112 } // namespace 114 } // namespace
113 #endif 115 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698