| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "chrome/browser/tabs/tab_strip_model.h" | 7 #include "chrome/browser/tabs/tab_strip_model.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/gtk/view_id_util.h" | 10 #include "chrome/browser/ui/gtk/view_id_util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // the findbar is above the floating bookmark bar. | 29 // the findbar is above the floating bookmark bar. |
| 30 IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, FindBarTest) { | 30 IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, FindBarTest) { |
| 31 ASSERT_TRUE(test_server()->Start()); | 31 ASSERT_TRUE(test_server()->Start()); |
| 32 | 32 |
| 33 // Create new tab; open findbar. | 33 // Create new tab; open findbar. |
| 34 browser()->NewTab(); | 34 browser()->NewTab(); |
| 35 browser()->Find(); | 35 browser()->Find(); |
| 36 | 36 |
| 37 // Create new tab with an arbitrary URL. | 37 // Create new tab with an arbitrary URL. |
| 38 GURL url = test_server()->GetURL(kSimplePage); | 38 GURL url = test_server()->GetURL(kSimplePage); |
| 39 browser()->AddSelectedTabWithURL(url, PageTransition::TYPED); | 39 browser()->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED); |
| 40 | 40 |
| 41 // Switch back to the NTP with the active findbar. | 41 // Switch back to the NTP with the active findbar. |
| 42 browser()->ActivateTabAt(1, false); | 42 browser()->ActivateTabAt(1, false); |
| 43 | 43 |
| 44 // Wait for the findbar to show. | 44 // Wait for the findbar to show. |
| 45 MessageLoop::current()->RunAllPending(); | 45 MessageLoop::current()->RunAllPending(); |
| 46 | 46 |
| 47 // Set focus somewhere else, so that we can test clicking on the findbar | 47 // Set focus somewhere else, so that we can test clicking on the findbar |
| 48 // works. | 48 // works. |
| 49 browser()->FocusLocationBar(); | 49 browser()->FocusLocationBar(); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 71 MessageLoop::current()->RunAllPending(); | 71 MessageLoop::current()->RunAllPending(); |
| 72 | 72 |
| 73 // This is kind of a hack. Calling this just once doesn't seem to send a click | 73 // This is kind of a hack. Calling this just once doesn't seem to send a click |
| 74 // event, but doing it twice works. | 74 // event, but doing it twice works. |
| 75 // http://crbug.com/35581 | 75 // http://crbug.com/35581 |
| 76 ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS); | 76 ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS); |
| 77 ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS); | 77 ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS); |
| 78 | 78 |
| 79 EXPECT_TRUE(has_been_clicked); | 79 EXPECT_TRUE(has_been_clicked); |
| 80 } | 80 } |
| OLD | NEW |