Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: ios/web/alloc_with_zone_interceptor_unittest.mm

Issue 2577353003: [ios] Removed alloc_with_zone_interceptor as unused. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/alloc_with_zone_interceptor.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/alloc_with_zone_interceptor_unittest.mm
diff --git a/ios/web/alloc_with_zone_interceptor_unittest.mm b/ios/web/alloc_with_zone_interceptor_unittest.mm
deleted file mode 100644
index 6d2a5c9643fc1314c313fced7e023199f063c2af..0000000000000000000000000000000000000000
--- a/ios/web/alloc_with_zone_interceptor_unittest.mm
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 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.
-
-#import "ios/web/alloc_with_zone_interceptor.h"
-
-#include "base/mac/scoped_nsobject.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "testing/gtest_mac.h"
-#include "testing/platform_test.h"
-
-// Testable class to test web::AddAllocWithZoneMethod.
-@interface CRBTestAlloc : NSObject
-@end
-@implementation CRBTestAlloc
-@end
-
-namespace web {
-namespace {
-
-// Test fixture for alloc_with_zone_interceptor functions.
-typedef PlatformTest AllocWithZoneInterceptorTest;
-
-// Tests that AddAllocWithZoneMethod delegates allocation to the caller.
-TEST_F(AllocWithZoneInterceptorTest, AddAllocWithZoneMethod) {
- NSZone* const kZone = NSDefaultMallocZone();
- base::scoped_nsobject<CRBTestAlloc> original_result(
- [CRBTestAlloc allocWithZone:kZone]);
- ASSERT_TRUE([original_result isMemberOfClass:[CRBTestAlloc class]]);
- NSString* const kResult = @"test-result";
- AddAllocWithZoneMethod([CRBTestAlloc class], ^id(Class klass, NSZone* zone) {
- EXPECT_EQ([CRBTestAlloc class], klass);
- EXPECT_EQ(kZone, zone);
- return kResult;
- });
- EXPECT_NSEQ(kResult, [CRBTestAlloc allocWithZone:kZone]);
-}
-
-} // namespace
-} // namespace web
« no previous file with comments | « ios/web/alloc_with_zone_interceptor.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698