| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
| 9 #include "chrome/browser/ui/gtk/view_id_util.h" | 9 #include "chrome/browser/ui/gtk/view_id_util.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ui_test_utils::IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD); | 51 ui_test_utils::IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD); |
| 52 } | 52 } |
| 53 | 53 |
| 54 // Makes sure that you can click on the floating bookmark bar. | 54 // Makes sure that you can click on the floating bookmark bar. |
| 55 // Disabled due to http://crbug.com/88933. | 55 // Disabled due to http://crbug.com/88933. |
| 56 IN_PROC_BROWSER_TEST_F( | 56 IN_PROC_BROWSER_TEST_F( |
| 57 BookmarkBarGtkInteractiveUITest, DISABLED_ClickOnFloatingTest) { | 57 BookmarkBarGtkInteractiveUITest, DISABLED_ClickOnFloatingTest) { |
| 58 ASSERT_TRUE(test_server()->Start()); | 58 ASSERT_TRUE(test_server()->Start()); |
| 59 | 59 |
| 60 GtkWidget* other_bookmarks = | 60 GtkWidget* other_bookmarks = |
| 61 ViewIDUtil::GetWidget(GTK_WIDGET(browser()->window()->GetNativeHandle()), | 61 ViewIDUtil::GetWidget(GTK_WIDGET(browser()->window()->GetNativeWindow()), |
| 62 VIEW_ID_OTHER_BOOKMARKS); | 62 VIEW_ID_OTHER_BOOKMARKS); |
| 63 bool has_been_clicked = false; | 63 bool has_been_clicked = false; |
| 64 g_signal_connect(other_bookmarks, "clicked", | 64 g_signal_connect(other_bookmarks, "clicked", |
| 65 G_CALLBACK(OnClicked), &has_been_clicked); | 65 G_CALLBACK(OnClicked), &has_been_clicked); |
| 66 | 66 |
| 67 // Create new tab. | 67 // Create new tab. |
| 68 browser()->NewTab(); | 68 browser()->NewTab(); |
| 69 | 69 |
| 70 // Wait for the floating bar to appear. | 70 // Wait for the floating bar to appear. |
| 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 |