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

Side by Side Diff: ios/web/web_state/js/common_js_unittest.mm

Issue 2933373002: [ObjC ARC] Converts ios/web:ios_web_web_state_js_unittests to ARC. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/js/context_menu_js_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #import <Foundation/Foundation.h> 6 #import <Foundation/Foundation.h>
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #import "ios/web/public/test/web_test_with_web_state.h" 10 #import "ios/web/public/test/web_test_with_web_state.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #import "testing/gtest_mac.h" 12 #import "testing/gtest_mac.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace { 18 namespace {
15 19
16 // Struct for isTextField() test data. 20 // Struct for isTextField() test data.
17 struct TextFieldTestElement { 21 struct TextFieldTestElement {
18 // The element name. 22 // The element name.
19 const char* element_name; 23 const char* element_name;
20 // The index of this element in those that have the same name. 24 // The index of this element in those that have the same name.
21 const int element_index; 25 const int element_index;
22 // True if this is expected to be a text field. 26 // True if this is expected to be a text field.
23 const bool expected_is_text_field; 27 const bool expected_is_text_field;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // |webController_| will also inject web_bundle.js. 136 // |webController_| will also inject web_bundle.js.
133 LoadHtml(@"<p>"); 137 LoadHtml(@"<p>");
134 id result = ExecuteJavaScript(data.test_script); 138 id result = ExecuteJavaScript(data.test_script);
135 EXPECT_NSEQ(data.expected_value, result) 139 EXPECT_NSEQ(data.expected_value, result)
136 << " in test " << i << ": " 140 << " in test " << i << ": "
137 << base::SysNSStringToUTF8(data.test_script); 141 << base::SysNSStringToUTF8(data.test_script);
138 } 142 }
139 } 143 }
140 144
141 } // namespace web 145 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/js/context_menu_js_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698