Bug 1874986: Fixups for nits/cosmetic issues in WPT client-props-zoom.html. r=TYLin

This patch doesn't change the behavior (or pass/fail status) of the test at
all; it's just fixing some issues in the test that trigger parser errors and/or
make the test results hard to read.

Overview of the fixes:
- Removing a stray quote character (near the start) and a stray comma (in the
  middle of an element's attribute list).
- Wrapping the test content in an element that we can use to scope the rules,
  so that we don't end up with a generic 'div' css selector that inadvertently
  targets the test-results divs that the harness appends to the page.
- Removing the 'head' element since it's unnecessary and was being opened later
  than appropriate (after head content had already begun).
- Changing a background color from blue to cyan so that black text remains
  readable.
- Adding a newline at the end of the file.

Differential Revision: https://phabricator.services.mozilla.com/D198751
This commit is contained in:
Daniel Holbert 2024-01-17 03:47:26 +00:00
Родитель 7a67d2d5a0
Коммит 8a40de016a
1 изменённых файлов: 13 добавлений и 15 удалений

Просмотреть файл

@ -2,23 +2,21 @@
<title>Client properties for elements with css zoom</title>
<link rel="author" title="Yotam Hacohen" href="mailto:yotha@chromium.org">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://drafts.csswg.org/css-viewport/">"
<link rel="help" href="https://drafts.csswg.org/css-viewport/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<head>
<style>
div {
<style>
.test_content div {
width: 64px;
height: 64px;
background-color: blue
background-color: cyan;
}
div.x4_zoom {
.test_content div.x4_zoom {
zoom: 4.0;
}
</style>
</head>
<body>
</style>
<body>
<div class="test_content">
<div id="no_zoom"></div>
<div class="x4_zoom" id="element_with_zoom"></div>
@ -27,11 +25,11 @@
<div>
<div id="indirect_child_of_element_with_zoom"></div>
</div>
<div class="x4_zoom", id="both_child_and_parent_has_zoom"></div>
<div class="x4_zoom" id="both_child_and_parent_has_zoom"></div>
</div>
</div>
<script>
<script>
setup(() => {
window.noZoom = document.getElementById("no_zoom");
});
@ -50,5 +48,5 @@
compareObjectToDivWithNoZoom(document.getElementById("indirect_child_of_element_with_zoom"));
compareObjectToDivWithNoZoom(document.getElementById("both_child_and_parent_has_zoom"));
});
</script>
</body>
</script>
</body>