Chromium Code Reviews| Index: Source/web/tests/WebInputEventConversionTest.cpp |
| diff --git a/Source/web/tests/WebInputEventConversionTest.cpp b/Source/web/tests/WebInputEventConversionTest.cpp |
| index fa506bcd4c0578ea5fc6d718c8d50c630f6b3c6f..9f87882aa19e3a308ef514ae5482be125fe69b2f 100644 |
| --- a/Source/web/tests/WebInputEventConversionTest.cpp |
| +++ b/Source/web/tests/WebInputEventConversionTest.cpp |
| @@ -57,13 +57,24 @@ namespace { |
| PassRefPtrWillBeRawPtr<KeyboardEvent> createKeyboardEventWithLocation(KeyboardEvent::KeyLocationCode location) |
| { |
| - return KeyboardEvent::create("keydown", true, true, 0, "", location, false, false, false, false); |
| + return KeyboardEvent::create("keydown", true, true, 0, "", "", location, false, false, false, false); |
| } |
| int getModifiersForKeyLocationCode(KeyboardEvent::KeyLocationCode location) |
| { |
| + const std::string baseURL("http://www.test0.com/"); |
| + const std::string fileName("fixed_layout.html"); |
| + |
| + URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(baseURL.c_str()), WebString::fromUTF8("fixed_layout.html")); |
| + FrameTestHelpers::WebViewHelper webViewHelper; |
| + WebViewImpl* webViewImpl = webViewHelper.initializeAndLoad(baseURL + fileName, true); |
|
Wez
2015/01/17 02:35:10
Do you need to tear this page down somewhere?
It
bokan
2015/01/20 17:05:58
Ditto here
Habib Virji
2015/01/22 16:01:30
Acknowledged.
|
| + int pageWidth = 640; |
| + int pageHeight = 480; |
| + webViewImpl->resize(WebSize(pageWidth, pageHeight)); |
| + webViewImpl->layout(); |
| + |
| RefPtrWillBeRawPtr<KeyboardEvent> event = createKeyboardEventWithLocation(location); |
| - WebKeyboardEventBuilder convertedEvent(*event); |
| + WebKeyboardEventBuilder convertedEvent(toLocalFrame(webViewImpl->page()->mainFrame())->view(), *event); |
| return convertedEvent.modifiers; |
| } |