| Index: chrome/browser/history/text_database_unittest.cc
|
| diff --git a/chrome/browser/history/text_database_unittest.cc b/chrome/browser/history/text_database_unittest.cc
|
| index 15f9a260791b8b02dedc73b1e5403bb89d0a550e..8910961475a1e592ee53bef809b57a493d686830 100644
|
| --- a/chrome/browser/history/text_database_unittest.cc
|
| +++ b/chrome/browser/history/text_database_unittest.cc
|
| @@ -229,6 +229,31 @@ TEST_F(TextDatabaseTest, Query) {
|
| "COUNTTAG", false));
|
| EXPECT_TRUE(StartsWithASCII(UTF16ToUTF8(results[2].snippet.text()),
|
| "COUNTTAG", false));
|
| +
|
| + // Try a quoted query.
|
| + results.clear();
|
| + db->GetTextMatches("\"News for nerds\"", options, &results, &unique_urls,
|
| + &first_time_searched);
|
| + EXPECT_EQ(1U, results.size());
|
| +
|
| + // Try a quoted query that contains punctuation.
|
| + results.clear();
|
| + db->GetTextMatches("\"Slashdot: News\"", options, &results, &unique_urls,
|
| + &first_time_searched);
|
| + EXPECT_EQ(1U, results.size());
|
| +
|
| + // Ensure that punctuation inside quotes is not being ignored.
|
| + results.clear();
|
| + db->GetTextMatches("\"Slashdot News\"", options, &results, &unique_urls,
|
| + &first_time_searched);
|
| + EXPECT_EQ(0U, results.size());
|
| +
|
| + // Try a quoted query that should *only* match the URL.
|
| + results.clear();
|
| + db->GetTextMatches("\"www.google.com\"", options, &results, &unique_urls,
|
| + &first_time_searched);
|
| + EXPECT_EQ(1U, results.size());
|
| + EXPECT_EQ(0U, results[0].title_match_positions.size());
|
| }
|
|
|
| TEST_F(TextDatabaseTest, TimeRange) {
|
|
|