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

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

Issue 2817943002: Fully deprecate core.js. Moved last method to error.js. (Closed)
Patch Set: Tweak language 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 unified diff | Download patch
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/js/resources/core.js » ('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"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 "temp.toJSON = 42;" 122 "temp.toJSON = 42;"
123 "__gCrWeb.stringify(temp)", 123 "__gCrWeb.stringify(temp)",
124 @"[1,2]"}, 124 @"[1,2]"},
125 // Stringify an undefined object. 125 // Stringify an undefined object.
126 {@"__gCrWeb.stringify(undefined)", @"undefined"}, 126 {@"__gCrWeb.stringify(undefined)", @"undefined"},
127 }; 127 };
128 128
129 for (size_t i = 0; i < arraysize(test_data); i++) { 129 for (size_t i = 0; i < arraysize(test_data); i++) {
130 TestScriptAndExpectedValue& data = test_data[i]; 130 TestScriptAndExpectedValue& data = test_data[i];
131 // Load a sample HTML page. As a side-effect, loading HTML via 131 // Load a sample HTML page. As a side-effect, loading HTML via
132 // |webController_| will also inject core.js. 132 // |webController_| will also inject web_bundle.js.
133 LoadHtml(@"<p>"); 133 LoadHtml(@"<p>");
134 id result = ExecuteJavaScript(data.test_script); 134 id result = ExecuteJavaScript(data.test_script);
135 EXPECT_NSEQ(data.expected_value, result) 135 EXPECT_NSEQ(data.expected_value, result)
136 << " in test " << i << ": " 136 << " in test " << i << ": "
137 << base::SysNSStringToUTF8(data.test_script); 137 << base::SysNSStringToUTF8(data.test_script);
138 } 138 }
139 } 139 }
140 140
141 } // namespace web 141 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/BUILD.gn ('k') | ios/web/web_state/js/resources/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698