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

Unified Diff: chrome/browser/extensions/extension_messages_apitest.cc

Issue 261753019: Revert of Mark forwarded user gestures as forwarded, and don't forward already forwarded gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, this code moved around... Created 6 years, 7 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 | « no previous file | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_messages_apitest.cc
diff --git a/chrome/browser/extensions/extension_messages_apitest.cc b/chrome/browser/extensions/extension_messages_apitest.cc
index 81257d685b39c566b34b4b437dbead7b68ad84fa..83f3356df10f372fcb9ad96feb48afe070ee6479 100644
--- a/chrome/browser/extensions/extension_messages_apitest.cc
+++ b/chrome/browser/extensions/extension_messages_apitest.cc
@@ -1011,38 +1011,6 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MessagingUserGesture) {
" window.domAutomationController.send('' + response.result);\n"
" });\n"
"});", receiver->id().c_str())));
-
- // Messges sent from a setTimeout handler should not forward the user gesture
- // again.
- EXPECT_EQ(
- "false",
- ExecuteScriptInBackgroundPage(
- sender->id(),
- base::StringPrintf(
- "chrome.test.runWithUserGesture(function() {\n"
- " window.setTimeout(function() {\n"
- " chrome.runtime.sendMessage('%s', {}, function(response) {\n"
- " window.domAutomationController.send('' + "
- " response.result);\n"
- " });\n"
- " }, 0);\n"
- "});",
- receiver->id().c_str())));
-
- // The user gesture should not be send back with the reply message, gestures
- // are only forwarded once.
- EXPECT_EQ(
- "false",
- ExecuteScriptInBackgroundPage(
- sender->id(),
- base::StringPrintf(
- "chrome.test.runWithUserGesture(function() {\n"
- " chrome.runtime.sendMessage('%s', {}, function(response) {\n"
- " window.domAutomationController.send('' + "
- " chrome.test.isProcessingUserGesture());\n"
- " });\n"
- "});",
- receiver->id().c_str())));
}
// Tests that a hosted app on a connectable site doesn't interfere with the
« no previous file with comments | « no previous file | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698