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

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

Issue 2703473002: [TTS] Extract tapped text before showing UI. (Closed)
Patch Set: Added some tests, fixed some tests, added DCHECKS to native context, rebased. Created 3 years, 8 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 d75e245aa3dbea4a12c923dfaa42ad67de280c2b..ee205054fae79f472207302a5cc708f8663393b6 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate_unittest.cc
@@ -90,7 +90,7 @@ class ContextualSearchDelegateTest : public testing::Test {
int start_offset,
int end_offset) {
test_context_ = new ContextualSearchContext(
- selected_text, std::string(), GURL(kSomeSpecificBasePage), "utf-8");
+ std::string(), GURL(kSomeSpecificBasePage), "utf-8");
// ContextualSearchDelegate class takes ownership of the context.
delegate_->SetContextForTesting(test_context_->GetWeakPtr());
@@ -131,9 +131,8 @@ class ContextualSearchDelegateTest : public testing::Test {
// from tests, but can be called here because this is a friend class.
//-------------------------------------------------------------------
void CreateTestContext() {
- test_context_ =
- new ContextualSearchContext(std::string("word"), std::string(),
- GURL(kSomeSpecificBasePage), "utf-8");
+ test_context_ = new ContextualSearchContext(
+ std::string(), GURL(kSomeSpecificBasePage), "utf-8");
delegate_->SetContextForTesting(test_context_->GetWeakPtr());
}
@@ -176,7 +175,7 @@ class ContextualSearchDelegateTest : public testing::Test {
int start_offset,
int end_offset) {
test_context_ = new ContextualSearchContext(
- "Bogus", std::string(), GURL(kSomeSpecificBasePage), "utf-8");
+ std::string(), GURL(kSomeSpecificBasePage), "utf-8");
test_context_->SetSelectionSurroundings(start_offset, end_offset,
surrounding_text);
// ContextualSearchDelegate class takes ownership of the context.

Powered by Google App Engine
This is Rietveld 408576698