| 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 11474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |