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

Side by Side Diff: chrome/browser/bookmarks/bookmark_html_writer_unittest.cc

Issue 6064003: Update the time formatting APIs to use string16.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 for (size_t i = 0; i < entry.path.size(); ++i) { 68 for (size_t i = 0; i < entry.path.size(); ++i) {
69 if (i != 0) 69 if (i != 0)
70 result.append(ASCIIToUTF16("/")); 70 result.append(ASCIIToUTF16("/"));
71 result.append(WideToUTF16Hack(entry.path[i])); 71 result.append(WideToUTF16Hack(entry.path[i]));
72 } 72 }
73 73
74 result.append(ASCIIToUTF16(" title=")); 74 result.append(ASCIIToUTF16(" title="));
75 result.append(WideToUTF16Hack(entry.title)); 75 result.append(WideToUTF16Hack(entry.title));
76 76
77 result.append(ASCIIToUTF16(" time=")); 77 result.append(ASCIIToUTF16(" time="));
78 result.append(WideToUTF16Hack( 78 result.append(base::TimeFormatFriendlyDateAndTime(entry.creation_time));
79 base::TimeFormatFriendlyDateAndTime(entry.creation_time)));
80 return result; 79 return result;
81 } 80 }
82 81
83 // Creates a set of bookmark values to a string for assertion testing. 82 // Creates a set of bookmark values to a string for assertion testing.
84 string16 BookmarkValuesToString(bool on_toolbar, 83 string16 BookmarkValuesToString(bool on_toolbar,
85 const GURL& url, 84 const GURL& url,
86 const string16& title, 85 const string16& title,
87 base::Time creation_time, 86 base::Time creation_time,
88 const string16& f1, 87 const string16& f1,
89 const string16& f2, 88 const string16& f2,
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 bookmark_folder_name, string16(), string16()); 256 bookmark_folder_name, string16(), string16());
258 AssertBookmarkEntryEquals(parsed_bookmarks[3], false, url4, url4_title, t4, 257 AssertBookmarkEntryEquals(parsed_bookmarks[3], false, url4, url4_title, t4,
259 bookmark_folder_name, string16(), string16()); 258 bookmark_folder_name, string16(), string16());
260 AssertBookmarkEntryEquals(parsed_bookmarks[4], false, url1, url1_title, t1, 259 AssertBookmarkEntryEquals(parsed_bookmarks[4], false, url1, url1_title, t1,
261 string16(), string16(), string16()); 260 string16(), string16(), string16());
262 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2, 261 AssertBookmarkEntryEquals(parsed_bookmarks[5], false, url2, url2_title, t2,
263 string16(), string16(), string16()); 262 string16(), string16(), string16());
264 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1, 263 AssertBookmarkEntryEquals(parsed_bookmarks[6], false, url1, url1_title, t1,
265 f3_title, f4_title, string16()); 264 f3_title, f4_title, string16());
266 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698