summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 23:47:58 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 23:47:58 +0000
commita37d302d78aa069b0349c7bb5973a928de7c17ea (patch)
tree97ca5076a532a92cc5897fdce4c53d79c940c9c2 /chrome/browser/cocoa/autocomplete_text_field_unittest.mm
parent60e7a80e9732e7df743b40f038b79291caa9ccdf (diff)
downloadchromium_src-a37d302d78aa069b0349c7bb5973a928de7c17ea.zip
chromium_src-a37d302d78aa069b0349c7bb5973a928de7c17ea.tar.gz
chromium_src-a37d302d78aa069b0349c7bb5973a928de7c17ea.tar.bz2
Linux: fix clicking on security or blocked contents of non-active window showing wrong data.
Change the location bar code on all platforms to not use BrowserList::GetLastActive. Makes GetTabContents part of the LocationBar interface. BUG=none TEST=open two windows that show security or blocked popups. click the icon in the non-focused one. Review URL: http://codereview.chromium.org/573038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/autocomplete_text_field_unittest.mm')
-rw-r--r--chrome/browser/cocoa/autocomplete_text_field_unittest.mm12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/autocomplete_text_field_unittest.mm b/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
index 8b3c00b..4adfa6a 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_unittest.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -22,8 +22,10 @@ using ::testing::StrictMock;
namespace {
class MockSecurityImageView : public LocationBarViewMac::SecurityImageView {
public:
- MockSecurityImageView(Profile* profile, ToolbarModel* model)
- : LocationBarViewMac::SecurityImageView(profile, model) {}
+ MockSecurityImageView(LocationBarViewMac* owner,
+ Profile* profile,
+ ToolbarModel* model)
+ : LocationBarViewMac::SecurityImageView(owner, profile, model) {}
MOCK_METHOD0(OnMousePressed, bool());
};
@@ -573,7 +575,7 @@ TEST_F(AutocompleteTextFieldTest, TripleClickSelectsAll) {
TEST_F(AutocompleteTextFieldObserverTest, SecurityIconMouseDown) {
AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell];
- MockSecurityImageView security_image_view(NULL, NULL);
+ MockSecurityImageView security_image_view(NULL, NULL, NULL);
[cell setSecurityImageView:&security_image_view];
security_image_view.SetImageShown(
LocationBarViewMac::SecurityImageView::LOCK);
@@ -591,7 +593,7 @@ TEST_F(AutocompleteTextFieldObserverTest, SecurityIconMouseDown) {
TEST_F(AutocompleteTextFieldObserverTest, PageActionMouseDown) {
AutocompleteTextFieldCell* cell = [field_ autocompleteTextFieldCell];
- MockSecurityImageView security_image_view(NULL, NULL);
+ MockSecurityImageView security_image_view(NULL, NULL, NULL);
security_image_view.SetImageShown(
LocationBarViewMac::SecurityImageView::LOCK);
[cell setSecurityImageView:&security_image_view];