| Index: LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html
|
| diff --git a/LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html b/LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html
|
| index 94c7857cae6f14ba93a103895c70aab12c5cd69e..36034aa47718dfb1feffc21b59e43fcc349bccda 100644
|
| --- a/LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html
|
| +++ b/LayoutTests/fast/dom/shadow/focus-shadowhost-display-none.html
|
| @@ -22,12 +22,15 @@ function testFocusShadowHost() {
|
| shouldBeEqualToString('window.getComputedStyle(host).display', 'none');
|
| shouldBe('document.activeElement', 'host');
|
| shouldBeNull('root.activeElement');
|
| - window.requestAnimationFrame(function() {
|
| +
|
| + function onBlur() {
|
| shouldBeEqualToString('window.getComputedStyle(host).display', 'block');
|
| shouldBe('document.activeElement', 'document.body');
|
| shouldBeNull('root.activeElement');
|
| + host.removeEventListener('blur', onBlur);
|
| resolve();
|
| - });
|
| + }
|
| + host.addEventListener('blur', onBlur);
|
| });
|
| }
|
|
|
| @@ -41,12 +44,14 @@ function testFocusInsideShadowRoot() {
|
| shouldBe('document.activeElement', 'host');
|
| shouldBe('root.activeElement', 'input');
|
|
|
| - window.requestAnimationFrame(function() {
|
| + function onBlur() {
|
| shouldBeEqualToString('window.getComputedStyle(host).display', 'block');
|
| shouldBe('document.activeElement', 'document.body');
|
| shouldBeNull('root.activeElement');
|
| + input.removeEventListener('blur', onBlur);
|
| resolve();
|
| - });
|
| + }
|
| + input.addEventListener('blur', onBlur);
|
| });
|
| }
|
|
|
|
|