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

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

Issue 2801093002: Clear hash when setting URL in document.open (Closed)
Patch Set: Clear hash for document.open 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 html, body { height: 10000px; }
6 </style>
7 <h1>doc.write() to iframe should not cause scrolling of the parent</h1>
8 <script>
9 var t = async_test('doc.write() to iframe should not cause ' +
10 'scrolling of the parent');
11 var isFirstTime = true;
12
13 function doTest() {
14 if (!isFirstTime)
15 return;
16 isFirstTime = false;
17
18 requestAnimationFrame(t.step_func(function() {
19 var iframe = document.getElementById('iframe');
20 var doc = iframe.contentWindow.document;
21 doc.open();
22 doc.write("Hello");
23 doc.close();
24
25 assert_equals(scrollY, 0);
26 t.done();
27 }));
28 }
29
30 if (!location.href.endsWith('#')) {
31 location.href += '#';
32 }
33 </script>
34 <iframe id="iframe" onload="doTest()"></iframe>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | third_party/WebKit/Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698