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

Unified Diff: components/translate/ios/browser/translate_controller_unittest.mm

Issue 2813703002: [ObjC ARC] Converts components/translate/ios/browser:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 8 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
Index: components/translate/ios/browser/translate_controller_unittest.mm
diff --git a/components/translate/ios/browser/translate_controller_unittest.mm b/components/translate/ios/browser/translate_controller_unittest.mm
index 44e55a3f0b656cb3f4e1517d4eebab202c9880e9..7517062abf46325daa69c22d8ab409bbc91d5d67 100644
--- a/components/translate/ios/browser/translate_controller_unittest.mm
+++ b/components/translate/ios/browser/translate_controller_unittest.mm
@@ -13,6 +13,10 @@
#import "third_party/ocmock/OCMock/OCMock.h"
#include "url/gurl.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
namespace translate {
class TranslateControllerTest : public PlatformTest,
@@ -26,8 +30,8 @@ class TranslateControllerTest : public PlatformTest,
translation_time_(0),
on_script_ready_called_(false),
on_translate_complete_called_(false) {
- mock_js_translate_manager_.reset(
- [[OCMockObject niceMockForClass:[JsTranslateManager class]] retain]);
+ mock_js_translate_manager_ =
+ [OCMockObject niceMockForClass:[JsTranslateManager class]];
translate_controller_.reset(new TranslateController(
sdefresne 2017/04/11 07:45:33 ditto, base::MakeUnique
stkhapugin 2017/04/11 15:33:33 Done.
test_web_state_.get(), mock_js_translate_manager_));
translate_controller_->set_observer(this);
@@ -53,7 +57,7 @@ class TranslateControllerTest : public PlatformTest,
}
std::unique_ptr<web::TestWebState> test_web_state_;
- base::scoped_nsobject<id> mock_js_translate_manager_;
+ id mock_js_translate_manager_;
std::unique_ptr<TranslateController> translate_controller_;
bool success_;
double ready_time_;

Powered by Google App Engine
This is Rietveld 408576698