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

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

Issue 2813703002: [ObjC ARC] Converts components/translate/ios/browser:unit_tests to ARC. (Closed)
Patch Set: make_unique 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/js_translate_manager_unittest.mm
diff --git a/components/translate/ios/browser/js_translate_manager_unittest.mm b/components/translate/ios/browser/js_translate_manager_unittest.mm
index 696ecee19a1f91f3525f172c387879080519d9b9..76bf4f84636500a6df77a56da955c5cbc87ee133 100644
--- a/components/translate/ios/browser/js_translate_manager_unittest.mm
+++ b/components/translate/ios/browser/js_translate_manager_unittest.mm
@@ -4,7 +4,6 @@
#import "components/translate/ios/browser/js_translate_manager.h"
-#import "base/mac/scoped_nsobject.h"
#include "base/strings/sys_string_conversions.h"
#include "components/grit/components_resources.h"
#import "ios/web/public/test/fakes/crw_test_js_injection_receiver.h"
@@ -13,6 +12,10 @@
#include "testing/platform_test.h"
#include "ui/base/resource/resource_bundle.h"
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
@interface JsTranslateManager (Testing)
- (double)performanceNow;
@end
@@ -28,8 +31,8 @@
class JsTranslateManagerTest : public PlatformTest {
protected:
JsTranslateManagerTest() {
- receiver_.reset([[CRWTestJSInjectionReceiver alloc] init]);
- manager_.reset([[JsTranslateManager alloc] initWithReceiver:receiver_]);
+ receiver_ = [[CRWTestJSInjectionReceiver alloc] init];
+ manager_ = [[JsTranslateManager alloc] initWithReceiver:receiver_];
base::StringPiece script =
ResourceBundle::GetSharedInstance().GetRawDataResource(
IDR_TRANSLATE_JS);
@@ -43,8 +46,8 @@ class JsTranslateManagerTest : public PlatformTest {
return [web::ExecuteJavaScript(receiver_, script) boolValue];
}
- base::scoped_nsobject<CRWTestJSInjectionReceiver> receiver_;
- base::scoped_nsobject<JsTranslateManager> manager_;
+ CRWTestJSInjectionReceiver* receiver_;
+ JsTranslateManager* manager_;
};
// TODO(crbug.com/658619#c47): Test reported as flaky.
« no previous file with comments | « components/translate/ios/browser/BUILD.gn ('k') | components/translate/ios/browser/language_detection_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698