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

Unified Diff: trunk/src/chrome/browser/extensions/extension_keybinding_apitest.cc

Issue 14096026: Revert 194594 "Make sure manifest specified shortcut for Extensi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/chrome/browser/extensions/extension_keybinding_apitest.cc
===================================================================
--- trunk/src/chrome/browser/extensions/extension_keybinding_apitest.cc (revision 194596)
+++ trunk/src/chrome/browser/extensions/extension_keybinding_apitest.cc (working copy)
@@ -195,44 +195,4 @@
ASSERT_TRUE(RunExtensionTest("keybinding/synthesized")) << message_;
}
-// This test validates that an extension cannot request a shortcut that is
-// already in use by Chrome.
-IN_PROC_BROWSER_TEST_F(CommandsApiTest, DontOverwriteSystemShortcuts) {
- ASSERT_TRUE(test_server()->Start());
- ASSERT_TRUE(RunExtensionTest("keybinding/dont_overwrite_system")) << message_;
-
- ui_test_utils::NavigateToURL(browser(),
- test_server()->GetURL("files/extensions/test_file.txt"));
-
- WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
- ASSERT_TRUE(tab);
-
- // Activate the shortcut (Alt+Shift+F) to make page blue.
- ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), ui::VKEY_F, false, true, true, false));
-
- bool result = false;
- ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
- tab,
- "setInterval(function() {"
- " if (document.body.bgColor == 'blue') {"
- " window.domAutomationController.send(true)}}, 100)",
- &result));
- ASSERT_TRUE(result);
-
- // Activate the shortcut (Ctrl+F) to make page red (should not work).
- ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), ui::VKEY_F, true, false, false, false));
-
- // The page should still be blue.
- result = false;
- ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
- tab,
- "setInterval(function() {"
- " if (document.body.bgColor == 'blue') {"
- " window.domAutomationController.send(true)}}, 100)",
- &result));
- ASSERT_TRUE(result);
-}
-
} // extensions
Property changes on: trunk\src\chrome\browser\extensions\extension_keybinding_apitest.cc
___________________________________________________________________
Added: svn:mergeinfo
« no previous file with comments | « trunk/src/chrome/browser/extensions/api/commands/command_service.cc ('k') | trunk/src/chrome/browser/ui/accelerator_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698