Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/inert/inert-focus-in-frames.html

Issue 2088453002: Implement the inert attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up some tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/inert/inert-focus-in-frames.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-focus-in-frames.html b/third_party/WebKit/LayoutTests/fast/dom/inert/inert-focus-in-frames.html
similarity index 66%
copy from third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-focus-in-frames.html
copy to third_party/WebKit/LayoutTests/fast/dom/inert/inert-focus-in-frames.html
index 92fa36a096fcbb9097c487eeeb025dc1961c794e..c28649043a65190a2f32fd0ccf0bb634a0a37e0d 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/HTMLDialogElement/inert-focus-in-frames.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/inert/inert-focus-in-frames.html
@@ -8,12 +8,14 @@ if (window.testRunner)
testRunner.waitUntilDone();
</script>
</head>
+<div inert>
<iframe height=400 width=600 id="main-iframe">
<frameset rows="*" cols="50,50">
<frame src="resources/inert-focus-in-frames-frame1.html">
<frame src='data:text/html,<div id="frame2-div" class="target" tabindex="0">Hello</div>'>
</frameset>
</iframe>
+</div>
<script>
framesLoaded = 0;
numFrames = 4;
@@ -34,27 +36,11 @@ function testFocus(element, expectFocus) {
}
function test() {
- debug('Opening a modal dialog in frame1. It blocks other nodes in its document.');
var frame1 = mainIframe.contentWindow.frames[0].document;
- frame1.querySelector('dialog').showModal();
-
testFocus(frame1.querySelector('.target'), false);
var iframe = frame1.querySelector('iframe').contentDocument;
testFocus(iframe.querySelector('.target'), false);
- debug('Even a modal dialog in the iframe is blocked by the modal dialog in the parent frame1.');
- iframe.querySelector('dialog').showModal();
- testFocus(iframe.querySelector('button'), false);
-
- debug('A modal dialog does not block nodes in a sibling frame.');
- var frame2 = mainIframe.contentWindow.frames[1].document;
- testFocus(frame2.querySelector('.target'), true);
-
- debug('Closing the dialog in frame1. The modal dialog in the iframe does not block nodes in its parent.');
- frame1.querySelector('dialog').close();
- testFocus(iframe.querySelector('.target'), false);
- testFocus(frame1.querySelector('.target'), true);
-
if (window.testRunner)
testRunner.notifyDone();
}

Powered by Google App Engine
This is Rietveld 408576698