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

Unified Diff: chrome/renderer/render_view_browsertest_mac.mm

Issue 6152007: Fix and re-enable RenderViewTest.MacTestCmdUp (we need to spin the message lo... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view_browsertest_mac.mm
===================================================================
--- chrome/renderer/render_view_browsertest_mac.mm (revision 71187)
+++ chrome/renderer/render_view_browsertest_mac.mm (working copy)
@@ -39,7 +39,7 @@
// Test that cmd-up/down scrolls the page exactly if it is not intercepted by
// javascript.
-TEST_F(RenderViewTest, DISABLED_MacTestCmdUp) {
+TEST_F(RenderViewTest, MacTestCmdUp) {
// Some preprocessor trickery so that we can have literal html in our source,
// makes it easier to copy html to and from an html file for testing (the
// preprocessor will remove the newlines at the line ends, turning this into
@@ -98,6 +98,7 @@
view_->OnSetEditCommandsForNextKeyEvent(
EditCommands(1, EditCommand("moveToEndOfDocument", "")));
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown));
+ ProcessPendingMessages();
output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
EXPECT_EQ(kArrowDownScrollDown, UTF16ToASCII(output));
@@ -106,6 +107,7 @@
view_->OnSetEditCommandsForNextKeyEvent(
EditCommands(1, EditCommand("moveToBeginningOfDocument", "")));
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
+ ProcessPendingMessages();
output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
EXPECT_EQ(kArrowUpScrollUp, UTF16ToASCII(output));
@@ -121,6 +123,7 @@
view_->OnSetEditCommandsForNextKeyEvent(
EditCommands(1, EditCommand("moveToEndOfDocument", "")));
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown));
+ ProcessPendingMessages();
output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
EXPECT_EQ(kArrowDownNoScroll, UTF16ToASCII(output));
@@ -129,6 +132,7 @@
view_->OnSetEditCommandsForNextKeyEvent(
EditCommands(1, EditCommand("moveToBeginningOfDocument", "")));
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown));
+ ProcessPendingMessages();
output = GetMainFrame()->contentAsText(kMaxOutputCharacters);
EXPECT_EQ(kArrowUpNoScroll, UTF16ToASCII(output));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698