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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/scrolling/doc-write-to-iframe.html

Issue 2797783002: Add a test for document.write() to iframe that should not cause scrolling
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <style>
7 html, body { height: 10000px; }
8 </style>
9 </head>
10 <body>
11 <h1>doc.write() to iframe should not cause scrolling of the parent</h1>
12 <script>
13 var t = async_test('doc.write() to iframe should not cause ' +
14 'scrolling of the parent');
15 var isFirstTime = true;
16
17 function doTest() {
18 if (!isFirstTime)
19 return;
20 isFirstTime = false;
21
22 setTimeout(t.step_func(function() {
23 var iframe = document.getElementById('iframe');
24 var doc = iframe.contentWindow.document;
25 doc.open();
26 doc.write("Hello");
27 doc.close();
28
29 assert_equals(scrollY, 0);
30 t.done();
31 }), 1000);
32 }
33
34 if (!location.href.endsWith('#')) {
35 location.href += '#';
36 }
37 </script>
38 <iframe id="iframe" onload="doTest()"></iframe>
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698