| Index: Source/web/tests/WebViewTest.cpp
|
| diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
|
| index 5e6169a87cc858d442d3f49ae791a1d2665ebcb5..f300d0f3f64726f2943e68da8a1fa7f6f2c71db8 100644
|
| --- a/Source/web/tests/WebViewTest.cpp
|
| +++ b/Source/web/tests/WebViewTest.cpp
|
| @@ -1227,4 +1227,18 @@ TEST_F(WebViewTest, DispatchesDomFocusOutDomFocusInOnViewToggleFocus)
|
| EXPECT_STREQ("DOMFocusOutDOMFocusIn", element.innerText().utf8().data());
|
| }
|
|
|
| +TEST_F(WebViewTest, DispatchesFocusBlurOnViewToggle)
|
| +{
|
| + URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), "focus_blur_events.html");
|
| + WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "focus_blur_events.html", true, 0);
|
| +
|
| + webView->setFocus(true);
|
| + webView->setFocus(false);
|
| + webView->setFocus(true);
|
| +
|
| + WebElement element = webView->mainFrame()->document().getElementById("message");
|
| + // Expect not to see duplication of events.
|
| + EXPECT_STREQ("blurfocus", element.innerText().utf8().data());
|
| +}
|
| +
|
| }
|
|
|