OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "chrome/test/automation/browser_proxy.h" | 6 #include "chrome/test/automation/browser_proxy.h" |
7 #include "chrome/test/automation/tab_proxy.h" | 7 #include "chrome/test/automation/tab_proxy.h" |
8 #include "chrome/test/automation/window_proxy.h" | 8 #include "chrome/test/automation/window_proxy.h" |
9 #include "chrome/test/ui/ui_test.h" | 9 #include "chrome/test/ui/ui_test.h" |
10 #include "chrome/test/ui_test_utils.h" | 10 #include "chrome/test/ui_test_utils.h" |
11 #include "gfx/point.h" | 11 #include "gfx/point.h" |
12 #include "gfx/rect.h" | 12 #include "gfx/rect.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 class MouseLeaveTest : public UITest { | 17 class MouseLeaveTest : public UITest { |
18 public: | 18 public: |
19 MouseLeaveTest() { | 19 MouseLeaveTest() { |
20 dom_automation_enabled_ = true; | 20 dom_automation_enabled_ = true; |
21 show_window_ = true; | 21 show_window_ = true; |
22 } | 22 } |
23 | 23 |
24 DISALLOW_COPY_AND_ASSIGN(MouseLeaveTest); | 24 DISALLOW_COPY_AND_ASSIGN(MouseLeaveTest); |
25 }; | 25 }; |
26 | 26 |
27 TEST_F(MouseLeaveTest, TestOnMouseOut) { | 27 #if defined(OS_MACOSX) |
| 28 // Missing automation provider support: http://crbug.com/45892 |
| 29 #define MAYBE_TestOnMouseOut FAILS_TestOnMouseOut |
| 30 #else |
| 31 #define MAYBE_TestOnMouseOut TestOnMouseOut |
| 32 #endif |
| 33 TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) { |
28 GURL test_url = ui_test_utils::GetTestUrl( | 34 GURL test_url = ui_test_utils::GetTestUrl( |
29 FilePath(FilePath::kCurrentDirectory), | 35 FilePath(FilePath::kCurrentDirectory), |
30 FilePath(FILE_PATH_LITERAL("mouseleave.html"))); | 36 FilePath(FILE_PATH_LITERAL("mouseleave.html"))); |
31 | 37 |
32 scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0); | 38 scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0); |
33 ASSERT_TRUE(browser.get()); | 39 ASSERT_TRUE(browser.get()); |
34 scoped_refptr<WindowProxy> window = browser->GetWindow(); | 40 scoped_refptr<WindowProxy> window = browser->GetWindow(); |
35 ASSERT_TRUE(window.get()); | 41 ASSERT_TRUE(window.get()); |
36 scoped_refptr<TabProxy> tab(GetActiveTab()); | 42 scoped_refptr<TabProxy> tab(GetActiveTab()); |
37 ASSERT_TRUE(tab.get()); | 43 ASSERT_TRUE(tab.get()); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Move the cursor above the content again, which should trigger | 76 // Move the cursor above the content again, which should trigger |
71 // a javascript onMouseOut event. | 77 // a javascript onMouseOut event. |
72 ASSERT_TRUE(window->SimulateOSMouseMove(above_content_point)); | 78 ASSERT_TRUE(window->SimulateOSMouseMove(above_content_point)); |
73 | 79 |
74 // Wait on the correct final value of the cookie. | 80 // Wait on the correct final value of the cookie. |
75 ASSERT_TRUE(WaitUntilCookieValue( | 81 ASSERT_TRUE(WaitUntilCookieValue( |
76 tab.get(), test_url, "__state", timeout_ms, "initial,entered,left")); | 82 tab.get(), test_url, "__state", timeout_ms, "initial,entered,left")); |
77 } | 83 } |
78 | 84 |
79 } // namespace | 85 } // namespace |
OLD | NEW |