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

Unified Diff: chrome/browser/extensions/extension_omnibox_apitest.cc

Issue 5064001: More changes to extension omnibox API for styles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: offset Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_omnibox_apitest.cc
diff --git a/chrome/browser/extensions/extension_omnibox_apitest.cc b/chrome/browser/extensions/extension_omnibox_apitest.cc
index c5c54f0671b4733dcc261a5ae81ac2ac264206d6..787961b4ec357385b7a1f3f76dcd9aa2966e1551 100644
--- a/chrome/browser/extensions/extension_omnibox_apitest.cc
+++ b/chrome/browser/extensions/extension_omnibox_apitest.cc
@@ -135,30 +135,41 @@ IN_PROC_BROWSER_TEST_F(OmniboxApiTest, MAYBE_Basic) {
EXPECT_EQ(L"keyword suggestion2", result.match_at(2).fill_into_edit);
EXPECT_EQ(L"keyword suggestion3", result.match_at(3).fill_into_edit);
- std::wstring description = L"Description with style: <match> [dim], none";
+ std::wstring description =
+ L"Description with style: <match>, [dim], (url till end)";
EXPECT_EQ(description, result.match_at(1).contents);
- ASSERT_EQ(5u, result.match_at(1).contents_class.size());
+ ASSERT_EQ(6u, result.match_at(1).contents_class.size());
+
EXPECT_EQ(0u,
result.match_at(1).contents_class[0].offset);
EXPECT_EQ(ACMatchClassification::NONE,
result.match_at(1).contents_class[0].style);
+
EXPECT_EQ(description.find('<'),
result.match_at(1).contents_class[1].offset);
EXPECT_EQ(ACMatchClassification::MATCH,
result.match_at(1).contents_class[1].style);
+
EXPECT_EQ(description.find('>'),
result.match_at(1).contents_class[2].offset);
EXPECT_EQ(ACMatchClassification::NONE,
result.match_at(1).contents_class[2].style);
+
EXPECT_EQ(description.find('['),
result.match_at(1).contents_class[3].offset);
EXPECT_EQ(ACMatchClassification::DIM,
result.match_at(1).contents_class[3].style);
+
EXPECT_EQ(description.find(']'),
result.match_at(1).contents_class[4].offset);
EXPECT_EQ(ACMatchClassification::NONE,
result.match_at(1).contents_class[4].style);
+ EXPECT_EQ(description.find('('),
+ result.match_at(1).contents_class[5].offset);
+ EXPECT_EQ(ACMatchClassification::URL,
+ result.match_at(1).contents_class[5].style);
+
AutocompleteMatch match = result.match_at(4);
EXPECT_EQ(AutocompleteMatch::SEARCH_WHAT_YOU_TYPED, match.type);
EXPECT_FALSE(match.deletable);
« no previous file with comments | « chrome/browser/extensions/extension_omnibox_api.cc ('k') | chrome/browser/extensions/extension_omnibox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698