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

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

Issue 14367027: Deflaking the Commands test that makes sure extension commands can't overwrite Chrome shortcuts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/keybinding/dont_overwrite_system/background.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_keybinding_apitest.cc
diff --git a/chrome/browser/extensions/extension_keybinding_apitest.cc b/chrome/browser/extensions/extension_keybinding_apitest.cc
index 5e21db81a01098e151bc5af94b702bc77f897ef4..8951a60148dc3db129bc141805afcf1bfb57cdc9 100644
--- a/chrome/browser/extensions/extension_keybinding_apitest.cc
+++ b/chrome/browser/extensions/extension_keybinding_apitest.cc
@@ -197,9 +197,11 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, SynthesizedCommand) {
// This test validates that an extension cannot request a shortcut that is
// already in use by Chrome.
-// Flaky, see http://crbug.com/233372.
-IN_PROC_BROWSER_TEST_F(CommandsApiTest, DISABLED_DontOverwriteSystemShortcuts) {
+IN_PROC_BROWSER_TEST_F(CommandsApiTest, DontOverwriteSystemShortcuts) {
ASSERT_TRUE(test_server()->Start());
+
+ ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
+
ASSERT_TRUE(RunExtensionTest("keybinding/dont_overwrite_system")) << message_;
ui_test_utils::NavigateToURL(browser(),
@@ -209,8 +211,12 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, DISABLED_DontOverwriteSystemShortcuts) {
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));
+ {
+ ResultCatcher catcher;
+ ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
+ browser(), ui::VKEY_F, false, true, true, false));
+ ASSERT_TRUE(catcher.GetNextResult());
+ }
bool result = false;
ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
« no previous file with comments | « no previous file | chrome/test/data/extensions/api_test/keybinding/dont_overwrite_system/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698