diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:01 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 21:53:01 +0000 |
commit | aaa47ee9d83f773d37aa4fd4a04097425ce62063 (patch) | |
tree | 9250680ad28ed8c31fdb967b702e2b638bd80347 /chrome/browser/cocoa | |
parent | 0d6bb06531d9b7d68e6d78b79b4ec29e68a059cb (diff) | |
download | chromium_src-aaa47ee9d83f773d37aa4fd4a04097425ce62063.zip chromium_src-aaa47ee9d83f773d37aa4fd4a04097425ce62063.tar.gz chromium_src-aaa47ee9d83f773d37aa4fd4a04097425ce62063.tar.bz2 |
Cleans up our autorelease pool handling by making sure that an autorelease pool isn't created while the app is handling an event sent via -[NSApp sendEvent].
Branches browser/chrome_application_mac into browser/chrome_browser_application and base/chrome_application. Renderers will run as chrome_applications, and browsers will run as chrome_browser_applications.
BUG=26418, 25462, 25463, 25465
TEST=1) See bug 25857. 2) Start up. Open 3+ windows. 3)Quit. See bugs for other repro cases.
Review URL: http://codereview.chromium.org/345051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r-- | chrome/browser/cocoa/cocoa_test_helper.h | 12 | ||||
-rw-r--r-- | chrome/browser/cocoa/cocoa_test_helper.mm | 3 |
2 files changed, 5 insertions, 10 deletions
diff --git a/chrome/browser/cocoa/cocoa_test_helper.h b/chrome/browser/cocoa/cocoa_test_helper.h index 5b05505..5f51c54 100644 --- a/chrome/browser/cocoa/cocoa_test_helper.h +++ b/chrome/browser/cocoa/cocoa_test_helper.h @@ -8,6 +8,7 @@ #import <Cocoa/Cocoa.h> #include <vector> +#import "base/chrome_application_mac.h" #include "base/debug_util.h" #include "base/file_path.h" #include "base/mac_util.h" @@ -138,14 +139,7 @@ class CocoaTest : public PlatformTest { class CocoaNoWindowTestHelper { public: CocoaNoWindowTestHelper() { - // Look in the framework bundle for resources. - FilePath path; - PathService::Get(base::DIR_EXE, &path); - path = path.Append(chrome::kFrameworkName); - mac_util::SetOverrideAppBundlePath(path); - - // Bootstrap Cocoa. It's very unhappy without this. - [NSApplication sharedApplication]; + CocoaTest::BootstrapCocoa(); // Set the duration of AppKit-evaluated animations (such as frame changes) // to zero for testing purposes. That way they take effect immediately. @@ -155,7 +149,7 @@ class CocoaNoWindowTestHelper { // 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. +// of any dependencies on this. 11/30/09 at the latest. class CocoaTestHelper : public CocoaNoWindowTestHelper { public: CocoaTestHelper() { diff --git a/chrome/browser/cocoa/cocoa_test_helper.mm b/chrome/browser/cocoa/cocoa_test_helper.mm index 462b10a..17bba55 100644 --- a/chrome/browser/cocoa/cocoa_test_helper.mm +++ b/chrome/browser/cocoa/cocoa_test_helper.mm @@ -3,6 +3,7 @@ // found in the LICENSE file. #import "chrome/browser/cocoa/cocoa_test_helper.h" +#import "chrome/browser/chrome_browser_application_mac.h" #import "base/logging.h" @implementation CocoaTestHelperWindow @@ -68,7 +69,7 @@ void CocoaTest::BootstrapCocoa() { mac_util::SetOverrideAppBundlePath(path); // Bootstrap Cocoa. It's very unhappy without this. - [NSApplication sharedApplication]; + [CrApplication sharedApplication]; } void CocoaTest::TearDown() { |