From 4baf07d22b9104c1d4fdb3ef8dfe01d6f43b5a30 Mon Sep 17 00:00:00 2001 From: "shess@chromium.org" Date: Thu, 8 Oct 2009 00:29:31 +0000 Subject: Revert "[Mac] Window titles for Expose." Revert r28350 aka http://codereview.chromium.org/259023 Passed the trybots because of DCHECK which wasn't there for build bots. TBR=zork Review URL: http://codereview.chromium.org/271015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28356 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/cocoa/cocoa_test_helper.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'chrome/browser/cocoa/cocoa_test_helper.h') diff --git a/chrome/browser/cocoa/cocoa_test_helper.h b/chrome/browser/cocoa/cocoa_test_helper.h index 8eb3438..ebcb4d4 100644 --- a/chrome/browser/cocoa/cocoa_test_helper.h +++ b/chrome/browser/cocoa/cocoa_test_helper.h @@ -47,14 +47,9 @@ // added. If your test wants one, it can derive from PlatformTest instead of // testing::Test. -// Provides the Cocoa goodness without the extraneous window. -// TODO(shess): It might make more sense to have CocoaTest as a -// PlatformTest subclass which adds the Cocoa magic, then -// CocoaViewTest as a further subclass which provides a convenience -// window. -class CocoaNoWindowTestHelper { +class CocoaTestHelper { public: - CocoaNoWindowTestHelper() { + CocoaTestHelper() { // Look in the framework bundle for resources. FilePath path; PathService::Get(base::DIR_EXE, &path); @@ -67,21 +62,17 @@ class CocoaNoWindowTestHelper { // Bootstrap Cocoa. It's very unhappy without this. [NSApplication sharedApplication]; - // 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]; - } -}; - -class CocoaTestHelper : public CocoaNoWindowTestHelper { - public: - CocoaTestHelper() { + // Create a window. window_.reset([[CocoaTestHelperWindow alloc] init]); if (DebugUtil::BeingDebugged()) { [window_ orderFront:nil]; } else { [window_ orderBack:nil]; } + + // 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]; } // Access the Cocoa window created for the test. -- cgit v1.1