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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc

Issue 2706333002: [TTS] Add a Java Context linked to existing native (Closed)
Patch Set: Nothing, I think. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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 5646a65aeb12afe13cd22820ce49bc34110665be..d28dd0112ffff0f92028be962ce3660b7e5dfd8b 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
@@ -95,10 +95,9 @@ class ContextualSearchDelegateTest : public testing::Test {
// ContextualSearchDelegate class takes ownership of the context.
delegate_->set_context_for_testing(test_context_);
- test_context_->start_offset = start_offset;
- test_context_->end_offset = end_offset;
- test_context_->surrounding_text = surrounding_text;
- delegate_->ContinueSearchTermResolutionRequest();
+ test_context_->SetSelectionSurroundings(start_offset, end_offset,
+ surrounding_text);
+ delegate_->ResolveSearchTermFromContext();
fetcher_ = test_factory_.GetFetcherByID(
ContextualSearchDelegate::kContextualSearchURLFetcherID);
ASSERT_TRUE(fetcher_);
@@ -147,9 +146,8 @@ class ContextualSearchDelegateTest : public testing::Test {
int end_offset) {
test_context_ = new ContextualSearchContext(
"Bogus", std::string(), GURL(kSomeSpecificBasePage), "utf-8");
- test_context_->surrounding_text = surrounding_text;
- test_context_->start_offset = start_offset;
- test_context_->end_offset = end_offset;
+ test_context_->SetSelectionSurroundings(start_offset, end_offset,
+ surrounding_text);
// ContextualSearchDelegate class takes ownership of the context.
delegate_->set_context_for_testing(test_context_);
}

Powered by Google App Engine
This is Rietveld 408576698