Skip to content

Commit

Permalink
Get rid of TestAuraInitializer.
Browse files Browse the repository at this point in the history
This is a followup to crrev.com/238564 where we reused ui_test_pak in
aura_test_support. We remove TestAuraInitializer and
just merge the code into ContentTestSuite, that seems to be the most
suitable approach.

BUG=None
TEST=content_unittests,ash_unittests
R=ben@chromium.org,tony@chromium.org

Review URL: https://codereview.chromium.org/109093002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240011 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tfarina@chromium.org committed Dec 11, 2013
1 parent 5482ef9 commit 5b3e88a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 75 deletions.
1 change: 1 addition & 0 deletions content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
'dependencies': [
'../ui/aura/aura.gyp:aura_test_support',
'../ui/compositor/compositor.gyp:compositor',
'../ui/resources/ui_resources.gyp:ui_test_pak',
],
}],
['OS=="win"', {
Expand Down
4 changes: 2 additions & 2 deletions content/test/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include_rules = [
"+content",
"+media/audio", # For AudioParameters in WebRTC tests.
"+media/base", # For ChannelLayout in WebRTC tests.
"+ui/aura/test/test_aura_initializer.h",
"+ui/base/resource/data_pack.h",
"+third_party/WebKit/public/testing",
"+ui/base/resource/data_pack.h",
"+ui/base/resource/resource_bundle.h",
"!v8/include/v8.h",
]
15 changes: 10 additions & 5 deletions content/test/content_test_suite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

#include "content/test/content_test_suite.h"

#include "base/base_paths.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "content/public/test/test_content_client_initializer.h"
#include "content/test/test_content_client.h"
#include "testing/gtest/include/gtest/gtest.h"

#if defined(USE_AURA)
#include "ui/aura/test/test_aura_initializer.h"
#endif
#include "ui/base/resource/resource_bundle.h"

#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
Expand Down Expand Up @@ -46,11 +45,17 @@ namespace content {
ContentTestSuite::ContentTestSuite(int argc, char** argv)
: ContentTestSuiteBase(argc, argv) {
#if defined(USE_AURA)
aura_initializer_.reset(new aura::test::TestAuraInitializer);
base::FilePath pak_file;
PathService::Get(base::DIR_MODULE, &pak_file);
pak_file = pak_file.AppendASCII("ui_test.pak");
ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
#endif
}

ContentTestSuite::~ContentTestSuite() {
#if defined(USE_AURA)
ui::ResourceBundle::CleanupSharedInstance();
#endif
}

void ContentTestSuite::Initialize() {
Expand Down
12 changes: 0 additions & 12 deletions content/test/content_test_suite.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
#include "base/win/scoped_com_initializer.h"
#endif

#if defined(USE_AURA)
namespace aura {
namespace test {
class TestAuraInitializer;
} // namespace test
} // namespace aura
#endif

namespace content {

class ContentTestSuite : public ContentTestSuiteBase {
Expand All @@ -37,10 +29,6 @@ class ContentTestSuite : public ContentTestSuiteBase {
base::win::ScopedCOMInitializer com_initializer_;
#endif

#if defined(USE_AURA)
scoped_ptr<aura::test::TestAuraInitializer> aura_initializer_;
#endif

DISALLOW_COPY_AND_ASSIGN(ContentTestSuite);
};

Expand Down
3 changes: 0 additions & 3 deletions ui/aura/aura.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@
'../events/events.gyp:events_base',
'../events/events.gyp:events_test_support',
'../gfx/gfx.gyp:gfx',
'../resources/ui_resources.gyp:ui_test_pak',
'../ui.gyp:ui',
'../ui_unittests.gyp:ui_test_support',
'aura',
Expand All @@ -164,8 +163,6 @@
'test/env_test_helper.h',
'test/event_generator.cc',
'test/event_generator.h',
'test/test_aura_initializer.cc',
'test/test_aura_initializer.h',
'test/test_cursor_client.cc',
'test/test_cursor_client.h',
'test/test_event_handler.cc',
Expand Down
26 changes: 0 additions & 26 deletions ui/aura/test/test_aura_initializer.cc

This file was deleted.

27 changes: 0 additions & 27 deletions ui/aura/test/test_aura_initializer.h

This file was deleted.

0 comments on commit 5b3e88a

Please sign in to comment.