| Index: content/public/test/browser_test.h
|
| diff --git a/content/public/test/browser_test.h b/content/public/test/browser_test.h
|
| index b25d46cbdca3501ecffce86abc57fa4c8cc3f12c..4f379ab541d674ffbbfd16903e18c223aa5b4165 100644
|
| --- a/content/public/test/browser_test.h
|
| +++ b/content/public/test/browser_test.h
|
| @@ -16,61 +16,71 @@
|
| #include "base/compiler_specific.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| -#define IN_PROC_BROWSER_TEST_(test_case_name, test_name, parent_class,\
|
| - parent_id)\
|
| -class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) : public parent_class {\
|
| - public:\
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {}\
|
| - protected:\
|
| - virtual void RunTestOnMainThread() override;\
|
| - private:\
|
| - virtual void TestBody() override {}\
|
| - static ::testing::TestInfo* const test_info_;\
|
| - GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
|
| -};\
|
| -\
|
| -::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, test_name)\
|
| - ::test_info_ =\
|
| - ::testing::internal::MakeAndRegisterTestInfo(\
|
| - #test_case_name, #test_name, "", "", \
|
| - (parent_id), \
|
| - parent_class::SetUpTestCase, \
|
| - parent_class::TearDownTestCase, \
|
| - new ::testing::internal::TestFactoryImpl<\
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>);\
|
| -void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
|
| +#define IN_PROC_BROWSER_TEST_( \
|
| + test_case_name, test_name, parent_class, parent_id) \
|
| + class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
|
| + : public parent_class { \
|
| + public: \
|
| + GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
|
| + \
|
| + protected: \
|
| + void RunTestOnMainThread() override; \
|
| + \
|
| + private: \
|
| + void TestBody() override {} \
|
| + static ::testing::TestInfo* const test_info_; \
|
| + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_case_name, \
|
| + test_name)); \
|
| + }; \
|
| + \
|
| + ::testing::TestInfo* const GTEST_TEST_CLASS_NAME_(test_case_name, \
|
| + test_name)::test_info_ = \
|
| + ::testing::internal::MakeAndRegisterTestInfo( \
|
| + #test_case_name, \
|
| + #test_name, \
|
| + "", \
|
| + "", \
|
| + (parent_id), \
|
| + parent_class::SetUpTestCase, \
|
| + parent_class::TearDownTestCase, \
|
| + new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \
|
| + test_case_name, test_name)>); \
|
| + void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
|
|
|
| #define IN_PROC_BROWSER_TEST_F(test_fixture, test_name)\
|
| IN_PROC_BROWSER_TEST_(test_fixture, test_name, test_fixture,\
|
| ::testing::internal::GetTypeId<test_fixture>())
|
|
|
| -#define IN_PROC_BROWSER_TEST_P_(test_case_name, test_name) \
|
| - class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
|
| - : public test_case_name { \
|
| - public: \
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
|
| - protected: \
|
| - virtual void RunTestOnMainThread() override; \
|
| - private: \
|
| - virtual void TestBody() override {} \
|
| - static int AddToRegistry() { \
|
| - ::testing::UnitTest::GetInstance()->parameterized_test_registry(). \
|
| - GetTestCasePatternHolder<test_case_name>(\
|
| - #test_case_name, __FILE__, __LINE__)->AddTestPattern(\
|
| - #test_case_name, \
|
| - #test_name, \
|
| - new ::testing::internal::TestMetaFactory< \
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)>()); \
|
| - return 0; \
|
| - } \
|
| - static int gtest_registering_dummy_; \
|
| - GTEST_DISALLOW_COPY_AND_ASSIGN_(\
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)); \
|
| - }; \
|
| - int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
| - test_name)::gtest_registering_dummy_ = \
|
| - GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
| +#define IN_PROC_BROWSER_TEST_P_(test_case_name, test_name) \
|
| + class GTEST_TEST_CLASS_NAME_(test_case_name, test_name) \
|
| + : public test_case_name { \
|
| + public: \
|
| + GTEST_TEST_CLASS_NAME_(test_case_name, test_name)() {} \
|
| + \
|
| + protected: \
|
| + void RunTestOnMainThread() override; \
|
| + \
|
| + private: \
|
| + void TestBody() override {} \
|
| + static int AddToRegistry() { \
|
| + ::testing::UnitTest::GetInstance() \
|
| + ->parameterized_test_registry() \
|
| + .GetTestCasePatternHolder<test_case_name>( \
|
| + #test_case_name, __FILE__, __LINE__) \
|
| + ->AddTestPattern( \
|
| + #test_case_name, \
|
| + #test_name, \
|
| + new ::testing::internal::TestMetaFactory<GTEST_TEST_CLASS_NAME_( \
|
| + test_case_name, test_name)>()); \
|
| + return 0; \
|
| + } \
|
| + static int gtest_registering_dummy_; \
|
| + GTEST_DISALLOW_COPY_AND_ASSIGN_(GTEST_TEST_CLASS_NAME_(test_case_name, \
|
| + test_name)); \
|
| + }; \
|
| + int GTEST_TEST_CLASS_NAME_(test_case_name, \
|
| + test_name)::gtest_registering_dummy_ = \
|
| + GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::AddToRegistry(); \
|
| void GTEST_TEST_CLASS_NAME_(test_case_name, test_name)::RunTestOnMainThread()
|
|
|
| // Wrap the real macro with an outer macro to ensure that the parameters are
|
|
|