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

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 comment in web_input_event_builders_mac.mm 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 11548 matching lines...) Expand 10 before | Expand all | Expand 10 after
11559 webView->resize(WebSize(500, 300)); 11559 webView->resize(WebSize(500, 300));
11560 webView->updateAllLifecyclePhases(); 11560 webView->updateAllLifecyclePhases();
11561 runPendingTasks(); 11561 runPendingTasks();
11562 webView->setInitialFocus(false); 11562 webView->setInitialFocus(false);
11563 runPendingTasks(); 11563 runPendingTasks();
11564 11564
11565 WebMouseEvent mouseEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers, 11565 WebMouseEvent mouseEvent(WebInputEvent::MouseDown, WebInputEvent::NoModifiers,
11566 WebInputEvent::TimeStampForTesting); 11566 WebInputEvent::TimeStampForTesting);
11567 11567
11568 mouseEvent.button = WebMouseEvent::Button::Right; 11568 mouseEvent.button = WebMouseEvent::Button::Right;
11569 mouseEvent.x = 10; 11569 mouseEvent.setPositionInWidget(10, 10);
11570 mouseEvent.y = 10;
11571 mouseEvent.clickCount = 1; 11570 mouseEvent.clickCount = 1;
11572 webView->handleInputEvent(WebCoalescedInputEvent(mouseEvent)); 11571 webView->handleInputEvent(WebCoalescedInputEvent(mouseEvent));
11573 runPendingTasks(); 11572 runPendingTasks();
11574 webViewHelper.reset(); 11573 webViewHelper.reset();
11575 return frame.getMenuData().editFlags & WebContextMenuData::CanSelectAll; 11574 return frame.getMenuData().editFlags & WebContextMenuData::CanSelectAll;
11576 } 11575 }
11577 11576
11578 TEST_F(WebFrameTest, ContextMenuData) { 11577 TEST_F(WebFrameTest, ContextMenuData) {
11579 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); 11578 EXPECT_FALSE(testSelectAll("<textarea></textarea>"));
11580 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); 11579 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>"));
(...skipping 17 matching lines...) Expand all
11598 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page"); 11597 FrameTestHelpers::loadFrame(localFrame, "data:text/html,some page");
11599 11598
11600 // Local frame with remote parent should have transparent baseBackgroundColor. 11599 // Local frame with remote parent should have transparent baseBackgroundColor.
11601 Color color = localFrame->frameView()->baseBackgroundColor(); 11600 Color color = localFrame->frameView()->baseBackgroundColor();
11602 EXPECT_EQ(Color::transparent, color); 11601 EXPECT_EQ(Color::transparent, color);
11603 11602
11604 view->close(); 11603 view->close();
11605 } 11604 }
11606 11605
11607 } // namespace blink 11606 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698