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

Unified Diff: athena/home/athena_start_page_view_unittest.cc

Issue 668443002: Changes HomeCard to fullscreen from bottom when typing a query. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/home/athena_start_page_view_unittest.cc
diff --git a/athena/home/athena_start_page_view_unittest.cc b/athena/home/athena_start_page_view_unittest.cc
index aa11f577e60f69236e80368594f836e88d264540..c91177e51083ec823df9307d8ad0f32e714116a6 100644
--- a/athena/home/athena_start_page_view_unittest.cc
+++ b/athena/home/athena_start_page_view_unittest.cc
@@ -101,6 +101,8 @@ class AthenaStartPageViewTest : public test::AthenaTestBase {
return view_->search_box_view_->search_box()->text();
}
+ float layout_state() { return view_->layout_state_; }
+
scoped_ptr<AthenaStartPageView> view_;
private:
@@ -226,4 +228,20 @@ TEST_F(AthenaStartPageViewTest, SearchBox) {
EXPECT_TRUE(GetVisibleQuery().empty());
}
+TEST_F(AthenaStartPageViewTest, SearchFromBottom) {
+ view_->SetLayoutState(0.0f);
+
+ const base::string16 query = base::UTF8ToUTF16("test");
+ SetSearchQuery(query);
+
+ EXPECT_FALSE(IsLogoVisible());
+ EXPECT_EQ(query, GetVisibleQuery());
+ EXPECT_EQ(1.0f, layout_state());
+
+ SetSearchQuery(base::string16());
+ EXPECT_TRUE(IsLogoVisible());
+ EXPECT_TRUE(GetVisibleQuery().empty());
+ EXPECT_EQ(1.0f, layout_state());
+}
+
} // namespace athena
« no previous file with comments | « athena/home/athena_start_page_view.cc ('k') | athena/home/home_card_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698