OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
12 #include "chrome/browser/importer/firefox2_importer.h" | 12 #include "chrome/browser/importer/firefox2_importer.h" |
13 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" | 13 #include "chrome/browser/importer/firefox_importer_unittest_utils.h" |
14 #include "chrome/browser/importer/firefox_importer_utils.h" | 14 #include "chrome/browser/importer/firefox_importer_utils.h" |
15 #include "chrome/browser/importer/nss_decryptor.h" | 15 #include "chrome/browser/importer/nss_decryptor.h" |
16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
17 | 17 |
18 using base::Time; | |
19 | |
20 // The following 2 tests require the use of the NSSDecryptor, on OSX this needs | 18 // The following 2 tests require the use of the NSSDecryptor, on OSX this needs |
21 // to run in a separate process, so we use a proxy object so we can share the | 19 // to run in a separate process, so we use a proxy object so we can share the |
22 // same test between platforms. | 20 // same test between platforms. |
23 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { | 21 TEST(FirefoxImporterTest, Firefox2NSS3Decryptor) { |
24 FilePath nss_path; | 22 FilePath nss_path; |
25 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); | 23 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &nss_path)); |
26 #ifdef OS_MACOSX | 24 #ifdef OS_MACOSX |
27 nss_path = nss_path.AppendASCII("firefox2_nss_mac"); | 25 nss_path = nss_path.AppendASCII("firefox2_nss_mac"); |
28 #else | 26 #else |
29 nss_path = nss_path.AppendASCII("firefox2_nss"); | 27 nss_path = nss_path.AppendASCII("firefox2_nss"); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 result = Firefox2Importer::ParseCharsetFromLine( | 76 result = Firefox2Importer::ParseCharsetFromLine( |
79 "<META HTTP-EQUIV=\"Content-Type\" " | 77 "<META HTTP-EQUIV=\"Content-Type\" " |
80 "CONTENT=\"text/html; charset=UTF-8\">", | 78 "CONTENT=\"text/html; charset=UTF-8\">", |
81 &charset); | 79 &charset); |
82 EXPECT_TRUE(result); | 80 EXPECT_TRUE(result); |
83 EXPECT_EQ("UTF-8", charset); | 81 EXPECT_EQ("UTF-8", charset); |
84 | 82 |
85 // Escaped characters in name. | 83 // Escaped characters in name. |
86 string16 folder_name; | 84 string16 folder_name; |
87 bool is_toolbar_folder; | 85 bool is_toolbar_folder; |
88 Time folder_add_date; | 86 base::Time folder_add_date; |
89 result = Firefox2Importer::ParseFolderNameFromLine( | 87 result = Firefox2Importer::ParseFolderNameFromLine( |
90 "<DT><H3 ADD_DATE=\"1207558707\" >< >" | 88 "<DT><H3 ADD_DATE=\"1207558707\" >< >" |
91 " & " ' \\ /</H3>", | 89 " & " ' \\ /</H3>", |
92 charset, &folder_name, &is_toolbar_folder, &folder_add_date); | 90 charset, &folder_name, &is_toolbar_folder, &folder_add_date); |
93 EXPECT_TRUE(result); | 91 EXPECT_TRUE(result); |
94 EXPECT_EQ(ASCIIToUTF16("< > & \" ' \\ /"), folder_name); | 92 EXPECT_EQ(ASCIIToUTF16("< > & \" ' \\ /"), folder_name); |
95 EXPECT_FALSE(is_toolbar_folder); | 93 EXPECT_FALSE(is_toolbar_folder); |
96 EXPECT_TRUE(Time::FromTimeT(1207558707) == folder_add_date); | 94 EXPECT_TRUE(base::Time::FromTimeT(1207558707) == folder_add_date); |
97 | 95 |
98 // Empty name and toolbar folder attribute. | 96 // Empty name and toolbar folder attribute. |
99 result = Firefox2Importer::ParseFolderNameFromLine( | 97 result = Firefox2Importer::ParseFolderNameFromLine( |
100 "<DT><H3 PERSONAL_TOOLBAR_FOLDER=\"true\"></H3>", | 98 "<DT><H3 PERSONAL_TOOLBAR_FOLDER=\"true\"></H3>", |
101 charset, &folder_name, &is_toolbar_folder, &folder_add_date); | 99 charset, &folder_name, &is_toolbar_folder, &folder_add_date); |
102 EXPECT_TRUE(result); | 100 EXPECT_TRUE(result); |
103 EXPECT_EQ(ASCIIToUTF16(""), folder_name); | 101 EXPECT_EQ(ASCIIToUTF16(""), folder_name); |
104 EXPECT_TRUE(is_toolbar_folder); | 102 EXPECT_TRUE(is_toolbar_folder); |
105 | 103 |
106 // Unicode characters in title and shortcut. | 104 // Unicode characters in title and shortcut. |
107 string16 title; | 105 string16 title; |
108 GURL url, favicon; | 106 GURL url, favicon; |
109 string16 shortcut; | 107 string16 shortcut; |
110 string16 post_data; | 108 string16 post_data; |
111 Time add_date; | 109 base::Time add_date; |
112 result = Firefox2Importer::ParseBookmarkFromLine( | 110 result = Firefox2Importer::ParseBookmarkFromLine( |
113 "<DT><A HREF=\"http://chinese.site.cn/path?query=1#ref\" " | 111 "<DT><A HREF=\"http://chinese.site.cn/path?query=1#ref\" " |
114 "SHORTCUTURL=\"\xE4\xB8\xAD\">\xE4\xB8\xAD\xE6\x96\x87</A>", | 112 "SHORTCUTURL=\"\xE4\xB8\xAD\">\xE4\xB8\xAD\xE6\x96\x87</A>", |
115 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 113 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
116 EXPECT_TRUE(result); | 114 EXPECT_TRUE(result); |
117 EXPECT_EQ(L"\x4E2D\x6587", UTF16ToWide(title)); | 115 EXPECT_EQ(L"\x4E2D\x6587", UTF16ToWide(title)); |
118 EXPECT_EQ("http://chinese.site.cn/path?query=1#ref", url.spec()); | 116 EXPECT_EQ("http://chinese.site.cn/path?query=1#ref", url.spec()); |
119 EXPECT_EQ(L"\x4E2D", UTF16ToWide(shortcut)); | 117 EXPECT_EQ(L"\x4E2D", UTF16ToWide(shortcut)); |
120 EXPECT_EQ(ASCIIToUTF16(""), post_data); | 118 EXPECT_EQ(ASCIIToUTF16(""), post_data); |
121 EXPECT_TRUE(Time() == add_date); | 119 EXPECT_TRUE(base::Time() == add_date); |
122 | 120 |
123 // No shortcut, and url contains %22 ('"' character). | 121 // No shortcut, and url contains %22 ('"' character). |
124 result = Firefox2Importer::ParseBookmarkFromLine( | 122 result = Firefox2Importer::ParseBookmarkFromLine( |
125 "<DT><A HREF=\"http://domain.com/?q=%22<>%22\">name</A>", | 123 "<DT><A HREF=\"http://domain.com/?q=%22<>%22\">name</A>", |
126 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 124 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
127 EXPECT_TRUE(result); | 125 EXPECT_TRUE(result); |
128 EXPECT_EQ(ASCIIToUTF16("name"), title); | 126 EXPECT_EQ(ASCIIToUTF16("name"), title); |
129 EXPECT_EQ("http://domain.com/?q=%22%3C%3E%22", url.spec()); | 127 EXPECT_EQ("http://domain.com/?q=%22%3C%3E%22", url.spec()); |
130 EXPECT_EQ(ASCIIToUTF16(""), shortcut); | 128 EXPECT_EQ(ASCIIToUTF16(""), shortcut); |
131 EXPECT_EQ(ASCIIToUTF16(""), post_data); | 129 EXPECT_EQ(ASCIIToUTF16(""), post_data); |
132 EXPECT_TRUE(Time() == add_date); | 130 EXPECT_TRUE(base::Time() == add_date); |
133 | 131 |
134 result = Firefox2Importer::ParseBookmarkFromLine( | 132 result = Firefox2Importer::ParseBookmarkFromLine( |
135 "<DT><A HREF=\"http://domain.com/?g="\"\">name</A>", | 133 "<DT><A HREF=\"http://domain.com/?g="\"\">name</A>", |
136 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 134 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
137 EXPECT_TRUE(result); | 135 EXPECT_TRUE(result); |
138 EXPECT_EQ(ASCIIToUTF16("name"), title); | 136 EXPECT_EQ(ASCIIToUTF16("name"), title); |
139 EXPECT_EQ("http://domain.com/?g=%22", url.spec()); | 137 EXPECT_EQ("http://domain.com/?g=%22", url.spec()); |
140 EXPECT_EQ(ASCIIToUTF16(""), shortcut); | 138 EXPECT_EQ(ASCIIToUTF16(""), shortcut); |
141 EXPECT_EQ(ASCIIToUTF16(""), post_data); | 139 EXPECT_EQ(ASCIIToUTF16(""), post_data); |
142 EXPECT_TRUE(Time() == add_date); | 140 EXPECT_TRUE(base::Time() == add_date); |
143 | 141 |
144 // Creation date. | 142 // Creation date. |
145 result = Firefox2Importer::ParseBookmarkFromLine( | 143 result = Firefox2Importer::ParseBookmarkFromLine( |
146 "<DT><A HREF=\"http://site/\" ADD_DATE=\"1121301154\">name</A>", | 144 "<DT><A HREF=\"http://site/\" ADD_DATE=\"1121301154\">name</A>", |
147 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 145 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
148 EXPECT_TRUE(result); | 146 EXPECT_TRUE(result); |
149 EXPECT_EQ(ASCIIToUTF16("name"), title); | 147 EXPECT_EQ(ASCIIToUTF16("name"), title); |
150 EXPECT_EQ(GURL("http://site/"), url); | 148 EXPECT_EQ(GURL("http://site/"), url); |
151 EXPECT_EQ(ASCIIToUTF16(""), shortcut); | 149 EXPECT_EQ(ASCIIToUTF16(""), shortcut); |
152 EXPECT_EQ(ASCIIToUTF16(""), post_data); | 150 EXPECT_EQ(ASCIIToUTF16(""), post_data); |
153 EXPECT_TRUE(Time::FromTimeT(1121301154) == add_date); | 151 EXPECT_TRUE(base::Time::FromTimeT(1121301154) == add_date); |
154 | 152 |
155 // Post-data | 153 // Post-data |
156 result = Firefox2Importer::ParseBookmarkFromLine( | 154 result = Firefox2Importer::ParseBookmarkFromLine( |
157 "<DT><A HREF=\"http://localhost:8080/test/hello.html\" ADD_DATE=\"" | 155 "<DT><A HREF=\"http://localhost:8080/test/hello.html\" ADD_DATE=\"" |
158 "1212447159\" LAST_VISIT=\"1212447251\" LAST_MODIFIED=\"1212447248\"" | 156 "1212447159\" LAST_VISIT=\"1212447251\" LAST_MODIFIED=\"1212447248\"" |
159 "SHORTCUTURL=\"post\" ICON=\"data:\" POST_DATA=\"lname%3D%25s\"" | 157 "SHORTCUTURL=\"post\" ICON=\"data:\" POST_DATA=\"lname%3D%25s\"" |
160 "LAST_CHARSET=\"UTF-8\" ID=\"rdf:#$weKaR3\">Test Post keyword</A>", | 158 "LAST_CHARSET=\"UTF-8\" ID=\"rdf:#$weKaR3\">Test Post keyword</A>", |
161 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 159 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
162 EXPECT_TRUE(result); | 160 EXPECT_TRUE(result); |
163 EXPECT_EQ(ASCIIToUTF16("Test Post keyword"), title); | 161 EXPECT_EQ(ASCIIToUTF16("Test Post keyword"), title); |
164 EXPECT_EQ("http://localhost:8080/test/hello.html", url.spec()); | 162 EXPECT_EQ("http://localhost:8080/test/hello.html", url.spec()); |
165 EXPECT_EQ(ASCIIToUTF16("post"), shortcut); | 163 EXPECT_EQ(ASCIIToUTF16("post"), shortcut); |
166 EXPECT_EQ(ASCIIToUTF16("lname%3D%25s"), post_data); | 164 EXPECT_EQ(ASCIIToUTF16("lname%3D%25s"), post_data); |
167 EXPECT_TRUE(Time::FromTimeT(1212447159) == add_date); | 165 EXPECT_TRUE(base::Time::FromTimeT(1212447159) == add_date); |
168 | 166 |
169 // Invalid case. | 167 // Invalid case. |
170 result = Firefox2Importer::ParseBookmarkFromLine( | 168 result = Firefox2Importer::ParseBookmarkFromLine( |
171 "<DT><A HREF=\"http://domain.com/?q=%22", | 169 "<DT><A HREF=\"http://domain.com/?q=%22", |
172 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); | 170 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); |
173 EXPECT_FALSE(result); | 171 EXPECT_FALSE(result); |
174 EXPECT_EQ(ASCIIToUTF16(""), title); | 172 EXPECT_EQ(ASCIIToUTF16(""), title); |
175 EXPECT_EQ("", url.spec()); | 173 EXPECT_EQ("", url.spec()); |
176 EXPECT_EQ(ASCIIToUTF16(""), shortcut); | 174 EXPECT_EQ(ASCIIToUTF16(""), shortcut); |
177 EXPECT_EQ(ASCIIToUTF16(""), post_data); | 175 EXPECT_EQ(ASCIIToUTF16(""), post_data); |
178 EXPECT_TRUE(Time() == add_date); | 176 EXPECT_TRUE(base::Time() == add_date); |
179 | 177 |
180 // Epiphany format. | 178 // Epiphany format. |
181 result = Firefox2Importer::ParseMinimumBookmarkFromLine( | 179 result = Firefox2Importer::ParseMinimumBookmarkFromLine( |
182 "<dt><a href=\"http://www.google.com/\">Google</a></dt>", | 180 "<dt><a href=\"http://www.google.com/\">Google</a></dt>", |
183 charset, &title, &url); | 181 charset, &title, &url); |
184 EXPECT_TRUE(result); | 182 EXPECT_TRUE(result); |
185 EXPECT_EQ(ASCIIToUTF16("Google"), title); | 183 EXPECT_EQ(ASCIIToUTF16("Google"), title); |
186 EXPECT_EQ("http://www.google.com/", url.spec()); | 184 EXPECT_EQ("http://www.google.com/", url.spec()); |
187 } | 185 } |
188 | 186 |
(...skipping 14 matching lines...) Expand all Loading... |
203 NULL, NULL); | 201 NULL, NULL); |
204 EXPECT_EQ(3, static_cast<int>(bookmarks.size())); | 202 EXPECT_EQ(3, static_cast<int>(bookmarks.size())); |
205 std::vector<ProfileWriter::BookmarkEntry>::iterator it; | 203 std::vector<ProfileWriter::BookmarkEntry>::iterator it; |
206 ProfileWriter::BookmarkEntry entry; | 204 ProfileWriter::BookmarkEntry entry; |
207 std::vector<string16>::iterator path_it; | 205 std::vector<string16>::iterator path_it; |
208 if (bookmarks.size() == 3) { | 206 if (bookmarks.size() == 3) { |
209 it = bookmarks.begin(); | 207 it = bookmarks.begin(); |
210 entry = *it++; | 208 entry = *it++; |
211 EXPECT_EQ(ASCIIToUTF16("Empty"), entry.title); | 209 EXPECT_EQ(ASCIIToUTF16("Empty"), entry.title); |
212 EXPECT_TRUE(entry.is_folder); | 210 EXPECT_TRUE(entry.is_folder); |
213 EXPECT_EQ(Time::FromTimeT(1295938143), entry.creation_time); | 211 EXPECT_EQ(base::Time::FromTimeT(1295938143), entry.creation_time); |
214 EXPECT_EQ(2, static_cast<int>(entry.path.size())); | 212 EXPECT_EQ(2, static_cast<int>(entry.path.size())); |
215 if (entry.path.size() == 2) { | 213 if (entry.path.size() == 2) { |
216 path_it = entry.path.begin(); | 214 path_it = entry.path.begin(); |
217 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); | 215 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); |
218 EXPECT_EQ(ASCIIToUTF16("Empty's Parent"), *path_it); | 216 EXPECT_EQ(ASCIIToUTF16("Empty's Parent"), *path_it); |
219 } | 217 } |
220 | 218 |
221 entry = *it++; | 219 entry = *it++; |
222 EXPECT_EQ(ASCIIToUTF16("[Tamura Yukari.com]"), entry.title); | 220 EXPECT_EQ(ASCIIToUTF16("[Tamura Yukari.com]"), entry.title); |
223 EXPECT_FALSE(entry.is_folder); | 221 EXPECT_FALSE(entry.is_folder); |
224 EXPECT_EQ(Time::FromTimeT(1234567890), entry.creation_time); | 222 EXPECT_EQ(base::Time::FromTimeT(1234567890), entry.creation_time); |
225 EXPECT_EQ(2, static_cast<int>(entry.path.size())); | 223 EXPECT_EQ(2, static_cast<int>(entry.path.size())); |
226 if (entry.path.size() == 2) { | 224 if (entry.path.size() == 2) { |
227 path_it = entry.path.begin(); | 225 path_it = entry.path.begin(); |
228 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); | 226 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); |
229 EXPECT_EQ(ASCIIToUTF16("Not Empty"), *path_it); | 227 EXPECT_EQ(ASCIIToUTF16("Not Empty"), *path_it); |
230 } | 228 } |
231 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); | 229 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); |
232 | 230 |
233 entry = *it++; | 231 entry = *it++; |
234 EXPECT_EQ(ASCIIToUTF16("Google"), entry.title); | 232 EXPECT_EQ(ASCIIToUTF16("Google"), entry.title); |
235 EXPECT_FALSE(entry.is_folder); | 233 EXPECT_FALSE(entry.is_folder); |
236 EXPECT_EQ(Time::FromTimeT(0000000000), entry.creation_time); | 234 EXPECT_EQ(base::Time::FromTimeT(0000000000), entry.creation_time); |
237 EXPECT_EQ(2, static_cast<int>(entry.path.size())); | 235 EXPECT_EQ(2, static_cast<int>(entry.path.size())); |
238 if (entry.path.size() == 2) { | 236 if (entry.path.size() == 2) { |
239 path_it = entry.path.begin(); | 237 path_it = entry.path.begin(); |
240 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); | 238 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); |
241 EXPECT_EQ(ASCIIToUTF16("Not Empty But Default"), *path_it); | 239 EXPECT_EQ(ASCIIToUTF16("Not Empty But Default"), *path_it); |
242 } | 240 } |
243 EXPECT_EQ("http://www.google.com/", entry.url.spec()); | 241 EXPECT_EQ("http://www.google.com/", entry.url.spec()); |
244 } | 242 } |
245 | 243 |
246 // Import non-default bookmarks from a file. | 244 // Import non-default bookmarks from a file. |
247 bookmarks.clear(); | 245 bookmarks.clear(); |
248 default_urls.insert(GURL("http://www.google.com/")); | 246 default_urls.insert(GURL("http://www.google.com/")); |
249 importer->ImportBookmarksFile(empty_folder_path, default_urls, false, | 247 importer->ImportBookmarksFile(empty_folder_path, default_urls, false, |
250 first_folder_name, importer, &bookmarks, | 248 first_folder_name, importer, &bookmarks, |
251 NULL, NULL); | 249 NULL, NULL); |
252 EXPECT_EQ(2, static_cast<int>(bookmarks.size())); | 250 EXPECT_EQ(2, static_cast<int>(bookmarks.size())); |
253 if (bookmarks.size() == 2) { | 251 if (bookmarks.size() == 2) { |
254 it = bookmarks.begin(); | 252 it = bookmarks.begin(); |
255 entry = *it++; | 253 entry = *it++; |
256 EXPECT_EQ(ASCIIToUTF16("Empty"), entry.title); | 254 EXPECT_EQ(ASCIIToUTF16("Empty"), entry.title); |
257 EXPECT_TRUE(entry.is_folder); | 255 EXPECT_TRUE(entry.is_folder); |
258 EXPECT_EQ(Time::FromTimeT(1295938143), entry.creation_time); | 256 EXPECT_EQ(base::Time::FromTimeT(1295938143), entry.creation_time); |
259 EXPECT_EQ(2, static_cast<int>(entry.path.size())); | 257 EXPECT_EQ(2, static_cast<int>(entry.path.size())); |
260 if (entry.path.size() == 2) { | 258 if (entry.path.size() == 2) { |
261 path_it = entry.path.begin(); | 259 path_it = entry.path.begin(); |
262 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); | 260 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); |
263 EXPECT_EQ(ASCIIToUTF16("Empty's Parent"), *path_it); | 261 EXPECT_EQ(ASCIIToUTF16("Empty's Parent"), *path_it); |
264 } | 262 } |
265 | 263 |
266 entry = *it++; | 264 entry = *it++; |
267 EXPECT_EQ(ASCIIToUTF16("[Tamura Yukari.com]"), entry.title); | 265 EXPECT_EQ(ASCIIToUTF16("[Tamura Yukari.com]"), entry.title); |
268 EXPECT_FALSE(entry.is_folder); | 266 EXPECT_FALSE(entry.is_folder); |
269 EXPECT_EQ(Time::FromTimeT(1234567890), entry.creation_time); | 267 EXPECT_EQ(base::Time::FromTimeT(1234567890), entry.creation_time); |
270 EXPECT_EQ(2, static_cast<int>(entry.path.size())); | 268 EXPECT_EQ(2, static_cast<int>(entry.path.size())); |
271 if (entry.path.size() == 2) { | 269 if (entry.path.size() == 2) { |
272 path_it = entry.path.begin(); | 270 path_it = entry.path.begin(); |
273 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); | 271 EXPECT_EQ(ASCIIToUTF16(""), *path_it++); |
274 EXPECT_EQ(ASCIIToUTF16("Not Empty"), *path_it); | 272 EXPECT_EQ(ASCIIToUTF16("Not Empty"), *path_it); |
275 } | 273 } |
276 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); | 274 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); |
277 } | 275 } |
278 | 276 |
279 // Import Epiphany bookmarks from a file | 277 // Import Epiphany bookmarks from a file |
(...skipping 11 matching lines...) Expand all Loading... |
291 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); | 289 EXPECT_EQ("http://www.tamurayukari.com/", entry.url.spec()); |
292 EXPECT_EQ(0, static_cast<int>(entry.path.size())); | 290 EXPECT_EQ(0, static_cast<int>(entry.path.size())); |
293 entry = *it++; | 291 entry = *it++; |
294 EXPECT_EQ(ASCIIToUTF16("Google"), entry.title); | 292 EXPECT_EQ(ASCIIToUTF16("Google"), entry.title); |
295 EXPECT_EQ("http://www.google.com/", entry.url.spec()); | 293 EXPECT_EQ("http://www.google.com/", entry.url.spec()); |
296 EXPECT_EQ(0, static_cast<int>(entry.path.size())); | 294 EXPECT_EQ(0, static_cast<int>(entry.path.size())); |
297 } | 295 } |
298 | 296 |
299 importer->Release(); | 297 importer->Release(); |
300 } | 298 } |
OLD | NEW |