Chromium Code Reviews| Index: chrome/browser/autocomplete/history_url_provider_unittest.cc |
| =================================================================== |
| --- chrome/browser/autocomplete/history_url_provider_unittest.cc (revision 29226) |
| +++ chrome/browser/autocomplete/history_url_provider_unittest.cc (working copy) |
| @@ -212,7 +212,8 @@ |
| arraysize(expected_combine)); |
| // The title should also have gotten set properly on the host for the |
| // synthesized one, since it was also in the results. |
| - EXPECT_EQ(std::wstring(L"Google News"), matches_[0].description); |
| + if (!matches_.empty()) // If this fails, RunTest() already printed it. |
|
Paweł Hajdan Jr.
2009/10/17 06:42:24
Could you rather make it ASSERT_FALSE(matches_.emp
|
| + EXPECT_EQ(std::wstring(L"Google News"), matches_.front().description); |
| // Test that short URL matching works correctly as the user types more |
| // (several tests): |
| @@ -346,7 +347,8 @@ |
| const std::wstring input_1(L"file:"); |
| const std::string fixup_1[] = {"file:///C:/foo.txt"}; |
| RunTest(input_1, std::wstring(), false, fixup_1, arraysize(fixup_1)); |
| - EXPECT_EQ(input_1.length(), matches_[0].inline_autocomplete_offset); |
| + if (!matches_.empty()) // If this fails, RunTest() already printed it. |
|
Paweł Hajdan Jr.
2009/10/17 06:42:24
Same here.
|
| + EXPECT_EQ(input_1.length(), matches_.front().inline_autocomplete_offset); |
| // Fixing up "http:/" should result in an inline autocomplete offset of just |
| // after "http:/", not just after "http:". |
| @@ -357,7 +359,8 @@ |
| "http://bogussite.com/c", |
| }; |
| RunTest(input_2, std::wstring(), false, fixup_2, arraysize(fixup_2)); |
| - EXPECT_EQ(input_2.length(), matches_[0].inline_autocomplete_offset); |
| + if (!matches_.empty()) // If this fails, RunTest() already printed it. |
|
Paweł Hajdan Jr.
2009/10/17 06:42:24
And here.
|
| + EXPECT_EQ(input_2.length(), matches_.front().inline_autocomplete_offset); |
| // Adding a TLD to a small number like "56" should result in "www.56.com" |
| // rather than "0.0.0.56.com". |