diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 14:42:13 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 14:42:13 +0000 |
commit | b1bf13e8638c4c2505b8169ee56c0552d957ff7b (patch) | |
tree | f937b1e5866fbaa20df122b815763c5d26c71f9f | |
parent | df98d99d699935ba059e2cd554559f2a58a9c57d (diff) | |
download | chromium_src-b1bf13e8638c4c2505b8169ee56c0552d957ff7b.zip chromium_src-b1bf13e8638c4c2505b8169ee56c0552d957ff7b.tar.gz chromium_src-b1bf13e8638c4c2505b8169ee56c0552d957ff7b.tar.bz2 |
Allow unit_tests (and other non-bundle executables) to rely on objectiveC that's
not directly referenced (such as only in a nib file). Add test for tab
controller.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13838 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/common.gypi | 6 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_controller.h | 2 | ||||
-rw-r--r-- | chrome/browser/cocoa/tab_controller.mm | 3 | ||||
-rw-r--r-- | chrome/chrome.gyp | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/build/common.gypi b/build/common.gypi index 6a67a24..087c964 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -293,10 +293,8 @@ }, 'target_conditions': [ ['_type!="static_library"', { - 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, - }], - ['_mac_bundle', { - 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first', + '-Wl,-ObjC']}, }], ['_type=="executable"', { 'postbuilds': [ diff --git a/chrome/browser/cocoa/tab_controller.h b/chrome/browser/cocoa/tab_controller.h index 82f3bb5..45d93ab 100644 --- a/chrome/browser/cocoa/tab_controller.h +++ b/chrome/browser/cocoa/tab_controller.h @@ -23,7 +23,7 @@ BOOL loading_; NSImage *image_; id<TabControllerTarget> target_; // weak, where actions are sent - SEL action_; // selector sent when tab is seleted by clicking + SEL action_; // selector sent when tab is selected by clicking } @property(retain, nonatomic) NSImage *image; diff --git a/chrome/browser/cocoa/tab_controller.mm b/chrome/browser/cocoa/tab_controller.mm index 09eb5c6..e54931e 100644 --- a/chrome/browser/cocoa/tab_controller.mm +++ b/chrome/browser/cocoa/tab_controller.mm @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#import "base/mac_util.h" #import "chrome/browser/cocoa/tab_controller.h" #import "chrome/browser/cocoa/tab_controller_target.h" @@ -20,7 +21,7 @@ } - (id)init { - self = [super initWithNibName:@"TabView" bundle:nil]; + self = [super initWithNibName:@"TabView" bundle:mac_util::MainAppBundle()]; if (self != nil) { [self setImage:[NSImage imageNamed:@"nav"]]; } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 4f20c80..a7e64d1 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2091,7 +2091,6 @@ '..', ], 'sources': [ - '../third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.m', 'app/breakpad_mac.mm', # All unittests in browser, common, and renderer. 'browser/autocomplete/autocomplete_unittest.cc', @@ -2121,6 +2120,7 @@ 'browser/cocoa/command_observer_bridge_unittest.mm', 'browser/cocoa/location_bar_view_mac_unittest.mm', 'browser/cocoa/status_bubble_mac_unittest.mm', + 'browser/cocoa/tab_controller_unittest.mm', 'browser/command_updater_unittest.cc', 'browser/debugger/devtools_manager_unittest.cc', 'browser/dom_ui/dom_ui_unittest.cc', |