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

Side by Side Diff: third_party/WebKit/Source/web/tests/WebFrameTest.cpp

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased + fixed a Mac crack. Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 11474 matching lines...) Expand 10 before | Expand all | Expand 10 after
11485 webView->resize(WebSize(500, 300)); 11485 webView->resize(WebSize(500, 300));
11486 webView->updateAllLifecyclePhases(); 11486 webView->updateAllLifecyclePhases();
11487 runPendingTasks(); 11487 runPendingTasks();
11488 webView->setInitialFocus(false); 11488 webView->setInitialFocus(false);
11489 runPendingTasks(); 11489 runPendingTasks();
11490 11490
11491 WebMouseEvent mouseEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, 11491 WebMouseEvent mouseEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers,
11492 WebInputEvent::TimeStampForTesting); 11492 WebInputEvent::TimeStampForTesting);
11493 11493
11494 mouseEvent.button = WebMouseEvent::Button::Right; 11494 mouseEvent.button = WebMouseEvent::Button::Right;
11495 mouseEvent.x = 10; 11495 mouseEvent.setPositionInWidget(10, 10);
11496 mouseEvent.y = 10;
11497 mouseEvent.clickCount = 1; 11496 mouseEvent.clickCount = 1;
11498 webView->handleInputEvent(WebCoalescedInputEvent(mouseEvent)); 11497 webView->handleInputEvent(WebCoalescedInputEvent(mouseEvent));
11499 runPendingTasks(); 11498 runPendingTasks();
11500 webViewHelper.reset(); 11499 webViewHelper.reset();
11501 return frame.getMenuData().editFlags & WebContextMenuData::CanSelectAll; 11500 return frame.getMenuData().editFlags & WebContextMenuData::CanSelectAll;
11502 } 11501 }
11503 11502
11504 TEST_F(WebFrameTest, ContextMenuData) { 11503 TEST_F(WebFrameTest, ContextMenuData) {
11505 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); 11504 EXPECT_FALSE(testSelectAll("<textarea></textarea>"));
11506 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); 11505 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>"));
(...skipping 17 matching lines...) Expand all
11524 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); 11523 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page");
11525 11524
11526 // Local frame with remote parent should have transparent baseBackgroundColor. 11525 // Local frame with remote parent should have transparent baseBackgroundColor.
11527 Color color = localFrame->frameView()->baseBackgroundColor(); 11526 Color color = localFrame->frameView()->baseBackgroundColor();
11528 EXPECT_EQ(Color::transparent, color); 11527 EXPECT_EQ(Color::transparent, color);
11529 11528
11530 view->close(); 11529 view->close();
11531 } 11530 }
11532 11531
11533 } // namespace blink 11532 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698