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

Unified Diff: ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm

Issue 2894653002: [ObjC ARC] Converts ios/chrome/browser/metrics:unit_tests_internal to ARC. (Closed)
Patch Set: Created 3 years, 7 months 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/chrome/browser/metrics/size_class_recorder_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm
diff --git a/ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm b/ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm
index ccd9cd22ef5268bb9835885960e0f468c8e49f41..ca0817bb3b7d0c7201b6f0f7c9e7959367255ad4 100644
--- a/ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm
+++ b/ios/chrome/browser/metrics/tab_usage_recorder_unittest.mm
@@ -4,7 +4,6 @@
#include <memory>
-#include "base/mac/scoped_nsobject.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_samples.h"
#include "base/stl_util.h"
@@ -20,6 +19,10 @@
#include "testing/platform_test.h"
#include "third_party/ocmock/ocmock_extensions.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface TURTestTabMock : OCMockComplexTypeHelper {
GURL _url;
}
@@ -105,7 +108,7 @@ class TabUsageRecorderTest : public PlatformTest {
[tab_mock setUrl:webUrl_];
[[[web_controller_mock stub] andReturnBool:inMemory] isViewAlive];
[[web_controller_mock stub] removeObserver:OCMOCK_ANY];
- return [tab_mock autorelease];
+ return tab_mock;
}
GURL webUrl_;
@@ -312,8 +315,8 @@ TEST_F(TabUsageRecorderTest, RendererTerminated) {
Tab* terminated_tab = MockTab(false);
// Set up the delegate to return |kAliveTabsCountAtRenderTermination|.
- base::scoped_nsobject<MockTabUsageRecorderDelegate> delegate(
- [[MockTabUsageRecorderDelegate alloc] init]);
+ MockTabUsageRecorderDelegate* delegate =
+ [[MockTabUsageRecorderDelegate alloc] init];
[delegate setLiveTabsCount:kAliveTabsCountAtRendererTermination];
tab_usage_recorder_->SetDelegate(delegate);
« no previous file with comments | « ios/chrome/browser/metrics/size_class_recorder_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698