OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "domfocusou
t_domfocusin_events.html", true, 0); | 1220 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "domfocusou
t_domfocusin_events.html", true, 0); |
1221 | 1221 |
1222 webView->setFocus(true); | 1222 webView->setFocus(true); |
1223 webView->setFocus(false); | 1223 webView->setFocus(false); |
1224 webView->setFocus(true); | 1224 webView->setFocus(true); |
1225 | 1225 |
1226 WebElement element = webView->mainFrame()->document().getElementById("messag
e"); | 1226 WebElement element = webView->mainFrame()->document().getElementById("messag
e"); |
1227 EXPECT_STREQ("DOMFocusOutDOMFocusIn", element.innerText().utf8().data()); | 1227 EXPECT_STREQ("DOMFocusOutDOMFocusIn", element.innerText().utf8().data()); |
1228 } | 1228 } |
1229 | 1229 |
| 1230 TEST_F(WebViewTest, DispatchesFocusBlurOnViewToggle) |
| 1231 { |
| 1232 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c
_str()), "focus_blur_events.html"); |
| 1233 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "focus_blur
_events.html", true, 0); |
| 1234 |
| 1235 webView->setFocus(true); |
| 1236 webView->setFocus(false); |
| 1237 webView->setFocus(true); |
| 1238 |
| 1239 WebElement element = webView->mainFrame()->document().getElementById("messag
e"); |
| 1240 // Expect not to see duplication of events. |
| 1241 EXPECT_STREQ("blurfocus", element.innerText().utf8().data()); |
1230 } | 1242 } |
| 1243 |
| 1244 } |
OLD | NEW |