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

Unified Diff: chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc

Issue 6251001: Move chrome/browser/gtk/ to chrome/browser/ui/gtk/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « chrome/browser/gtk/bookmark_bar_gtk.cc ('k') | chrome/browser/gtk/bookmark_bar_gtk_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc
===================================================================
--- chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc (revision 71352)
+++ chrome/browser/gtk/bookmark_bar_gtk_interactive_uitest.cc (working copy)
@@ -1,78 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <gtk/gtk.h>
-
-#include "chrome/browser/browser_window.h"
-#include "chrome/browser/gtk/view_id_util.h"
-#include "chrome/browser/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/test/in_process_browser_test.h"
-#include "chrome/test/ui_test_utils.h"
-#include "net/test/test_server.h"
-
-namespace {
-
-const char kSimplePage[] = "404_is_enough_for_us.html";
-
-void OnClicked(GtkWidget* widget, bool* clicked_bit) {
- *clicked_bit = true;
-}
-
-} // namespace
-
-class BookmarkBarGtkInteractiveUITest : public InProcessBrowserTest {
-};
-
-// Makes sure that when you switch back to an NTP with an active findbar,
-// the findbar is above the floating bookmark bar.
-IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, FindBarTest) {
- ASSERT_TRUE(test_server()->Start());
-
- // Create new tab; open findbar.
- browser()->NewTab();
- browser()->Find();
-
- // Create new tab with an arbitrary URL.
- GURL url = test_server()->GetURL(kSimplePage);
- browser()->AddSelectedTabWithURL(url, PageTransition::TYPED);
-
- // Switch back to the NTP with the active findbar.
- browser()->SelectTabContentsAt(1, false);
-
- // Wait for the findbar to show.
- MessageLoop::current()->RunAllPending();
-
- // Set focus somewhere else, so that we can test clicking on the findbar
- // works.
- browser()->FocusLocationBar();
- ui_test_utils::ClickOnView(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
- ui_test_utils::IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
-}
-
-// Makes sure that you can click on the floating bookmark bar.
-IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, ClickOnFloatingTest) {
- ASSERT_TRUE(test_server()->Start());
-
- GtkWidget* other_bookmarks =
- ViewIDUtil::GetWidget(GTK_WIDGET(browser()->window()->GetNativeHandle()),
- VIEW_ID_OTHER_BOOKMARKS);
- bool has_been_clicked = false;
- g_signal_connect(other_bookmarks, "clicked",
- G_CALLBACK(OnClicked), &has_been_clicked);
-
- // Create new tab.
- browser()->NewTab();
-
- // Wait for the floating bar to appear.
- MessageLoop::current()->RunAllPending();
-
- // This is kind of a hack. Calling this just once doesn't seem to send a click
- // event, but doing it twice works.
- // http://crbug.com/35581
- ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS);
- ui_test_utils::ClickOnView(browser(), VIEW_ID_OTHER_BOOKMARKS);
-
- EXPECT_TRUE(has_been_clicked);
-}
« no previous file with comments | « chrome/browser/gtk/bookmark_bar_gtk.cc ('k') | chrome/browser/gtk/bookmark_bar_gtk_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698