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

Unified Diff: ios/web/webui/crw_web_ui_manager_unittest.mm

Issue 2583963002: Remove WebUI favicon support on iOS (Closed)
Patch Set: Remove web_ui_favicons.js from BUILD.gn Created 4 years 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/webui/crw_web_ui_manager.mm ('k') | ios/web/webui/resources/web_ui_bundle.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/webui/crw_web_ui_manager_unittest.mm
diff --git a/ios/web/webui/crw_web_ui_manager_unittest.mm b/ios/web/webui/crw_web_ui_manager_unittest.mm
index e5274d8541690757deffc152748c6c726ce37d40..27288b46bda7b37e0cbc02f52b0d7c0b50be98b1 100644
--- a/ios/web/webui/crw_web_ui_manager_unittest.mm
+++ b/ios/web/webui/crw_web_ui_manager_unittest.mm
@@ -149,36 +149,6 @@ TEST_F(CRWWebUIManagerTest, LoadWebUI) {
}
// Tests that CRWWebUIManager responds to OnScriptCommandReceieved call and runs
-// JavaScript to set favicon background.
-TEST_F(CRWWebUIManagerTest, HandleFaviconRequest) {
- GURL test_url(kTestWebUIUrl);
- std::string favicon_url_string(kFaviconUrl);
-
- // Create mock JavaScript message to request favicon.
- base::ListValue* arguments(new base::ListValue());
- arguments->AppendString(favicon_url_string);
- std::unique_ptr<base::DictionaryValue> message(new base::DictionaryValue());
- message->SetString("message", "webui.requestFavicon");
- message->Set("arguments", arguments);
-
- // Create expected JavaScript to call.
- base::FilePath favicon_path;
- ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &favicon_path));
- favicon_path = favicon_path.AppendASCII(kFaviconPath);
- NSData* expected_data = [NSData
- dataWithContentsOfFile:base::SysUTF8ToNSString(favicon_path.value())];
- base::string16 expected_javascript = base::SysNSStringToUTF16([NSString
- stringWithFormat:
- @"chrome.setFaviconBackground('%s', 'data:image/png;base64,%@');",
- favicon_url_string.c_str(),
- [expected_data base64EncodedStringWithOptions:0]]);
-
- EXPECT_CALL(*web_state_impl_, ExecuteJavaScript(expected_javascript));
- web_state_impl_->OnScriptCommandReceived("webui.requestFavicon", *message,
- test_url, false);
-}
-
-// Tests that CRWWebUIManager responds to OnScriptCommandReceieved call and runs
// JavaScript to fetch a mojo resource.
TEST_F(CRWWebUIManagerTest, HandleLoadMojoRequest) {
// Create mock JavaScript message to request a mojo resource.
« no previous file with comments | « ios/web/webui/crw_web_ui_manager.mm ('k') | ios/web/webui/resources/web_ui_bundle.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698