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/ui/crw_web_controller_observer_unittest.mm

Issue 2351893003: Remove __gCrWeb.invokeOnHostImmediate. (Closed)
Patch Set: Remove early return. 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/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/ui/crw_web_controller_observer_unittest.mm
diff --git a/ios/web/web_state/ui/crw_web_controller_observer_unittest.mm b/ios/web/web_state/ui/crw_web_controller_observer_unittest.mm
index 28aa09b39a9f4a4bc243017dc5c07267ec3bed8a..c36bd94edd6e9580a0f74848176dbb87a06f118a 100644
--- a/ios/web/web_state/ui/crw_web_controller_observer_unittest.mm
+++ b/ios/web/web_state/ui/crw_web_controller_observer_unittest.mm
@@ -59,27 +59,6 @@ TEST_F(CRWWebControllerObserverTest, HandleCommand) {
[fake_web_controller_observer_ commandsReceived][0]->Equals(&command));
}
-// Tests that web controller receives an immediate JS message from the page.
-TEST_F(CRWWebControllerObserverTest, HandleImmediateCommand) {
- LoadHtml(@"<p></p>");
- ASSERT_NSNE(@"http://testimmediate#target",
- [web_controller() externalRequestWindowName]);
- // The only valid immediate commands are window.unload and externalRequest.
- base::DictionaryValue command;
- command.SetString("command", "externalRequest");
- command.SetString("href", "http://testimmediate");
- command.SetString("target", "target");
- command.SetString("referrerPolicy", "referrerPolicy");
- std::string message;
- base::JSONWriter::Write(command, &message);
- ExecuteJavaScript(
- [NSString stringWithFormat:@"__gCrWeb.message.invokeOnHostImmediate(%s)",
- message.c_str()]);
- WaitForBackgroundTasks();
- ASSERT_NSEQ(@"http://testimmediate#target",
- [web_controller() externalRequestWindowName]);
-}
-
// Send a large number of commands and check each one is immediately received.
TEST_F(CRWWebControllerObserverTest, HandleMultipleCommands) {
LoadHtml(@"<p></p>");
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698