summaryrefslogtreecommitdiffstats
path: root/views/view_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Added entry points to view/View to dispatch and process TouchEvents.rjkroege@google.com2010-09-081-5/+153
| | | | | | | | | | | | This change is part of a series of changes to bring TouchEvent processing to views. BUG=na TESTED=compiled with and without touchui Review URL: http://codereview.chromium.org/3192002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58823 0039d316-1c4b-4281-b951-d872f2087c98
* Re-lands 58186:bryeung@chromium.org2010-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | | | 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-4/+4
| | | | | | | | | | | 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
* Add #include utf_string_conversions.h to all files that use ASCIIToWide andbrettw@chromium.org2010-08-031-0/+1
| | | | | | | | | | | | | | | ASCIIToUTF16. I removed string_util includes from a few places where it obviously wasn't needed. In a separate pass, I'm going to remove ASCIITo* from string_util, then I'm going to do an even later pass to find the unnecessary string_util.h includes and remove them. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3058027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54746 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r54074.dtseng@chromium.org2010-07-301-0/+2
| | | | | | Review URL: http://codereview.chromium.org/3010040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54334 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54074 - Add initial tests for keyboard access (tabbing in some dialogs).rohitrao@chromium.org2010-07-291-2/+0
| | | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 TBR=dtseng@chromium.org Review URL: http://codereview.chromium.org/3046031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54093 0039d316-1c4b-4281-b951-d872f2087c98
* Add initial tests for keyboard access (tabbing in some dialogs).dtseng@chromium.org2010-07-281-0/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3015026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54074 0039d316-1c4b-4281-b951-d872f2087c98
* TTF: Re-enable ViewTest.RerouteMouseWheelTest by marking it as FAILS_.jhawkins@chromium.org2010-07-121-1/+1
| | | | | | | | | BUG=10572 TEST=ViewTest.RerouteMouseWheelTest Review URL: http://codereview.chromium.org/2946010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52131 0039d316-1c4b-4281-b951-d872f2087c98
* Canvas refactoring part 3.ben@chromium.org2010-06-251-3/+3
| | | | | | | | | | | | | | - Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50854 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50784 - Canvas refactoring part 3.ben@chromium.org2010-06-241-2/+2
| | | | | | | | | | | | | | | | | | - Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none Review URL: http://codereview.chromium.org/2825018 TBR=ben@chromium.org Review URL: http://codereview.chromium.org/2811032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50790 0039d316-1c4b-4281-b951-d872f2087c98
* Canvas refactoring part 3.ben@chromium.org2010-06-241-2/+2
| | | | | | | | | | | | | | | - Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none Review URL: http://codereview.chromium.org/2825018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50784 0039d316-1c4b-4281-b951-d872f2087c98
* Add cross platform Widget::InitWithWidget(parent, const gfx::Rect& bounds);oshima@chromium.org2010-06-051-6/+1
| | | | | | | | | | | | | On linux, native parent has to be either window_contents or widget depending of the type of wiget. InitWithWidget takes a parent Widget instead of native and hides these details. I also cleaned up a few dead/duplicated code. BUG=none TEST=none Review URL: http://codereview.chromium.org/2355003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48990 0039d316-1c4b-4281-b951-d872f2087c98
* Fix valgrind memory leak complain in ViewTestxiyuan@chromium.org2010-04-211-0/+6
| | | | | | | | | BUG=42199 TEST=Verify valgrind issue in 42199 is fixed. Review URL: http://codereview.chromium.org/1761001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45207 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes possible crash if the window hosting a menu was closed while thesky@chromium.org2010-04-161-0/+2
| | | | | | | | | | | | menu was showing. When this happens the window the menu creates is implicitly destroyed (because the parent is going away). BUG=25563 TEST=see bug Review URL: http://codereview.chromium.org/1664001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44807 0039d316-1c4b-4281-b951-d872f2087c98
* Move app/gfx/canvas and app/gfx/font to gfx/.ben@chromium.org2010-03-231-1/+1
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1132006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42312 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-171-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* Replace lots of "int x, int y" with gfx::Point. Also use gfx::Size and ↵pkasting@chromium.org2010-03-081-2/+2
| | | | | | | | | | gfx::Rect in a few more places. BUG=none TEST=none Review URL: http://codereview.chromium.org/669130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40966 0039d316-1c4b-4281-b951-d872f2087c98
* Addded notification when ancestor gets changed. So windows that lack focus ↵georgey@chromium.org2010-01-071-0/+139
| | | | | | | | | | | | | manager, because of being created on inactive tab, could do the necessary work when focus manager is actually attached. This is relevant for Windows only, but some support functions (FindAllRootViews) could be useful for other architectures as well. BUG=22481 TEST=in the bug Review URL: http://codereview.chromium.org/492025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35675 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/449003/show for Thiago:sky@chromium.org2009-12-011-4/+4
| | | | | | | | | | | | | | views: replace the deprecated macro (DISALLOW_EVIL_CONSTRUCTORS). Use DISALLOW_COPY_AND_ASSIGN instead, also fix some style issues pointed by lint. BUG=none TEST=none Review URL: http://codereview.chromium.org/449075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33500 0039d316-1c4b-4281-b951-d872f2087c98
* Enabling the default button behavior on Linux toolkit_views.jcampan@chromium.org2009-10-081-108/+56
| | | | | | | | | | | | I had to make the KeyEvent constructor include the event flags. Also cleaned-up some unit-tests BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/266012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28397 0039d316-1c4b-4281-b951-d872f2087c98
* Update a file for the new clipboard location I missed in the last checkin.brettw@chromium.org2009-10-031-1/+1
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27939 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding keyboard code refactoring:jcampan@chromium.org2009-09-291-3/+3
| | | | | | | | | | | | | | | | http://codereview.chromium.org/248010/show Changing the KeyboardEvent to use a KeyboardCode instead of a w_char. Led to several places where I had to switch from VK_ to VKEY_. Also cleaned-up the table view OnKeyDown method. Since TableView is a NativeControl it can use the NativeControl::OnKeyDown directly. BUG=None TEST=Make sure short-cuts works as expected, especially in the omnibox. Review URL: http://codereview.chromium.org/251020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27444 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 27412 it breaks the toolkit views Linux build.jcampan@chromium.org2009-09-281-3/+3
| | | | | | | TBR=sky Review URL: http://codereview.chromium.org/254005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27416 0039d316-1c4b-4281-b951-d872f2087c98
* Changing the KeyboardEvent to use a KeyboardCode instead of a w_char. Led to ↵jcampan@chromium.org2009-09-281-3/+3
| | | | | | | | | | | | several places where I had to switch from VK_ to VKEY_. Also cleaned-up the table view OnKeyDown method. Since TableView is a NativeControl it can use the NativeControl::OnKeyDown directly. BUG=None TEST=Make sure short-cuts works as expected, especially in the omnibox. Review URL: http://codereview.chromium.org/248010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27412 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed a few bugs in view/gtk frameworkoshima@chromium.org2009-09-251-0/+28
| | | | | | | | | | | | | | | | | NativeControlGtk * Layout if the visibility is changed after the native view is created. (I also added DCHECK(GetWidget()) to make sure Wiget is available at this point) NativeViewHostGtk * decrement the native_view's ref count only if it still has a parent. * create fixed in AddedToWidget if fixed_ does not exist. This can happen when a view is removed, then added. BUG=none TEST=unit test for last 2 bugs is added to view_unittest.cc (ChangeVisibility). Review URL: http://codereview.chromium.org/219035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27282 0039d316-1c4b-4281-b951-d872f2087c98
* Roll webkit deps 48155:48185 and remove a couple of passing tests from ↵japhet@chromium.org2009-09-081-6/+6
| | | | | | | | | | | | | | | test_expectations.txt. Also, merge in http://codereview.chromium.org/174367 (original author: vandebo@chromium.org), which is the downstream half of r48168. BUG=4360 BUG=21228 BUG=18792 TEST=none TBR=eroman git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25669 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 9867: Activating the previous/next buttons with the keyboard in the find ↵finnur@chromium.org2009-09-031-1/+1
| | | | | | | | | | | | | bar should not change the focus. Add param const Event& event to ButtonPressed, so that recipients can find out more about the event that generated the ButtonPress message. BUG=9687 TEST=Open www.google.com and open Find-in-page, search for 'e'. Press FindNext button with mouse and note that the focus should be on the textfield. Now press Tab twice to put focus on the FindNext button and press SpaceBar a few times. Note that the focus should stay on the FindNext button. Review URL: http://codereview.chromium.org/188016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25367 0039d316-1c4b-4281-b951-d872f2087c98
* The FocusManager stores/restores focus when the top window becomes ↵jcampan@chromium.org2009-09-011-0/+46
| | | | | | | | | | | | inactive/active. BUG=None TEST=Run the focus manager unit-tests. Review URL: http://codereview.chromium.org/164448 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25108 0039d316-1c4b-4281-b951-d872f2087c98
* Porting textfield to toolkit_views Gtk.jcampan@chromium.org2009-09-011-1/+39
| | | | | | | | | | | BUG=None TEST=Run the view unit-tests. See original review: http://codereview.chromium.org/165512/show Review URL: http://codereview.chromium.org/180061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25063 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds accelerators to the Linux toolkit views.jcampan@chromium.org2009-07-311-1/+3
| | | | | | | | | | | The MessageLoop had to be modified to support Dispatchers on Linux. BUG=None TEST=On Windows and Linux, make sure the accelerators still work as expected. On Linux toolkit views, build and run the unit-tests. Review URL: http://codereview.chromium.org/159046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22210 0039d316-1c4b-4281-b951-d872f2087c98
* This makes the unit-tests pass with toolkit_views on Linux.jcampan@chromium.org2009-07-151-29/+47
| | | | | | | | | | It also make them run the view tests. BUG=None TEST=Run the unit-tests on Linux with toolkit_views=1 Review URL: http://codereview.chromium.org/149649 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20794 0039d316-1c4b-4281-b951-d872f2087c98
* This CL removes the last (major) Windows specific part out of the focus ↵jcampan@chromium.org2009-06-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | manager. It was previously landed and reverted because it broke the reliability tests. http://codereview.chromium.org/125148 The breakage was caused by constrained windows not getting a hold of the FocusManager when in unparented tabs. The fix is to ensure unparented tab still have a way to access their FocusManager for proper closure. Files changed from the previous patch that need reviewing: native_tab_contents_container_win.cc tab_contents_view_win.h tab_contents_view_win.cc BUG=None TEST=Run all tests (unit, ui, interactive). Extensively test the focus in Chrome. Review URL: http://codereview.chromium.org/146093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19617 0039d316-1c4b-4281-b951-d872f2087c98
* Revert :nsylvain@chromium.org2009-06-221-5/+5
| | | | | | | | | | | | | | | | | | Changed by: jcampan@chromium.org Changed at: Fri 19 Jun 2009 21:22:47 Branch: src Revision: 18889 Comments: Relanding focus manager refactoring with build fix, see:http://codereview.chromium.org/125148BUG=NoneTEST=NoneTBR=ben Review URL: http://codereview.chromium.org/141013 Because it creates hundreds of new reliability crashes. TBR:jcampan Review URL: http://codereview.chromium.org/140064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18904 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding focus manager refactoring with build fix, ↵jcampan@chromium.org2009-06-201-5/+5
| | | | | | | | see:http://codereview.chromium.org/125148BUG=NoneTEST=NoneTBR=ben Review URL: http://codereview.chromium.org/141013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18889 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 18872.jcampan@chromium.org2009-06-191-5/+5
| | | | | | | | | | | | Broke the Windows build. BUG=None TEST=None TBR=ben Review URL: http://codereview.chromium.org/140023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18873 0039d316-1c4b-4281-b951-d872f2087c98
* Removed the last Windows specific part out of the focus manager. HWNDs are ↵jcampan@chromium.org2009-06-191-5/+5
| | | | | | | | not subclassed anymore.The FocusManager is now created and owned by top-level WidgetWins.BUG=NoneTEST=Run the unit tests, UI tests, interactive UI tests. Fully test the focus behavior in the browser: activate/deactivate the browser windows, make sure focus is remembered. Switch tabs, make sure focus is remembered for each tab. make sure accelerators work as expected. Test focus traversal in a web page, in the option dialog. Review URL: http://codereview.chromium.org/125148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18872 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the View cut/copy/paste tests for clipboard. The views delegate wasn't ↵ben@chromium.org2009-06-101-1/+42
| | | | | | | | | | attached so the textfield couldn't access the clipboard to write to it on copy. Create a mock views delegate for this test so that the textfield can get a clipboard. BUG=none TEST=duh. Review URL: http://codereview.chromium.org/118487 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18104 0039d316-1c4b-4281-b951-d872f2087c98
* this test was supposed to be disabledben@chromium.org2009-06-101-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18014 0039d316-1c4b-4281-b951-d872f2087c98
* Fix keyboard accelerator registration issue in views::View.yutak@chromium.org2009-06-061-1/+82
| | | | | | | | | | View should not register the same accelerator target multiple times. BUG=13275 TEST=None Review URL: http://codereview.chromium.org/118242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17810 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match ↵ben@chromium.org2009-05-291-2/+2
| | | | | | | | | | the NativeControl pattern established for NativeButtons. NativeViewHost is a platform-neutral class that clients instantiate. Behind the scenes the platform instantiates the appropriate NativeViewHostWrapper implementation, either NativeViewHostGtk (as before) or NativeViewHostWin (replaces HWNDView). BUG=none TEST=none Review URL: http://codereview.chromium.org/114059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17169 0039d316-1c4b-4281-b951-d872f2087c98
* Make Textfield more portable.ben@chromium.org2009-05-281-18/+18
| | | | | | | | | | | | | Split off Windows bits into NativeTextfieldWin class obscured behind NativeTextfieldWrapper interface. The APIs aren't perfectly tidy yet but this is a good first pass. BUG=none TEST=make sure you can still edit text fields, run the view unit tests. Review URL: http://codereview.chromium.org/113940 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17112 0039d316-1c4b-4281-b951-d872f2087c98
* Move text_field.cc and rename the class to Textfield in preparation for porting.ben@chromium.org2009-05-271-10/+10
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/115825 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17014 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeCanvas->gfx::Canvasben@chromium.org2009-05-151-4/+4
| | | | | | | | | | | Rename files too. TBR=brettw http://crbug.com/11387 Review URL: http://codereview.chromium.org/113443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16148 0039d316-1c4b-4281-b951-d872f2087c98
* A new DEPS file for views, designed to reduce dependencies. Removes some ↵ben@chromium.org2009-05-081-9/+7
| | | | | | | | | | unnecessary includes too. http://crbug.com/11387 Review URL: http://codereview.chromium.org/115114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15610 0039d316-1c4b-4281-b951-d872f2087c98
* Move src/chrome/views to src/views. RS=darin http://crbug.com/11387ben@chromium.org2009-05-081-0/+1009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15604 0039d316-1c4b-4281-b951-d872f2087c98