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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/selection/focus_editable_html_element_scroll.html

Issue 1806423003: Convert editing/selection layout tests to use w3c test harness, volume 6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html contenteditable>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <html contenteditable>
6 <body style="overflow:hidden;">
7 This test makes sure that we don't scroll unnecessarily to reveal an editable HT ML Element.
8 <br> If the document doesn't scroll, test passes.<br>
9 <b>This demonstrates a bug: normally, focusing an element will select its conten ts.</b>
10 <div style="width:2000px;height:2000px;"></div>
11 If the document scrolls here, test fails.
12 <div id="log"></div>
13 </body>
14 </html>
15 <script>
16 var test = async_test('focus to editable should not scroll');
17 document.documentElement.addEventListener('focus', function() {
18 assert_equals(document.body.scrollTop, 0);
19 test.done();
20 });
21 test.step(function() {
22 document.documentElement.focus();
23 });
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698