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

Unified Diff: chrome/test/interactive_ui/mouseleave_interactive_uitest.cc

Issue 7568002: Move more files from chrome/test to chrome/test/base, part #6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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: chrome/test/interactive_ui/mouseleave_interactive_uitest.cc
===================================================================
--- chrome/test/interactive_ui/mouseleave_interactive_uitest.cc (revision 95314)
+++ chrome/test/interactive_ui/mouseleave_interactive_uitest.cc (working copy)
@@ -1,88 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/file_path.h"
-#include "base/test/test_timeouts.h"
-#include "chrome/test/automation/automation_proxy.h"
-#include "chrome/test/automation/browser_proxy.h"
-#include "chrome/test/automation/tab_proxy.h"
-#include "chrome/test/automation/window_proxy.h"
-#include "chrome/test/base/ui_test_utils.h"
-#include "chrome/test/ui/ui_test.h"
-#include "googleurl/src/gurl.h"
-#include "ui/gfx/point.h"
-#include "ui/gfx/rect.h"
-
-namespace {
-
-class MouseLeaveTest : public UITest {
- public:
- MouseLeaveTest() {
- dom_automation_enabled_ = true;
- show_window_ = true;
- }
-
- DISALLOW_COPY_AND_ASSIGN(MouseLeaveTest);
-};
-
-#if defined(OS_MACOSX)
-// Missing automation provider support: http://crbug.com/45892
-#define MAYBE_TestOnMouseOut DISABLED_TestOnMouseOut
-#else
-#define MAYBE_TestOnMouseOut TestOnMouseOut
-#endif
-TEST_F(MouseLeaveTest, MAYBE_TestOnMouseOut) {
- GURL test_url = ui_test_utils::GetTestUrl(
- FilePath(FilePath::kCurrentDirectory),
- FilePath(FILE_PATH_LITERAL("mouseleave.html")));
-
- scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0);
- ASSERT_TRUE(browser.get());
- scoped_refptr<WindowProxy> window = browser->GetWindow();
- ASSERT_TRUE(window.get());
- scoped_refptr<TabProxy> tab(GetActiveTab());
- ASSERT_TRUE(tab.get());
-
- gfx::Rect tab_view_bounds;
- ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER, &tab_view_bounds,
- true));
- gfx::Point in_content_point(
- tab_view_bounds.x() + tab_view_bounds.width() / 2,
- tab_view_bounds.y() + 10);
- gfx::Point above_content_point(
- tab_view_bounds.x() + tab_view_bounds.width() / 2,
- tab_view_bounds.y() - 2);
-
- // Start by moving the point just above the content.
- ASSERT_TRUE(window->SimulateOSMouseMove(above_content_point));
-
- // Navigate to the test html page.
- ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(test_url));
-
- // Wait for the onload() handler to complete so we can do the
- // next part of the test.
- ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state",
- TestTimeouts::large_test_timeout_ms(), "initial"));
-
- // Move the cursor to the top-center of the content, which will trigger
- // a javascript onMouseOver event.
- ASSERT_TRUE(window->SimulateOSMouseMove(in_content_point));
-
- // Wait on the correct intermediate value of the cookie.
- ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state",
- TestTimeouts::large_test_timeout_ms(), "initial,entered"));
-
- // Move the cursor above the content again, which should trigger
- // a javascript onMouseOut event.
- ASSERT_TRUE(window->SimulateOSMouseMove(above_content_point));
-
- // Wait on the correct final value of the cookie.
- ASSERT_TRUE(WaitUntilCookieValue(
- tab.get(), test_url, "__state",
- TestTimeouts::large_test_timeout_ms(), "initial,entered,left"));
-}
-
-} // namespace
« no previous file with comments | « chrome/test/interactive_ui/keyboard_access_uitest.cc ('k') | chrome/test/interactive_ui/npapi_interactive_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698