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

Issue 219003: [Mac] Rewrite Omnibox field-editor frame-changing tests. (Closed)

Created:
11 years, 3 months ago by Scott Hess - ex-Googler
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

[Mac] Rewrite Omnibox field-editor frame-changing tests. The previous tests mostly replicated autocomplete_text_field_cell_unittest.mm cases. Reworked them to test that the field editor placement is the same whether -resetFieldEditorFrameIfNeeded is doing the placement, or the regular Cocoa focusing machinery. That's more relevant to what that method is doing.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -56 lines) Patch
M chrome/browser/cocoa/autocomplete_text_field_unittest.mm View 3 chunks +115 lines, -56 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
Scott Hess - ex-Googler
This is preliminary to landing a change to do the editor reset by other means ...
11 years, 3 months ago (2009-09-23 01:23:36 UTC) #1
Scott Hess - ex-Googler
On 2009/09/23 01:23:36, shess wrote: > This is preliminary to landing a change to do ...
11 years, 3 months ago (2009-09-23 21:44:35 UTC) #2
rohitrao (ping after 24h)
Yup, I started looking, but then I got distracted by perf. I'll take another look ...
11 years, 3 months ago (2009-09-23 21:46:52 UTC) #3
rohitrao (ping after 24h)
LGTM http://codereview.chromium.org/219003/diff/1/2 File chrome/browser/cocoa/autocomplete_text_field_unittest.mm (right): http://codereview.chromium.org/219003/diff/1/2#newcode70 Line 70: EXPECT_TRUE([field_.get() currentEditor]); I want this to be ...
11 years, 3 months ago (2009-09-23 22:05:35 UTC) #4
Scott Hess - ex-Googler
11 years, 3 months ago (2009-09-23 23:06:25 UTC) #5
thanks!

http://codereview.chromium.org/219003/diff/1/2
File chrome/browser/cocoa/autocomplete_text_field_unittest.mm (right):

http://codereview.chromium.org/219003/diff/1/2#newcode70
Line 70: EXPECT_TRUE([field_.get() currentEditor]);
On 2009/09/23 22:05:35, rohitrao wrote:
> I want this to be an ASSERT_TRUE, but I have a feeling that won't do what I
> want, since this is all inside a function.

Yes, ASSERT_TRUE won't work (it's more relevant for the -count check, because
accessing the first object throws an exception).  I tried working around that,
but it wasn't reasonable.  Making the function return void allows ASSERT_TRUE(),
but makes the helper function useless.  Putting the ASSERT higher up likewise
reduces the utility.

Now that I go look, I find that -lastObject will return the last object in the
array, or nil if empty.  That might have had potential, but I'm not sure what
[nil frame] would return ...

Powered by Google App Engine
This is Rietveld 408576698