diff options
author | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 16:39:36 +0000 |
---|---|---|
committer | kkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-30 16:39:36 +0000 |
commit | 0979c1246e35258d437795962e40871e1b2d044c (patch) | |
tree | 49ed26cfc839b2747d2340ab803ab80268eb7dbb | |
parent | b7a3612e580b04b6b0d40291565cd834dc16242e (diff) | |
download | chromium_src-0979c1246e35258d437795962e40871e1b2d044c.zip chromium_src-0979c1246e35258d437795962e40871e1b2d044c.tar.gz chromium_src-0979c1246e35258d437795962e40871e1b2d044c.tar.bz2 |
[Mac] Small change to get the BrowserActionApiTest.IncognitoDragging test running.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1810008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46074 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/extensions/browser_actions_controller.mm | 12 | ||||
-rw-r--r-- | chrome/browser/extensions/browser_action_apitest.cc | 5 |
2 files changed, 5 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/extensions/browser_actions_controller.mm b/chrome/browser/cocoa/extensions/browser_actions_controller.mm index d6582c3..8d9afcc 100644 --- a/chrome/browser/cocoa/extensions/browser_actions_controller.mm +++ b/chrome/browser/cocoa/extensions/browser_actions_controller.mm @@ -816,13 +816,11 @@ class ExtensionsServiceObserverBridge : public NotificationObserver, #pragma mark Testing Methods - (NSButton*)buttonWithIndex:(NSUInteger)index { - NSUInteger i = 0; - for (ExtensionList::iterator iter = toolbarModel_->begin(); - iter != toolbarModel_->end(); ++iter) { - if (i == index) - return [buttons_ objectForKey:base::SysUTF8ToNSString((*iter)->id())]; - - ++i; + if (profile_->IsOffTheRecord()) + index = toolbarModel_->IncognitoIndexToOriginal(index); + if (index < toolbarModel_->size()) { + Extension* extension = toolbarModel_->GetExtensionByIndex(index); + return [buttons_ objectForKey:base::SysUTF8ToNSString(extension->id())]; } return nil; } diff --git a/chrome/browser/extensions/browser_action_apitest.cc b/chrome/browser/extensions/browser_action_apitest.cc index dbdf6c9..7bae10d 100644 --- a/chrome/browser/extensions/browser_action_apitest.cc +++ b/chrome/browser/extensions/browser_action_apitest.cc @@ -306,12 +306,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, MAYBE_IncognitoBasic) { // incognito. } -// TODO(mpcomplete): enable this when Mac gets dragging support. -#if defined(OS_MACOSX) -IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, DISABLED_IncognitoDragging) { -#else IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, IncognitoDragging) { -#endif ExtensionsService* service = browser()->profile()->GetExtensionsService(); // The tooltips for each respective browser action. |