media/webrtc/trunk/testing/platform_test.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
     2 // Use of this source code is governed by a BSD-style license that can be
     3 // found in the LICENSE file.
     5 #ifndef TESTING_PLATFORM_TEST_H_
     6 #define TESTING_PLATFORM_TEST_H_
     8 #include <gtest/gtest.h>
    10 #if defined(GTEST_OS_MAC)
    11 #ifdef __OBJC__
    12 @class NSAutoreleasePool;
    13 #else
    14 class NSAutoreleasePool;
    15 #endif
    17 // The purpose of this class us to provide a hook for platform-specific
    18 // operations across unit tests.  For example, on the Mac, it creates and
    19 // releases an outer NSAutoreleasePool for each test case.  For now, it's only
    20 // implemented on the Mac.  To enable this for another platform, just adjust
    21 // the #ifdefs and add a platform_test_<platform>.cc implementation file.
    22 class PlatformTest : public testing::Test {
    23  protected:
    24   PlatformTest();
    25   virtual ~PlatformTest();
    27  private:
    28   NSAutoreleasePool* pool_;
    29 };
    30 #else
    31 typedef testing::Test PlatformTest;
    32 #endif // GTEST_OS_MAC
    34 #endif // TESTING_PLATFORM_TEST_H_

mercurial