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

Unified Diff: ios/web/web_state/js/core_js_unittest.mm

Issue 2295053003: [ios] Implemented LoadHtml w/o using data:// URLs. (Closed)
Patch Set: Addressed review comments Created 4 years, 3 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/web/public/test/web_test_with_web_state.mm ('k') | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/core_js_unittest.mm
diff --git a/ios/web/web_state/js/core_js_unittest.mm b/ios/web/web_state/js/core_js_unittest.mm
index c657e916bff0634b2ec20677f5b58dbf6e51b304..7f4d7c7aa9dc467f73e36cdd253c79493ef05e60 100644
--- a/ios/web/web_state/js/core_js_unittest.mm
+++ b/ios/web/web_state/js/core_js_unittest.mm
@@ -240,7 +240,7 @@ TEST_F(CoreJsTest, LinkOfImage) {
LoadHtml(base::StringPrintf(image, "http://destination"));
id result = ExecuteJavaScript(@"__gCrWeb['getElementFromPoint'](200, 200)");
NSDictionary* expected_result = @{
- @"src" : @"foo",
+ @"src" : [NSString stringWithFormat:@"%sfoo", BaseUrl().c_str()],
@"referrerPolicy" : @"default",
@"href" : @"http://destination/",
};
@@ -250,7 +250,7 @@ TEST_F(CoreJsTest, LinkOfImage) {
LoadHtml(base::StringPrintf(image, "javascript:console.log('whatever')"));
result = ExecuteJavaScript(@"__gCrWeb['getElementFromPoint'](200, 200)");
expected_result = @{
- @"src" : @"foo",
+ @"src" : [NSString stringWithFormat:@"%sfoo", BaseUrl().c_str()],
@"referrerPolicy" : @"default",
@"href" : @"javascript:console.log(",
};
@@ -268,7 +268,7 @@ TEST_F(CoreJsTest, LinkOfImage) {
LoadHtml(base::StringPrintf(image, javascript.c_str()));
result = ExecuteJavaScript(@"__gCrWeb['getElementFromPoint'](200, 200)");
expected_result = @{
- @"src" : @"foo",
+ @"src" : [NSString stringWithFormat:@"%sfoo", BaseUrl().c_str()],
@"referrerPolicy" : @"default",
};
// Make sure the returned JSON does not have an 'href' key.
« no previous file with comments | « ios/web/public/test/web_test_with_web_state.mm ('k') | ios/web/web_state/ui/crw_web_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698