Commit acf33020 authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Add testing for the scrolling attribute

The [1] CL added support for scrolling="noscroll" and
scrolling="off", but it did not add any testing of these two
values. These two values are explicitly called out in the spec [2],
so this CL adds testing.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2083595
[2] https://html.spec.whatwg.org/multipage/rendering.html#the-page

Bug: 1057454
Change-Id: I457e22ecbe28c4b0a50ec70ba62d2c32a6c348ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2085396
Commit-Queue: Mason Freed <masonfreed@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: default avatarFrédéric Wang <fwang@igalia.com>
Cr-Commit-Position: refs/heads/master@{#746542}
parent 0f3f22aa
<!DOCTYPE html> <!DOCTYPE html>
<title>iframe and the scrolling attributes</title> <title>iframe: changing the scrolling attribute</title>
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org"> <link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
<style>
iframe {
width: 100px;
height: 100px;
}
</style>
<p>These two iframes should *both* render with scrollbars:</p> <p>These two iframes should *both* render with scrollbars:</p>
<iframe style="height: 100px; width: 100px;" scrolling="unknown" <iframe src="support/big-page.html" scrolling="unknown"></iframe>
srcdoc="<div style='height: 200px; width: 200px; background: linear-gradient(135deg, red, blue);'></div>"></iframe> <iframe src="support/big-page.html" scrolling="unknown"></iframe>
<iframe style="height: 100px; width: 100px;" scrolling="unknown"
srcdoc="<div style='height: 200px; width: 200px; background: linear-gradient(135deg, red, blue);'></div>"></iframe>
<!DOCTYPE html>
<title>The scrolling attribute</title>
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
<style>
iframe {
width: 100px;
height: 100px;
}
</style>
<p>This page tests the behavior of the <tt>scrolling</tt> attribute on
<tt>&lt;iframe&gt;</tt> elements which contain a page large enough to need to
be scrolled.</p>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="no"></iframe>
<iframe src="support/big-page.html" scrolling="no"></iframe>
<iframe src="support/big-page.html" scrolling="no"></iframe>
<iframe src="support/big-page.html" scrolling="no"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<!DOCTYPE html>
<title>The scrolling attribute</title>
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-page">
<link rel="match" href="iframe-scrolling-attribute-values-ref.html">
<style>
iframe {
width: 100px;
height: 100px;
}
</style>
<p>This page tests the behavior of the <tt>scrolling</tt> attribute on
<tt>&lt;iframe&gt;</tt> elements which contain a page large enough to need to
be scrolled.</p>
<iframe src="support/big-page.html"></iframe>
<iframe src="support/big-page.html" scrolling></iframe>
<iframe src="support/big-page.html" scrolling=""></iframe>
<iframe src="support/big-page.html" scrolling="auto"></iframe>
<iframe src="support/big-page.html" scrolling="yes"></iframe>
<iframe src="support/big-page.html" scrolling="no"></iframe>
<iframe src="support/big-page.html" scrolling="noscroll"></iframe>
<iframe src="support/big-page.html" scrolling="off"></iframe>
<iframe src="support/big-page.html" scrolling="NoScRoLl"></iframe>
<iframe src="support/big-page.html" scrolling="bogus"></iframe>
<iframe src="support/big-page.html" scrolling="1234"></iframe>
<!DOCTYPE html> <!DOCTYPE html>
<title>iframe and the scrolling attributes</title> <title>iframe: changing the scrolling attribute</title>
<link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org"> <link rel="author" title="Mason Freed" href="mailto:masonfreed@chromium.org">
<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-page"> <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#the-page">
<link rel="match" href="iframe-scrolling-attribute-ref.html"> <link rel="match" href="iframe-scrolling-attribute-ref.html">
<style>
iframe {
width: 100px;
height: 100px;
}
</style>
<p>These two iframes should *both* render with scrollbars:</p> <p>These two iframes should *both* render with scrollbars:</p>
<iframe style="height: 100px; width: 100px;" scrolling="unknown" <iframe src="support/big-page.html" scrolling="unknown"></iframe>
srcdoc="<div style='height: 200px; width: 200px; background: linear-gradient(135deg, red, blue);'></div>"></iframe> <iframe src="support/big-page.html" scrolling="unknown"></iframe>
<iframe style="height: 100px; width: 100px;" scrolling="unknown"
srcdoc="<div style='height: 200px; width: 200px; background: linear-gradient(135deg, red, blue);'></div>"></iframe>
<script> <script>
var iframe = document.getElementsByTagName("iframe")[1]; var iframe = document.getElementsByTagName("iframe")[1];
......
<p>Scroll me</p>
<div style="width: 400px; height: 400px; background-color: blue"></div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment