diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 21:35:27 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 21:35:27 +0000 |
commit | d219209b63a040022458cd0825501ff9c78f1839 (patch) | |
tree | 0f340711e6b4b9f63e130653a3824258fd6a9bb1 /build | |
parent | 6b48c29b224d31b397e34f1eccdfc0247b256dd6 (diff) | |
download | chromium_src-d219209b63a040022458cd0825501ff9c78f1839.zip chromium_src-d219209b63a040022458cd0825501ff9c78f1839.tar.gz chromium_src-d219209b63a040022458cd0825501ff9c78f1839.tar.bz2 |
Move googleurl's unittest to use a custom main so ICU can be started up in
a way that matches the Chromium build.
Review URL: http://codereview.chromium.org/6532003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/temp_gyp/googleurl.gyp | 3 | ||||
-rw-r--r-- | build/temp_gyp/googleurl_test_main.cc | 22 |
2 files changed, 24 insertions, 1 deletions
diff --git a/build/temp_gyp/googleurl.gyp b/build/temp_gyp/googleurl.gyp index 9a2eda3..d4f3a37 100644 --- a/build/temp_gyp/googleurl.gyp +++ b/build/temp_gyp/googleurl.gyp @@ -69,6 +69,7 @@ { 'target_name': 'googleurl_unittests', 'dependencies': [ + '../../base/base.gyp:base_i18n', 'googleurl', '../../testing/gtest.gyp:gtest', '../../third_party/icu/icu.gyp:icuuc', @@ -79,7 +80,7 @@ '../../googleurl/src/url_parse_unittest.cc', '../../googleurl/src/url_test_utils.h', '../../googleurl/src/url_util_unittest.cc', - '../../googleurl/src/gurl_test_main.cc', + 'googleurl_test_main.cc', ], 'conditions': [ ['OS=="linux" or OS=="freebsd"', { diff --git a/build/temp_gyp/googleurl_test_main.cc b/build/temp_gyp/googleurl_test_main.cc new file mode 100644 index 0000000..aecf095 --- /dev/null +++ b/build/temp_gyp/googleurl_test_main.cc @@ -0,0 +1,22 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This is a replacement for ../../googleurl/src/gurl_test_main.cc. The +// unittest is being built for a Chromium tree, so ICU needs to be initialized +// how the Chromium tree expects which is different than what is in the +// GoogleURL version. + +#include "base/i18n/icu_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" +#include "testing/gtest/include/gtest/gtest.h" + +int main(int argc, char** argv) { + base::mac::ScopedNSAutoreleasePool scoped_pool; + + testing::InitGoogleTest(&argc, argv); + + icu_util::Initialize(); + + return RUN_ALL_TESTS(); +} |