media/webrtc/trunk/testing/gtest_mac.h

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 // Copyright (c) 2010 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_GTEST_MAC_H_
     6 #define TESTING_GTEST_MAC_H_
     8 #include <gtest/internal/gtest-port.h>
     9 #include <gtest/gtest.h>
    11 #ifdef GTEST_OS_MAC
    13 #import <Foundation/Foundation.h>
    15 namespace testing {
    16 namespace internal {
    18 // This overloaded version allows comparison between ObjC objects that conform
    19 // to the NSObject protocol. Used to implement {ASSERT|EXPECT}_EQ().
    20 GTEST_API_ AssertionResult CmpHelperNSEQ(const char* expected_expression,
    21                                          const char* actual_expression,
    22                                          id<NSObject> expected,
    23                                          id<NSObject> actual);
    25 // This overloaded version allows comparison between ObjC objects that conform
    26 // to the NSObject protocol. Used to implement {ASSERT|EXPECT}_NE().
    27 GTEST_API_ AssertionResult CmpHelperNSNE(const char* expected_expression,
    28                                          const char* actual_expression,
    29                                          id<NSObject> expected,
    30                                          id<NSObject> actual);
    32 }  // namespace internal
    33 }  // namespace testing
    35 // Tests that [expected isEqual:actual].
    36 #define EXPECT_NSEQ(expected, actual) \
    37   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual)
    38 #define EXPECT_NSNE(val1, val2) \
    39   EXPECT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2)
    41 #define ASSERT_NSEQ(expected, actual) \
    42   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSEQ, expected, actual)
    43 #define ASSERT_NSNE(val1, val2) \
    44   ASSERT_PRED_FORMAT2(::testing::internal::CmpHelperNSNE, val1, val2)
    46 #endif  // GTEST_OS_MAC
    48 #endif  // TESTING_GTEST_MAC_H_

mercurial