Commit 317c6415 authored by shess@chromium.org's avatar shess@chromium.org

Setup TestShellPlatformDelegate before MessageLoop.

MessagePumpMac wants NSApp to be initialized before the UI MessageLoop
is created.

BUG=102224


Review URL: http://codereview.chromium.org/8844001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113437 0039d316-1c4b-4281-b951-d872f2087c98
parent 020d047e
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -44,8 +44,8 @@ class TestShellTestSuite : public base::TestSuite { ...@@ -44,8 +44,8 @@ class TestShellTestSuite : public base::TestSuite {
public: public:
TestShellTestSuite(int argc, char** argv) TestShellTestSuite(int argc, char** argv)
: base::TestSuite(argc, argv), : base::TestSuite(argc, argv),
test_shell_webkit_init_(true), platform_delegate_(*CommandLine::ForCurrentProcess()),
platform_delegate_(*CommandLine::ForCurrentProcess()) { test_shell_webkit_init_(true) {
} }
virtual void Initialize() { virtual void Initialize() {
...@@ -93,6 +93,8 @@ class TestShellTestSuite : public base::TestSuite { ...@@ -93,6 +93,8 @@ class TestShellTestSuite : public base::TestSuite {
} }
private: private:
TestShellPlatformDelegate platform_delegate_;
// Allocate a message loop for this thread. Although it is not used // Allocate a message loop for this thread. Although it is not used
// directly, its constructor sets up some necessary state. // directly, its constructor sets up some necessary state.
MessageLoopForUI main_message_loop_; MessageLoopForUI main_message_loop_;
...@@ -100,8 +102,6 @@ class TestShellTestSuite : public base::TestSuite { ...@@ -100,8 +102,6 @@ class TestShellTestSuite : public base::TestSuite {
// Initialize WebKit for this scope. // Initialize WebKit for this scope.
TestShellWebKitInit test_shell_webkit_init_; TestShellWebKitInit test_shell_webkit_init_;
TestShellPlatformDelegate platform_delegate_;
DISALLOW_COPY_AND_ASSIGN(TestShellTestSuite); DISALLOW_COPY_AND_ASSIGN(TestShellTestSuite);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment