| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/files/file_path.h" | 5 #include "base/files/file_path.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" | 9 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" |
| 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsert
est_util.h" | 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_browsert
est_util.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MouseDownOnBrowserCaption) { | 100 IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MouseDownOnBrowserCaption) { |
| 101 gfx::Rect browser_bounds = browser()->window()->GetBounds(); | 101 gfx::Rect browser_bounds = browser()->window()->GetBounds(); |
| 102 ui_controls::SendMouseMove(browser_bounds.x() + 200, | 102 ui_controls::SendMouseMove(browser_bounds.x() + 200, |
| 103 browser_bounds.y() + 10); | 103 browser_bounds.y() + 10); |
| 104 ui_controls::SendMouseClick(ui_controls::LEFT); | 104 ui_controls::SendMouseClick(ui_controls::LEFT); |
| 105 | 105 |
| 106 MouseLeaveTestCommon(); | 106 MouseLeaveTestCommon(); |
| 107 } | 107 } |
| 108 #endif | 108 #endif |
| 109 | 109 |
| 110 #if defined(OS_MACOSX) | 110 #if defined(OS_MACOSX) || defined(OS_WIN) |
| 111 // Test that a mouseleave is not triggered when showing the context menu. | 111 // Test that a mouseleave is not triggered when showing the context menu. |
| 112 // If the test is failed, it means that Blink gets the mouseleave event | 112 // If the test is failed, it means that Blink gets the mouseleave event |
| 113 // when showing the context menu and it could make the unexpecting | 113 // when showing the context menu and it could make the unexpecting |
| 114 // content behavior such as clearing the hover status. | 114 // content behavior such as clearing the hover status. |
| 115 // Please refer to the below issue for understanding what happens . | 115 // Please refer to the below issue for understanding what happens . |
| 116 // TODO: Make test pass on OS_WIN and OS_MACOSX | 116 // TODO: Make test pass on OS_WIN and OS_MACOSX |
| 117 // OS_WIN: http://crbug.com/450138 | 117 // OS_WIN: Flaky. See http://crbug.com/656101. |
| 118 // OS_MACOSX: Missing automation provider support: http://crbug.com/45892. | 118 // OS_MACOSX: Missing automation provider support: http://crbug.com/45892. |
| 119 #define MAYBE_ContextMenu DISABLED_ContextMenu | 119 #define MAYBE_ContextMenu DISABLED_ContextMenu |
| 120 #else | 120 #else |
| 121 #define MAYBE_ContextMenu ContextMenu | 121 #define MAYBE_ContextMenu ContextMenu |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MAYBE_ContextMenu) { | 124 IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MAYBE_ContextMenu) { |
| 125 content::WebContents* tab = | 125 content::WebContents* tab = |
| 126 browser()->tab_strip_model()->GetActiveWebContents(); | 126 browser()->tab_strip_model()->GetActiveWebContents(); |
| 127 | 127 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 tab->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16("done()")); | 166 tab->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16("done()")); |
| 167 const base::string16 success_title = base::ASCIIToUTF16("without mouseleave"); | 167 const base::string16 success_title = base::ASCIIToUTF16("without mouseleave"); |
| 168 const base::string16 failure_title = base::ASCIIToUTF16("with mouseleave"); | 168 const base::string16 failure_title = base::ASCIIToUTF16("with mouseleave"); |
| 169 content::TitleWatcher done_title_watcher(tab, success_title); | 169 content::TitleWatcher done_title_watcher(tab, success_title); |
| 170 done_title_watcher.AlsoWaitForTitle(failure_title); | 170 done_title_watcher.AlsoWaitForTitle(failure_title); |
| 171 EXPECT_EQ(success_title, done_title_watcher.WaitAndGetTitle()); | 171 EXPECT_EQ(success_title, done_title_watcher.WaitAndGetTitle()); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace | 174 } // namespace |
| OLD | NEW |