OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |