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

Issue 327010: Basic test class that is going to replace CocoaTestHelper and CocoaNoWindowTe... (Closed)

Created:
11 years, 2 months ago by dmac
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Basic test class that is going to replace CocoaTestHelper and CocoaNoWindowTestHelper. Is responsible for bootstrapping cocoa and verifying that all windows are closed down correctly between tests. Also includes a macro for doing some very repetitive view testing that we had multiple copies of. I included a single changed over test so that you can see the difference. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29928

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 10

Patch Set 6 : '' #

Total comments: 6

Patch Set 7 : '' #

Total comments: 3

Patch Set 8 : '' #

Patch Set 9 : '' #

Total comments: 8

Patch Set 10 : '' #

Total comments: 4

Patch Set 11 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -30 lines) Patch
M chrome/browser/cocoa/cocoa_test_helper.h View 1 2 3 4 5 6 7 8 9 6 chunks +93 lines, -7 lines 0 comments Download
MM chrome/browser/cocoa/cocoa_test_helper.mm View 1 2 3 4 5 6 7 8 9 10 3 chunks +128 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/sad_tab_view_unittest.mm View 2 3 4 5 6 7 8 9 1 chunk +8 lines, -23 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
dmac
Here's the initial testing base class to look at. I've got all the tests working ...
11 years, 2 months ago (2009-10-23 06:42:51 UTC) #1
Mark Mentovai
I think this is generally an improvement. http://codereview.chromium.org/327010/diff/8001/8002 File chrome/browser/cocoa/cocoa_test_helper.h (right): http://codereview.chromium.org/327010/diff/8001/8002#newcode70 Line 70: virtual ...
11 years, 2 months ago (2009-10-23 14:10:53 UTC) #2
dmac
On 2009/10/23 14:10:53, Mark Mentovai wrote: > I think this is generally an improvement. > ...
11 years, 2 months ago (2009-10-23 15:00:38 UTC) #3
pink (ping after 24hrs)
overall LGTM with some nits. http://codereview.chromium.org/327010/diff/9001/10001 File chrome/browser/cocoa/cocoa_test_helper.h (right): http://codereview.chromium.org/327010/diff/9001/10001#newcode87 Line 87: CocoaTestHelperWindow* test_window_; is ...
11 years, 2 months ago (2009-10-23 16:01:38 UTC) #4
dmac
On 2009/10/23 16:01:38, pink wrote: > overall LGTM with some nits. > > http://codereview.chromium.org/327010/diff/9001/10001 > ...
11 years, 2 months ago (2009-10-23 16:16:41 UTC) #5
Scott Hess - ex-Googler
On 2009/10/23 15:00:38, dmac wrote: > On 2009/10/23 14:10:53, Mark Mentovai wrote: > > I ...
11 years, 2 months ago (2009-10-23 16:50:47 UTC) #6
Scott Hess - ex-Googler
One general comment - my similar CL separated "initialize Cocoa and make sure we don't ...
11 years, 2 months ago (2009-10-23 16:53:32 UTC) #7
Scott Hess - ex-Googler
Also PLUS ONE MILLION FOR PEDANTIC TESTING! On Fri, Oct 23, 2009 at 9:53 AM, ...
11 years, 2 months ago (2009-10-23 16:54:56 UTC) #8
dmac
On 2009/10/23 16:50:47, shess wrote: > On 2009/10/23 15:00:38, dmac wrote: > > On 2009/10/23 ...
11 years, 2 months ago (2009-10-23 17:09:24 UTC) #9
dmac
On 2009/10/23 16:53:32, shess wrote: > One general comment - my similar CL separated "initialize ...
11 years, 2 months ago (2009-10-23 17:22:12 UTC) #10
Scott Hess - ex-Googler
On 2009/10/23 17:09:24, dmac wrote: > On 2009/10/23 16:50:47, shess wrote: > They actually aren't ...
11 years, 2 months ago (2009-10-23 17:23:05 UTC) #11
dmac
On 2009/10/23 17:23:05, shess wrote: > On 2009/10/23 17:09:24, dmac wrote: > > On 2009/10/23 ...
11 years, 2 months ago (2009-10-23 17:31:44 UTC) #12
dmac
Pink gave me a conditional LGTM. Is everybody happy with this? I would like to ...
11 years, 2 months ago (2009-10-23 17:51:06 UTC) #13
Mark Mentovai
http://www.nvbdi.org/images/approved_rubber_stamp.jpg
11 years, 2 months ago (2009-10-23 17:57:21 UTC) #14
Scott Hess - ex-Googler
LGTM, minor nits. The vector<>* thing feels wrong, though, unless there's a reason. http://codereview.chromium.org/327010/diff/6010/11009 File ...
11 years, 2 months ago (2009-10-23 18:43:49 UTC) #15
dmac
http://codereview.chromium.org/327010/diff/6010/11009 File chrome/browser/cocoa/cocoa_test_helper.mm (right): http://codereview.chromium.org/327010/diff/6010/11009#newcode76 Line 76: [test_window_ close]; On 2009/10/23 18:43:49, shess wrote: > ...
11 years, 2 months ago (2009-10-23 19:04:07 UTC) #16
Scott Hess - ex-Googler
Sticky LGTM, even w/out my suggestions. http://codereview.chromium.org/327010/diff/7005/1007 File chrome/browser/cocoa/cocoa_test_helper.mm (right): http://codereview.chromium.org/327010/diff/7005/1007#newcode91 Line 91: std::vector<NSWindow*> windows_left; ...
11 years, 2 months ago (2009-10-23 19:19:48 UTC) #17
dmac
11 years, 2 months ago (2009-10-23 19:35:21 UTC) #18
http://codereview.chromium.org/327010/diff/7005/1007
File chrome/browser/cocoa/cocoa_test_helper.mm (right):

http://codereview.chromium.org/327010/diff/7005/1007#newcode91
Line 91: std::vector<NSWindow*> windows_left;
On 2009/10/23 19:19:48, shess wrote:
> I really hate that I'm doing this, because I really want this checked in, but
> ...
> 
> windows_left should be windowsLeft, or startDate should be start_date, or the
> local variables should otherwise be consistently named.

Good catch. Fixed throughout. Also it pointed out to me the spare windows_left
that hadn't been removed when I moved it into the loop.

http://codereview.chromium.org/327010/diff/7005/1007#newcode95
Line 95: while (loop) {
On 2009/10/23 19:19:48, shess wrote:
> And as long as I brought one thing up, could this now just be:
>   while (ApplicationWindows().size() > 0)
> or even just:
>   while (1)
> ???

I did this intentionally so that we wouldn't hit the event loop if there were no
windows to close. I didn't want anything that may happen in the event loop to
affect the test state. Also I separated it out so that people were aware that I
wasn't depending on windowsWaiting to change, that the only way out of the loop
was through the two breaks below.

I did however change it from BOOL to bool.

Powered by Google App Engine
This is Rietveld 408576698