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

Side by Side Diff: chrome/browser/browser_focus_uitest.cc

Issue 7996011: Revert "Fix activation problem when showing bubble view" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 NotificationService::current()->Notify( 185 NotificationService::current()->Notify(
186 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE, 186 content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
187 Source<TabContents>(tab()), 187 Source<TabContents>(tab()),
188 Details<const bool>(&is_editable_node)); 188 Details<const bool>(&is_editable_node));
189 } 189 }
190 190
191 private: 191 private:
192 std::string html_contents_; 192 std::string html_contents_;
193 }; 193 };
194 194
195 #if defined(OS_CHROMEOS) 195 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, ClickingMovesFocus) {
196 #define MAYBE_ClickingMovesFocus DISABLED_ClickingMovesFocus
197 #else
198 #define MAYBE_ClickingMovesFocus ClickingMovesFocus
199 #endif
200
201 IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_ClickingMovesFocus) {
202 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 196 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
203 #if defined(OS_POSIX) 197 #if defined(OS_POSIX)
204 // It seems we have to wait a little bit for the widgets to spin up before 198 // It seems we have to wait a little bit for the widgets to spin up before
205 // we can start clicking on them. 199 // we can start clicking on them.
206 MessageLoop::current()->PostDelayedTask(FROM_HERE, 200 MessageLoop::current()->PostDelayedTask(FROM_HERE,
207 new MessageLoop::QuitTask(), 201 new MessageLoop::QuitTask(),
208 kActionDelayMs); 202 kActionDelayMs);
209 ui_test_utils::RunMessageLoop(); 203 ui_test_utils::RunMessageLoop();
210 #endif // defined(OS_POSIX) 204 #endif // defined(OS_POSIX)
211 205
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 browser()->Reload(CURRENT_TAB); 902 browser()->Reload(CURRENT_TAB);
909 observer.Wait(); 903 observer.Wait();
910 } 904 }
911 905
912 // Focus should now be on the tab contents. 906 // Focus should now be on the tab contents.
913 browser()->ShowDownloadsTab(); 907 browser()->ShowDownloadsTab();
914 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW)); 908 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
915 } 909 }
916 910
917 } // namespace 911 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698