| Index: chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
|
| diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
|
| index 26c8f1d748e3d1293133165c03fff20e9280daca..2cae71599729039f3084f3a1ad41f252bfe77679 100644
|
| --- a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
|
| +++ b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
|
| @@ -7,12 +7,15 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/values.h"
|
| #include "chrome/browser/android/contextualsearch/contextual_search_context.h"
|
| #include "components/search_engines/template_url_service.h"
|
| #include "net/url_request/test_url_fetcher_factory.h"
|
| #include "net/url_request/url_request_test_util.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| +using base::ListValue;
|
| +
|
| namespace {
|
|
|
| const char kSomeSpecificBasePage[] = "http://some.specific.host.name.com";
|
| @@ -282,6 +285,17 @@ TEST_F(ContextualSearchDelegateTest, SurroundingTextNoBeforeText) {
|
| EXPECT_EQ("ee f", after_text());
|
| }
|
|
|
| +TEST_F(ContextualSearchDelegateTest, ExtractMentionsStartEnd) {
|
| + ListValue mentions_list;
|
| + mentions_list.AppendInteger(1);
|
| + mentions_list.AppendInteger(2);
|
| + size_t start = 0;
|
| + size_t end = 0;
|
| + delegate_->ExtractMentionsStartEnd(mentions_list, &start, &end);
|
| + EXPECT_EQ(static_cast<size_t>(1), start);
|
| + EXPECT_EQ(static_cast<size_t>(2), end);
|
| +}
|
| +
|
| TEST_F(ContextualSearchDelegateTest, SurroundingTextForIcing) {
|
| base::string16 sample = base::ASCIIToUTF16("this is Barack Obama in office.");
|
| int limit_each_side = 3;
|
|
|