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

Issue 7706027: Addition testing for panels drag and drop. (Closed)

Created:
9 years, 4 months ago by prasadt
Modified:
9 years, 4 months ago
Reviewers:
jennb, jianli
CC:
chromium-reviews, jianli, Dmitry Titov, dcheng, Paweł Hajdan Jr.
Visibility:
Public.

Description

Addition testing for panels drag and drop. - Added testing for drag and drop involving multiple panels. - Refactored the code to make it clear what's being tested. - Refactored to simplify the test code so we don't worry about bugs in test code. Comes with some loss of compactness but is the right trade-off for test code. TEST=none BUG=none modified: chrome/browser/ui/panels/panel_browsertest.cc modified: chrome/browser/ui/panels/panel_manager.cc modified: chrome/browser/ui/panels/panel_manager.h Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98314

Patch Set 1 #

Total comments: 31

Patch Set 2 : Code review feedback. #

Patch Set 3 : Code review feedback. #

Patch Set 4 : Removed comment markers and used scoping and indentation for delimiting. #

Total comments: 4

Patch Set 5 : Fix windows test failures. #

Total comments: 53

Patch Set 6 : Code review feedback. Mostly cosmetic. #

Total comments: 8

Patch Set 7 : More code review feedback. #

Total comments: 6

Patch Set 8 : Code review feedback. Fix windows failure. #

Patch Set 9 : For testing on windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+406 lines, -135 lines) Patch
M chrome/browser/ui/panels/panel_browser_view.cc View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/panels/panel_browsertest.cc View 1 2 3 4 5 6 7 8 5 chunks +385 lines, -126 lines 0 comments Download
M chrome/browser/ui/panels/panel_manager.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/ui/panels/panel_manager.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
prasadt
9 years, 4 months ago (2011-08-23 04:17:01 UTC) #1
jennb
Drive by... http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode174 chrome/browser/ui/panels/panel_browsertest.cc:174: panels[i]->Close(); Is it safe to modify the ...
9 years, 4 months ago (2011-08-23 17:14:16 UTC) #2
jianli
Some initial comments. More coming later. http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode30 chrome/browser/ui/panels/panel_browsertest.cc:30: using base::PlatformThread; Why ...
9 years, 4 months ago (2011-08-23 17:27:12 UTC) #3
prasadt
Thanks for all the feedback. http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode30 chrome/browser/ui/panels/panel_browsertest.cc:30: using base::PlatformThread; On 2011/08/23 ...
9 years, 4 months ago (2011-08-23 18:05:10 UTC) #4
jennb
http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode174 chrome/browser/ui/panels/panel_browsertest.cc:174: panels[i]->Close(); On 2011/08/23 18:05:10, prasadt wrote: > On 2011/08/23 ...
9 years, 4 months ago (2011-08-23 18:09:31 UTC) #5
jianli
One general comment: is it possible to test for 1, 2, 3 and 4 panels ...
9 years, 4 months ago (2011-08-23 18:12:52 UTC) #6
prasadt
On 2011/08/23 18:12:52, jianli wrote: > One general comment: is it possible to test for ...
9 years, 4 months ago (2011-08-23 18:26:12 UTC) #7
prasadt
http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode174 chrome/browser/ui/panels/panel_browsertest.cc:174: panels[i]->Close(); On 2011/08/23 18:09:31, jennb wrote: > On 2011/08/23 ...
9 years, 4 months ago (2011-08-23 18:26:25 UTC) #8
prasadt
http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/1/chrome/browser/ui/panels/panel_browsertest.cc#newcode318 chrome/browser/ui/panels/panel_browsertest.cc:318: // **** Tests with a single panel. On 2011/08/23 ...
9 years, 4 months ago (2011-08-23 20:15:10 UTC) #9
jennb
LGTM pending Jian's review. http://codereview.chromium.org/7706027/diff/8002/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/8002/chrome/browser/ui/panels/panel_browsertest.cc#newcode166 chrome/browser/ui/panels/panel_browsertest.cc:166: std::vector<Panel*> panels = PanelManager::GetInstance()->panels_; Add ...
9 years, 4 months ago (2011-08-23 21:26:48 UTC) #10
prasadt
http://codereview.chromium.org/7706027/diff/8002/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/8002/chrome/browser/ui/panels/panel_browsertest.cc#newcode166 chrome/browser/ui/panels/panel_browsertest.cc:166: std::vector<Panel*> panels = PanelManager::GetInstance()->panels_; On 2011/08/23 21:26:48, jennb wrote: ...
9 years, 4 months ago (2011-08-23 21:39:29 UTC) #11
prasadt
Jian - Please look at the changes I uploaded to fix the windows failures. Tests ...
9 years, 4 months ago (2011-08-24 04:37:35 UTC) #12
jianli
Another test case to consider for 2 panels: Drag 1 panel either left or right ...
9 years, 4 months ago (2011-08-24 20:23:24 UTC) #13
prasadt
Jian - I addressed/answered all your comments. As for the additional test you suggested, I ...
9 years, 4 months ago (2011-08-24 21:29:17 UTC) #14
jianli
http://codereview.chromium.org/7706027/diff/7004/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/7004/chrome/browser/ui/panels/panel_browsertest.cc#newcode206 chrome/browser/ui/panels/panel_browsertest.cc:206: std::vector<gfx::Rect> initial_bounds, On 2011/08/24 21:29:17, prasadt wrote: > On ...
9 years, 4 months ago (2011-08-24 22:04:02 UTC) #15
prasadt
Jian - Please take another look. http://codereview.chromium.org/7706027/diff/7004/chrome/browser/ui/panels/panel_browsertest.cc File chrome/browser/ui/panels/panel_browsertest.cc (right): http://codereview.chromium.org/7706027/diff/7004/chrome/browser/ui/panels/panel_browsertest.cc#newcode206 chrome/browser/ui/panels/panel_browsertest.cc:206: std::vector<gfx::Rect> initial_bounds, On ...
9 years, 4 months ago (2011-08-24 23:04:30 UTC) #16
jianli
LGTM. Just a few small issues. Please check win trybot result to make sure it ...
9 years, 4 months ago (2011-08-25 17:22:26 UTC) #17
prasadt
9 years, 4 months ago (2011-08-25 18:10:30 UTC) #18
Address issues and fixed the windows test failures.

PanelManager::RemoveAll is modifying the vector while iterating over it which is
causing a crash on windows.  Fixed it and verified the fix on windows. 
Committing the change.

http://codereview.chromium.org/7706027/diff/19001/chrome/browser/ui/panels/pa...
File chrome/browser/ui/panels/panel_browsertest.cc (right):

http://codereview.chromium.org/7706027/diff/19001/chrome/browser/ui/panels/pa...
chrome/browser/ui/panels/panel_browsertest.cc:210: }
On 2011/08/25 17:22:26, jianli wrote:
> Please add an empty line.

Done.

http://codereview.chromium.org/7706027/diff/19001/chrome/browser/ui/panels/pa...
File chrome/browser/ui/panels/panel_manager.h (right):

http://codereview.chromium.org/7706027/diff/19001/chrome/browser/ui/panels/pa...
chrome/browser/ui/panels/panel_manager.h:59: const Panels& panels() { return
panels_; }
On 2011/08/25 17:22:26, jianli wrote:
> Please append const modifier.

Done.

http://codereview.chromium.org/7706027/diff/19001/chrome/browser/ui/panels/pa...
chrome/browser/ui/panels/panel_manager.h:92: // Horizontal spacing between
panels.  Used for unit testing.
On 2011/08/25 17:22:26, jianli wrote:
> Please remove this comment.

Done.

Powered by Google App Engine
This is Rietveld 408576698