Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / frame-focus-send-blur.html
blobe4b00d9025ae723bd634f06457af263acefd83a1
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../resources/js-test.js"></script>
5 <iframe id="frame1" src="data:text/html,<input id='input'>" ></iframe>
6 <iframe id="frame2" src="data:text/html,<div>This is a iframe element</div>"></iframe>
7 <script>
8 description('Make sure that moving focus on an inactive frame fires blur event on existing element focus.');
9 var doc;
10 var input;
11 window.onload = function()
13 var frame1 = document.getElementById('frame1');
14 var frame2 = document.getElementById('frame2');
16 doc = frame1.contentDocument;
17 input = doc.querySelector('input');
18 input.onblur = function() {
19 testPassed('A blur event was dispatched on frame1 input element.');
21 input.onfocus = function() {
22 testPassed('A focus event was dispatched on frame1 input element.');
24 input.focus();
26 debug('===> Making a first frame with a focused element inactive by focus() for second frame.');
27 frame2.contentWindow.focus();
28 shouldBe('frame1.contentDocument.activeElement', 'input');
29 debug('===> Making the first frame active again by focus() for first frame.');
30 frame1.contentWindow.focus();
31 shouldBe('frame1.contentDocument.activeElement', 'input');
33 </script>
34 </body>
35 </html>