Commit f4610b8b authored by finnur@chromium.org's avatar finnur@chromium.org

Deflaking the Commands test that makes sure extension commands can't overwrite Chrome shortcuts.

TBR=sky
BUG=226994

Review URL: https://chromiumcodereview.appspot.com/14367027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195306 0039d316-1c4b-4281-b951-d872f2087c98
parent e296562f
...@@ -197,9 +197,11 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, SynthesizedCommand) { ...@@ -197,9 +197,11 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, SynthesizedCommand) {
// This test validates that an extension cannot request a shortcut that is // This test validates that an extension cannot request a shortcut that is
// already in use by Chrome. // already in use by Chrome.
// Flaky, see http://crbug.com/233372. IN_PROC_BROWSER_TEST_F(CommandsApiTest, DontOverwriteSystemShortcuts) {
IN_PROC_BROWSER_TEST_F(CommandsApiTest, DISABLED_DontOverwriteSystemShortcuts) {
ASSERT_TRUE(test_server()->Start()); ASSERT_TRUE(test_server()->Start());
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
ASSERT_TRUE(RunExtensionTest("keybinding/dont_overwrite_system")) << message_; ASSERT_TRUE(RunExtensionTest("keybinding/dont_overwrite_system")) << message_;
ui_test_utils::NavigateToURL(browser(), ui_test_utils::NavigateToURL(browser(),
...@@ -209,8 +211,12 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, DISABLED_DontOverwriteSystemShortcuts) { ...@@ -209,8 +211,12 @@ IN_PROC_BROWSER_TEST_F(CommandsApiTest, DISABLED_DontOverwriteSystemShortcuts) {
ASSERT_TRUE(tab); ASSERT_TRUE(tab);
// Activate the shortcut (Alt+Shift+F) to make page blue. // 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; bool result = false;
ASSERT_TRUE(content::ExecuteScriptAndExtractBool( ASSERT_TRUE(content::ExecuteScriptAndExtractBool(
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
chrome.commands.onCommand.addListener(function(command) { chrome.commands.onCommand.addListener(function(command) {
chrome.tabs.executeScript(null, { chrome.tabs.executeScript(null, {
code: "document.body.bgColor='" + command + "'" }); code: "document.body.bgColor='" + command + "'" });
chrome.test.notifyPass();
}); });
chrome.test.notifyPass(); chrome.test.notifyPass();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment