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

Side by Side Diff: chrome/browser/importer/firefox_importer_unittest.cc

Issue 99167: Update a test expectation due to rolling GURL dep.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/importer/importer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/importer/firefox2_importer.h" 10 #include "chrome/browser/importer/firefox2_importer.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_EQ(L"\x4E2D", shortcut); 93 EXPECT_EQ(L"\x4E2D", shortcut);
94 EXPECT_EQ(L"", post_data); 94 EXPECT_EQ(L"", post_data);
95 EXPECT_TRUE(Time() == add_date); 95 EXPECT_TRUE(Time() == add_date);
96 96
97 // No shortcut, and url contains %22 ('"' character). 97 // No shortcut, and url contains %22 ('"' character).
98 result = Firefox2Importer::ParseBookmarkFromLine( 98 result = Firefox2Importer::ParseBookmarkFromLine(
99 "<DT><A HREF=\"http://domain.com/?q=%22<>%22\">name</A>", 99 "<DT><A HREF=\"http://domain.com/?q=%22<>%22\">name</A>",
100 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); 100 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data);
101 EXPECT_TRUE(result); 101 EXPECT_TRUE(result);
102 EXPECT_EQ(L"name", title); 102 EXPECT_EQ(L"name", title);
103 EXPECT_EQ("http://domain.com/?q=\"%3C%3E\"", url.spec()); 103 EXPECT_EQ("http://domain.com/?q=%22%3C%3E%22", url.spec());
104 EXPECT_EQ(L"", shortcut); 104 EXPECT_EQ(L"", shortcut);
105 EXPECT_EQ(L"", post_data); 105 EXPECT_EQ(L"", post_data);
106 EXPECT_TRUE(Time() == add_date); 106 EXPECT_TRUE(Time() == add_date);
107 107
108 // Creation date. 108 // Creation date.
109 result = Firefox2Importer::ParseBookmarkFromLine( 109 result = Firefox2Importer::ParseBookmarkFromLine(
110 "<DT><A HREF=\"http://site/\" ADD_DATE=\"1121301154\">name</A>", 110 "<DT><A HREF=\"http://site/\" ADD_DATE=\"1121301154\">name</A>",
111 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data); 111 charset, &title, &url, &favicon, &shortcut, &add_date, &post_data);
112 EXPECT_TRUE(result); 112 EXPECT_TRUE(result);
113 EXPECT_EQ(L"name", title); 113 EXPECT_EQ(L"name", title);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 EXPECT_FALSE(lock2->HasAcquired()); 207 EXPECT_FALSE(lock2->HasAcquired());
208 208
209 lock1->Unlock(); 209 lock1->Unlock();
210 EXPECT_FALSE(lock1->HasAcquired()); 210 EXPECT_FALSE(lock1->HasAcquired());
211 211
212 lock2->Lock(); 212 lock2->Lock();
213 EXPECT_TRUE(lock2->HasAcquired()); 213 EXPECT_TRUE(lock2->HasAcquired());
214 lock2->Unlock(); 214 lock2->Unlock();
215 EXPECT_FALSE(lock2->HasAcquired()); 215 EXPECT_FALSE(lock2->HasAcquired());
216 } 216 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/importer/importer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698