summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/cocoa_test_helper.h
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 14:20:54 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-11 14:20:54 +0000
commit06c7acaf1674b0b0fc91fe8f86144729fb7e9e57 (patch)
tree184c8dba6742fa38de2b91a08b47be971bea79b0 /chrome/browser/cocoa/cocoa_test_helper.h
parentfa6ebe2bd946c49c06039fcccbc3578117569931 (diff)
downloadchromium_src-06c7acaf1674b0b0fc91fe8f86144729fb7e9e57.zip
chromium_src-06c7acaf1674b0b0fc91fe8f86144729fb7e9e57.tar.gz
chromium_src-06c7acaf1674b0b0fc91fe8f86144729fb7e9e57.tar.bz2
Remove deprecated code in cocoa_test_helper.h.
BUG=none TEST=unit_tests Review URL: http://codereview.chromium.org/3129004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55720 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/cocoa_test_helper.h')
-rw-r--r--chrome/browser/cocoa/cocoa_test_helper.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/chrome/browser/cocoa/cocoa_test_helper.h b/chrome/browser/cocoa/cocoa_test_helper.h
index 70fe78e..dce544e 100644
--- a/chrome/browser/cocoa/cocoa_test_helper.h
+++ b/chrome/browser/cocoa/cocoa_test_helper.h
@@ -124,71 +124,6 @@ class CocoaTest : public PlatformTest {
[test_view display]; \
}
-// The classes below are deprecated and will be removed shortly. Do not write
-// any tests based on them.
-
-// A class that initializes Cocoa and sets up resources for many of our
-// Cocoa controller unit tests. It does several key things:
-// - Creates and displays an empty Cocoa window for views to live in
-// - Loads the appropriate bundle so nib loading works. When loading the
-// nib in the class being tested, your must use |mac_util::MainAppBundle()|
-// as the bundle. If you do not specify a bundle, your test will likely
-// fail.
-// It currently does not create an autorelease pool, though that can easily be
-// added. If your test wants one, it can derive from PlatformTest instead of
-// testing::Test.
-
-// Provides the Cocoa goodness without the extraneous window.
-
-// DEPRECATED
-// TODO(dmaclach): remove as soon as I can get my other CLs in that get rid
-// of any dependencies on this. 10/30/09 at the latest.
-class CocoaNoWindowTestHelper {
- public:
- CocoaNoWindowTestHelper() {
- CocoaTest::BootstrapCocoa();
-
- // Set the duration of AppKit-evaluated animations (such as frame changes)
- // to zero for testing purposes. That way they take effect immediately.
- [[NSAnimationContext currentContext] setDuration:0.0];
- }
-};
-
-// DEPRECATED
-// TODO(dmaclach): remove as soon as I can get my other CLs in that get rid
-// of any dependencies on this. 11/30/09 at the latest.
-class CocoaTestHelper : public CocoaNoWindowTestHelper {
- public:
- CocoaTestHelper() {
- window_.reset([[CocoaTestHelperWindow alloc] init]);
- if (DebugUtil::BeingDebugged()) {
- [window_ orderFront:nil];
- } else {
- [window_ orderBack:nil];
- }
- }
-
- // Access the Cocoa window created for the test.
- NSWindow* window() const { return window_.get(); }
- NSView* contentView() const { return [window_ contentView]; }
-
- // Set |window_| to pretend to be key and make |aView| its
- // firstResponder.
- void makeFirstResponder(NSView* aView) {
- [window_ makeFirstResponder:aView];
- [window_ setPretendIsKeyWindow:YES];
- }
-
- // Clear |window_| firstResponder and stop pretending to be key.
- void clearFirstResponder() {
- [window_ setPretendIsKeyWindow:NO];
- [window_ makeFirstResponder:nil];
- }
-
- private:
- scoped_nsobject<CocoaTestHelperWindow> window_;
-};
-
// A macro which determines the proper float epsilon for a CGFloat.
#if CGFLOAT_IS_DOUBLE
#define CGFLOAT_EPSILON DBL_EPSILON