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

Issue 6993030: Move GeolocationPermissionContextUnittest from subclassing TabContentsWrapper to merely observing... (Closed)

Created:
9 years, 6 months ago by Peter Kasting
Modified:
9 years, 6 months ago
Reviewers:
bulach
CC:
chromium-reviews, Avi (use Gerrit), Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Move GeolocationPermissionContextUnittest from subclassing TabContentsWrapper to merely observing infobar removal notifications. (The existing comment about TestTabContents was made obsolete by r85835.) Keeping a set of closed delegates instead of tracking the last closed delegate for each tab seems slightly clearer. Also, back when I first wrote this code in http://codereview.chromium.org/4767001/ , I was convinced it was necessary to the infobar refactor, although I can no longer recall why! This also eliminates TestTabContentsWrapper::SetContentsWrapper(). BUG=62154 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88360

Patch Set 1 #

Total comments: 7

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -67 lines) Patch
M chrome/browser/geolocation/geolocation_permission_context_unittest.cc View 1 15 chunks +67 lines, -60 lines 0 comments Download
M chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/tab_contents/test_tab_contents_wrapper.cc View 2 chunks +1 line, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Peter Kasting
Marcus, you already reviewed these changes once as part of http://codereview.chromium.org/4767001/ ; this set is ...
9 years, 6 months ago (2011-06-03 18:58:43 UTC) #1
bulach
LGTM thanks, Peter! a few nits, and there's one potential issue with the set (sorry ...
9 years, 6 months ago (2011-06-03 19:15:05 UTC) #2
Peter Kasting
New snap up. http://codereview.chromium.org/6993030/diff/1/chrome/browser/geolocation/geolocation_permission_context_unittest.cc File chrome/browser/geolocation/geolocation_permission_context_unittest.cc (right): http://codereview.chromium.org/6993030/diff/1/chrome/browser/geolocation/geolocation_permission_context_unittest.cc#newcode125 chrome/browser/geolocation/geolocation_permission_context_unittest.cc:125: : TabContentsWrapperTestHarness(), On 2011/06/03 19:15:05, bulach ...
9 years, 6 months ago (2011-06-03 20:37:36 UTC) #3
Peter Kasting
Ping
9 years, 6 months ago (2011-06-07 18:29:09 UTC) #4
bulach
On 2011/06/07 18:29:09, Peter Kasting wrote: > Ping LGTM (sorry for the delay, I had ...
9 years, 6 months ago (2011-06-07 18:42:02 UTC) #5
Peter Kasting
On 2011/06/07 18:42:02, bulach wrote: > On 2011/06/07 18:29:09, Peter Kasting wrote: > > Ping ...
9 years, 6 months ago (2011-06-07 18:47:44 UTC) #6
bulach
9 years, 6 months ago (2011-06-08 14:23:03 UTC) #7
LGTM still

http://codereview.chromium.org/6993030/diff/1/chrome/browser/geolocation/geol...
File chrome/browser/geolocation/geolocation_permission_context_unittest.cc
(right):

http://codereview.chromium.org/6993030/diff/1/chrome/browser/geolocation/geol...
chrome/browser/geolocation/geolocation_permission_context_unittest.cc:379:
EXPECT_EQ(2U, closed_delegate_tracker_->size());
On 2011/06/03 20:37:36, Peter Kasting wrote:
> On 2011/06/03 19:15:05, bulach wrote:
> > this may fail: infobar_0 may just get the same address as removed_infobar,
and
> > the set will contain a single entry.
> 
> I don't see how that's possible; the two infobars are showing simultaneously,
so
> they can't be the same object.

sorry again for the lack of response, I was happy with your explanation :) 
I mistakenly thought that the the infobars would be created sequentially (which
could potentially break the set size) rather than simultaneously (which is safe
as the addresses are never reused).

Powered by Google App Engine
This is Rietveld 408576698