summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_keyevents_browsertest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Moving notification types which are chrome specific to a new header file ↵ananta@chromium.org2011-07-101-5/+6
| | | | | | | | | | | | | chrome_notification_types.h. This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
* Moves NavigationController::session_id into RestoreTabHelper.sky@chromium.org2011-06-141-2/+2
| | | | | | | | | | BUG=none TEST=none R=nick@chromium.org,mpcomplete@chromium.org,jam@chromium.org Review URL: http://codereview.chromium.org/7104064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89083 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Include stringprintf.h where appropriate, part 3.jhawkins@chromium.org2011-05-121-8/+8
| | | | | | | | | | | BUG=82098 TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/7016011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85088 0039d316-1c4b-4281-b951-d872f2087c98
* Disable BrowserTestEvents.AccessKeys on Mac.zea@chromium.org2011-05-051-2/+2
| | | | | | | BUG=81451 TBR=sail@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84337 0039d316-1c4b-4281-b951-d872f2087c98
* Disable three already flaky tests that are timing out on Mac and turning the ↵maf@chromium.org2011-05-041-2/+2
| | | | | | | | | tree red. R=isherman@chromium.org Review URL: http://codereview.chromium.org/6927033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84153 0039d316-1c4b-4281-b951-d872f2087c98
* Mark a bunch of browser tests as flaky on Mac.jam@chromium.org2011-05-031-1/+13
| | | | | | | | BUG=81451 TBR=mark Review URL: http://codereview.chromium.org/6907024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83944 0039d316-1c4b-4281-b951-d872f2087c98
* Renames TabStripModel and Browser's selected_index tosky@chromium.org2011-04-121-9/+9
| | | | | | | | | | | | | active_index. I plan on renaming more, but wanted to start with this one. BUG=none TEST=none R=ben@chromium.org Review URL: http://codereview.chromium.org/6823064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81268 0039d316-1c4b-4281-b951-d872f2087c98
* Reenable some tests that were erroneously marked FAILS due to bot flakiness.dmichael@chromium.org2011-04-111-2/+1
| | | | | | | | | BUG=78825 TEST=N/A TBR=dmichael@chromium.org Review URL: http://codereview.chromium.org/6813086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81138 0039d316-1c4b-4281-b951-d872f2087c98
* Disable test failing on Mac OS X 10.6dmichael@chromium.org2011-04-081-1/+2
| | | | | | | | BUG=78825 TEST=N/A Review URL: http://codereview.chromium.org/6824004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80944 0039d316-1c4b-4281-b951-d872f2087c98
* Update a bunch of files to the new location of notification files.tfarina@chromium.org2011-03-081-3/+3
| | | | | | | | | | | First part of the remaining files. BUG=None TEST=None Review URL: http://codereview.chromium.org/6649001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77330 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of a bunch of includes to old locations of headers.jam@chromium.org2011-03-021-4/+4
| | | | | | | TBR=avi Review URL: http://codereview.chromium.org/6602061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76470 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/key* to ui/base/keycodes/*ben@chromium.org2011-01-131-38/+38
| | | | | | | | | | BUG=none TEST=none TBR=brettw Review URL: http://codereview.chromium.org/6246001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71330 0039d316-1c4b-4281-b951-d872f2087c98
* Disable BrowserKeyEventsTest.FLAKY_ReservedAccelerators, because it has been ↵eroman@chromium.org2011-01-131-2/+2
| | | | | | | | | | consistently timing-out on the linux debug bot. BUG=69475 TBR=ajwong Review URL: http://codereview.chromium.org/6246002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71272 0039d316-1c4b-4281-b951-d872f2087c98
* [Linux] Make reserved accelerators non-blockable unless they conflict with ↵suzhe@google.com2010-12-211-85/+9
| | | | | | | | | | | | | editor key bindings. This CL also contains some small cleanup to existing code. BUG=54573 TEST=ctrl-t/ctrl-w should not be blocked at all, unless Emaces key theme is enabled. Review URL: http://codereview.chromium.org/5979003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69898 0039d316-1c4b-4281-b951-d872f2087c98
* Fix flaky BrowserKeyEventsTest.ReservedAccelerators on Windows (hopefully)suzhe@chromium.org2010-12-111-28/+22
| | | | | | | | | | | According to the log, the flakiness may be caused by http://crbug.com/65375. But I can't reproduce it manually on my local Windows 7 workstation. This CL just uses the same test flow as Mac port to try to avoid flakiness. The FLAKY label is not removed in case the test will still be flaky. BUG=65847 TEST=The test should not flaky on Windows. Review URL: http://codereview.chromium.org/5746002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68920 0039d316-1c4b-4281-b951-d872f2087c98
* Mark BrowserKeyEventsTest.ReservedAccelerators as flaky.phajdan.jr@chromium.org2010-12-081-1/+2
| | | | | | | | | | | TBR=suzhe BUG=65847 TEST=interactive_ui_tests Review URL: http://codereview.chromium.org/5572006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68570 0039d316-1c4b-4281-b951-d872f2087c98
* Fix BrowserKeyEventsTest.ReservedAccelerators on Mac 10.6suzhe@chromium.org2010-12-061-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two reasons that cause this problem: 1. See issue http://crbug.com/65375 2. By some reason, when BrowserWindowCocoa::PreHandleKeyboardEvent() is called for Cmd-W, it fails to get its corresponding command id, because the corresponding menu item is not enabled at that time. This CL does following changes: 1. Change testing flow to work around issue 65375. 2. Fix the second problem by always retrieving the corresponding command id regardless of the menu item's state. The reason of the second issue: When Cmd-T gets handled in NSApp, BrowserWindowController's -validateUserInterfaceItem: method will be called for all menu items to determine their enable states and the states will be cached in each menu item. At this time, because there is only one tab, the "Close Tab" menu item will be disabled. Then when sending Cmd-W to the browser, it'll firstly be handled in BrowserWindowCocoa::PreHandleKeyboardEvent() method, which will look up the command id associated to Cmd-W, but at this time, BrowserWindowController's -validateUserInterfaceItem: method does not get called yet, so the corresponding menu item is still not enabled. Then BrowserWindowCocoa::PreHandleKeyboardEvent() will not handle Cmd-W because it cannot find its command id. After removing the check in cr_firesForKeyEvent method, BrowserWindowCocoa::PreHandleKeyboardEvent() method will always get the correct command id of a key equivalent regardless of its enable state, then if it's a reserved key equivalent, it will always be sent to NSApp for handling, which will call BrowserWindowController's -validateUserInterfaceItem: to update the enable states of all menu items. Then if the corresponding menu item is really disabled, NSApp will do nothing and return false, then the key event will be dispatched to web page as normal. BUG=50447 BrowserKeyEventsTest.ReservedAccelerators failed on Mac10.6 Tests (dbg)(1) bot. TEST=The test should not flaky. Review URL: http://codereview.chromium.org/5576002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68369 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Include browser.h -> ui/browser.h [Part 4].jhawkins@chromium.org2010-11-171-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/5104002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66401 0039d316-1c4b-4281-b951-d872f2087c98
* Mark BrowserKeyEventsTest.AccessKeys test as non-flakyisherman@chromium.org2010-10-271-8/+1
| | | | | | | | | BUG=55713 TEST=interactive_ui_tests --gtest_filter=BrowserKeyEventsTest.AccessKeys Review URL: http://codereview.chromium.org/4092003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64151 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring ui_test_utils codeisherman@chromium.org2010-09-281-44/+21
| | | | | | | | | BUG=none TEST=all tests that used to pass should continue to pass Review URL: http://codereview.chromium.org/3402030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60858 0039d316-1c4b-4281-b951-d872f2087c98
* Experimental change to try to reduce the flakiness of ↵isherman@chromium.org2010-09-241-0/+5
| | | | | | | | | | | | | | | BrowserKeyEventsTest.AccessKeys The theory is that the QuitTask might be nestling into the message loop before the task for the result of the key press. For example, in bug 55713, the theory is that we quit out of the message loop after the key press is sent, but before the location bar is focused. If so, this patch should serve as a band-aid to (nearly) eliminate the test flakiness. At that point we can try to figure out a more bulletproof fix; for now, I'd like to make sure we're right about the underlying cause of the flakiness. BUG=55713 TEST=interactive_ui_tests --gtest_filter=BrowserKeyEventsTest.AccessKeys should not flakily fail Review URL: http://codereview.chromium.org/3454025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60437 0039d316-1c4b-4281-b951-d872f2087c98
* Fix type that broke buildjoth@chromium.org2010-09-151-1/+1
| | | | | | TBR=suzhe@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59504 0039d316-1c4b-4281-b951-d872f2087c98
* Mark BrowserKeyEventsTest.AccessKeys as flakyjoth@chromium.org2010-09-151-1/+8
| | | | | | | | BUG=55713 TEST=BrowserKeyEventsTest.AccessKeys TBR=suzhe@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59503 0039d316-1c4b-4281-b951-d872f2087c98
* Re-lands 58186:bryeung@chromium.org2010-09-031-45/+45
| | | | | | | | | | | | | | | | | | | | Original message: """ Move the keyboard files from base/ to app/. Also moves the associated classes/enums from base:: to app::. TEST=try bots compile BUG=NONE Review URL: http://codereview.chromium.org/3165064 """ TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3354005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58438 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58388 - Revert 58215 - Revert 58186 - Move the keyboard files from ↵akalin@chromium.org2010-09-021-45/+45
| | | | | | | | | | | | | | | | | | | | | base/ to app/. Also moves the associated classes/enums from base:: to app::. TEST=try bots compile BUG=NONE Review URL: http://codereview.chromium.org/3165064 TBR=bryeung@chromium.org TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3361003 TBR=bryeung@chromium.org Review URL: http://codereview.chromium.org/3337006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58390 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58215 - Revert 58186 - Move the keyboard files from base/ to app/.bryeung@chromium.org2010-09-021-45/+45
| | | | | | | | | | | | | | | | Also moves the associated classes/enums from base:: to app::. TEST=try bots compile BUG=NONE Review URL: http://codereview.chromium.org/3165064 TBR=bryeung@chromium.org TBR=phajdan.jr@chromium.org Review URL: http://codereview.chromium.org/3361003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58388 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 58186 - Move the keyboard files from base/ to app/.phajdan.jr@chromium.org2010-09-011-45/+45
| | | | | | | | | | | | | Also moves the associated classes/enums from base:: to app::. TEST=try bots compile BUG=NONE Review URL: http://codereview.chromium.org/3165064 TBR=bryeung@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58215 0039d316-1c4b-4281-b951-d872f2087c98
* Move the keyboard files from base/ to app/.bryeung@chromium.org2010-09-011-45/+45
| | | | | | | | | | | Also moves the associated classes/enums from base:: to app::. TEST=try bots compile BUG=NONE Review URL: http://codereview.chromium.org/3165064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58186 0039d316-1c4b-4281-b951-d872f2087c98
* Adds ui_test_utils::SendAndWaitForKeyPress and converts callers (wheresky@chromium.org2010-08-231-5/+3
| | | | | | | | | | | | appropriate) to use it. Hopefully this will help isolate why tests are failing on bot. BUG=none TEST=none; test only change. Review URL: http://codereview.chromium.org/3117030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57064 0039d316-1c4b-4281-b951-d872f2087c98
* Test server cleanup patch of death:phajdan.jr@chromium.org2010-08-171-24/+16
| | | | | | | | | | | | | | - reduce the number of different classes - clean up the internal code - modify the interface to expose less internal details (this will allow more flexibility with port numbers) TEST=many BUG=49680 Review URL: http://codereview.chromium.org/3080029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56405 0039d316-1c4b-4281-b951-d872f2087c98
* [Linux Views] Refactor accelerator handler related code.suzhe@chromium.org2010-08-041-8/+54
| | | | | | | | | | | | | | | | | This CL removes the accelerator handling logic in accelerator_handler_gtk.cc and implements a much simpler solution in WidgetGtk. The new approach always sends a key event to the focused View and native GtkWidget first and only sends it to the focus manager if it's not handled by any View or native GtkWidget. BUG=23383 AcceleratorHandler on Windows should not dispatch the KEYUP messages eaten by the FocusManager BUG=40966 BrowserKeyEventsTest.AccessKeys is crashy BUG=49701 [Linux Views]Some Emacs keybindings are broken in omnibox and find in page box. TEST=Press Alt key in different place (web page, omnibox, find bar, etc.) to see if menu bar can be focused correctly. Press alt-F to popup wrench menu and Escape to close it, then try alt key again. Review URL: http://codereview.chromium.org/3046041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54947 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Move more test server code from net/url_request/url_request_unittest.hphajdan.jr@chromium.org2010-07-291-7/+8
| | | | | | | | | | | | | to net/test/test_server.h No code changes, just a move. TEST=none BUG=49680 Review URL: http://codereview.chromium.org/3034038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54201 0039d316-1c4b-4281-b951-d872f2087c98
* Mark BrowserKeyEventsTest.ReservedAccelerators flaky on Mac.suzhe@chromium.org2010-07-281-1/+8
| | | | | | | | | BUG=50447 TEST=none Review URL: http://codereview.chromium.org/3033034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53883 0039d316-1c4b-4281-b951-d872f2087c98
* Fix compile warning on Mac OS X 10.5suzhe@chromium.org2010-07-271-2/+2
| | | | | | | | | BUG=none TEST=Make sure interactive_ui_tests can build on OS X 10.5 correctly. Review URL: http://codereview.chromium.org/3046027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53866 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac]Port browser_keyevents_browsertest.cc and browser_focus_uitest.cc to Mac.suzhe@chromium.org2010-07-271-126/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL includes: 1. Implementation of ui_test_utils_mac.mm 2. Fix for ui_controls_mac.mm 3. Port browser_keyevents_browsertest.cc to Mac and add some new tests for Mac. 4. Partially port browser_focus_uitest.cc to Mac, now can be compiled and run on Mac but some tests fail. 5. Add two functions into ui_test_utils.h: HideNativeWindow() and ShowAndFocusNativeWindow(). The latter one shows a window and grabs the input focus, which is useful for tests depending on fake keyboard/mouse events. Because browser_keyevents_browsertests.cc and browser_focus_uitest.cc belong to interactive_ui_tests, which is not available on Mac (see http://crbug.com/21276), in order to test them on Mac, you may want to move them into browser_tests locally. But it won't work on build and try bots, because these tests must be run with screen unlocked. This CL depends on CL: http://codereview.chromium.org/2973004 and http://codereview.chromium.org/2805075 BUG=22515 Keyboard handling needs unit tests BUG=48671 interactive_ui_test: BrowserKeyEventsTest.NormalKeyEvents is flaky BUG=48936 Browser window is opened inactivated when running an InProcessBrowserTest. TEST=none Review URL: http://codereview.chromium.org/2986004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53840 0039d316-1c4b-4281-b951-d872f2087c98
* Marking BrowserKeyEventsTest.NormalKeyEvents flaky.hans@chromium.org2010-07-091-1/+2
| | | | | | | | | BUG=48671 TBR=suzhe Review URL: http://codereview.chromium.org/2945008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51953 0039d316-1c4b-4281-b951-d872f2087c98
* Remove deprecated things from net test suite:phajdan.jr@chromium.org2010-04-301-5/+5
| | | | | | | | | | | | - URLRequestTestContext (from now on use TestURLRequestContext) - TestServerPageW (use TestServerPage). TEST=none BUG=none Review URL: http://codereview.chromium.org/1814002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46044 0039d316-1c4b-4281-b951-d872f2087c98
* Implement UI automation on the Mac.jrg@chromium.org2010-04-291-1/+3
| | | | | | | | | | | | | | | | | | | Code is untested. From gChat: me: do you have a good test I can use to make sure mac impl of ui_controls for sending events works OK? Or would you prefer I send you CLs to play with and we iterate by hand? Joe: I would like the CL to play with to see if I can get it to work with the code I wrote Warning to Joe: mouse moved events currently use the Mac coordinate frame (0,0 is bottom-left not top-left). That's easy to switch; I'd like to do whatever is easiest to get WebDriver working. BUG=26102 Review URL: http://codereview.chromium.org/1701006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46005 0039d316-1c4b-4281-b951-d872f2087c98
* Views: Disable BrowserKeyEventsTests.AccessKeys. It's crashing on Linux views.thestig@chromium.org2010-04-271-2/+2
| | | | | | | | | BUG=40037 TEST=Linux Views bot goes green? TBR=oshima Review URL: http://codereview.chromium.org/1792004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45672 0039d316-1c4b-4281-b951-d872f2087c98
* Enable interactive_ui_testsoshima@chromium.org2010-04-061-3/+11
| | | | | | | | | | | | | | | | | | | | | | | * changed DCHECK in tree_node_model to make it easy to find how it failed. * Fixed compilation error in find_bar_host_interactive_uitest.cc on linux/views. * Disabled BrowserKeyEventsTest.AccessKeys for Chromeos Added/Changed ui_test_utils::RunAllPendingInMessageLoop where necessary. * Disabled tab_dragging_tests. I included the source so that we can catch compilation error even if tests do not run. Changed the comment from // -> /* as GCC complains the use of "\" (and potentially dangerous) * Added SleepInMessageLoop to allow event loop to execute the tasks/events while waiting. * For RunAllPendingInMessageLoop change, please see http://codereview.chromium.org/1591004 BUG=39736 TEST=interactive_ui_tests should pass with following cls http://codereview.chromium.org/1594003 http://codereview.chromium.org/1545011. Review URL: http://codereview.chromium.org/1576008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43701 0039d316-1c4b-4281-b951-d872f2087c98
* BSD ifdefs, etc. necessary for chrome/pvalchev@google.com2010-03-091-4/+4
| | | | | | Review URL: http://codereview.chromium.org/656009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41067 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the keyboard events handling code related to ↵suzhe@chromium.org2009-12-101-12/+84
| | | | | | | | | | | | | | | | | | | | | | | | | RenderViewHostDelegate::View and TabContentsDelegate interfaces. Significant changes made by this CL: 1. The keyboard event handling code has been moved from TabContentsView implementation classes into BrowserWindow implementation classes. Please refer to this discussion thread: http://groups.google.com/group/chromium-dev/browse_thread/thread/e6e0b5cc105659b7/9953c4308bb0000c This change makes the keyboard event flow comply with the relationship between TabContents/TabContentsView and TabContentsDelegate/BrowserWindow. Besides it, the code is also simplified a lot, for example, the keyboard event handling code in chrome/browser/views/tab_contents/tab_contents_view_{gtk,win}.cc are now merged into one copy and moved into chrome/browser/views/frame/browser_view.cc. 2. A pre-handle phrase has been added into the keyboard event handling flow. A keyboard event will be first sent to the browser for pre-handling before being sent to the renderer. Then if the event was not handled by the renderer, it'll be sent to the browser again for post-handling. 3. The keyboard accelerator handling code of Windows and Linux ports have been optimized to get rid off extra command lookup. 4. The keyboard event message flow between the browser and the renderer is changed back to full async mode, all complex logics introduced by revision 29857 are removed. BUG=24479, 26054, 26131, 28839 TEST=See bug reports. Review URL: http://codereview.chromium.org/400012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34234 0039d316-1c4b-4281-b951-d872f2087c98
* Implements tests for testing browser's overall key events handling behavior.suzhe@chromium.org2009-10-231-0/+570
This CL implements some basic tests for testing browser's overall key events handling behavior. This CL depends on http://codereview.chromium.org/235039 and http://codereview.chromium.org/195062. Currently, only Linux and Windows are supported. The tests assume US keyboard layout is used and no IME is activated. We still need to investigate how to write tests that involving different keyboard layout and input methods. BUG=none TEST=none Review URL: http://codereview.chromium.org/268035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29866 0039d316-1c4b-4281-b951-d872f2087c98