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

Unified 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: Rebase + Only clear hash on cross-frame 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/scrolling/doc-write-to-iframe.html
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/doc-write-to-iframe.html b/third_party/WebKit/LayoutTests/fast/scrolling/doc-write-to-iframe.html
new file mode 100644
index 0000000000000000000000000000000000000000..52c71a2a31529967d518a7a5f2119448664e11b5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/doc-write-to-iframe.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+ html, body { height: 10000px; }
+</style>
+<h1>doc.write() to iframe should not cause scrolling of the parent</h1>
+<script>
+ var t = async_test('doc.write() to iframe should not cause ' +
+ 'scrolling of the parent');
+ var isFirstTime = true;
+
+ function doTest() {
+ if (!isFirstTime)
+ return;
+ isFirstTime = false;
+
+ requestAnimationFrame(t.step_func(function() {
+ var iframe = document.getElementById('iframe');
+ var doc = iframe.contentWindow.document;
+ doc.open();
+ doc.write("Hello");
+ doc.close();
+
+ assert_equals(scrollY, 0);
+ t.done();
+ }));
+ }
+
+ if (!location.href.endsWith('#')) {
+ location.href += '#';
+ }
+</script>
+<iframe id="iframe" onload="doTest()"></iframe>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698