Add a regression test for pseudo-element restyles.

This commit is contained in:
Emilio Cobos Álvarez 2016-08-09 14:59:08 -07:00
parent a36762a9a2
commit 2c321015e9
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 49 additions and 0 deletions

View file

@ -4420,6 +4420,18 @@
"url": "/_mozilla/css/pseudo_element_a.html"
}
],
"css/pseudo_element_restyle_no_rules.html": [
{
"path": "css/pseudo_element_restyle_no_rules.html",
"references": [
[
"/_mozilla/css/pseudo_element_restyle_no_rules_ref.html",
"=="
]
],
"url": "/_mozilla/css/pseudo_element_restyle_no_rules.html"
}
],
"css/pseudo_inherit.html": [
{
"path": "css/pseudo_inherit.html",
@ -13586,6 +13598,18 @@
"url": "/_mozilla/css/pseudo_element_a.html"
}
],
"css/pseudo_element_restyle_no_rules.html": [
{
"path": "css/pseudo_element_restyle_no_rules.html",
"references": [
[
"/_mozilla/css/pseudo_element_restyle_no_rules_ref.html",
"=="
]
],
"url": "/_mozilla/css/pseudo_element_restyle_no_rules.html"
}
],
"css/pseudo_inherit.html": [
{
"path": "css/pseudo_inherit.html",

View file

@ -0,0 +1,20 @@
<!doctype html>
<meta charset="utf-8">
<title>Pseudo-Element is restyled correctly when matching rules become empty</title>
<link rel="match" href="pseudo_element_restyle_no_rules_ref.html">
<style>
p.whatever::before { content: " hey "; }
</style>
<p>
test.
<script>
var p = document.querySelector('p');
var toggle = function() {
p.className = p.className == "whatever" ? "" : "whatever";
};
toggle();
// Ensure a restyle happens.
p.offsetTop;
toggle()
</script>

View file

@ -0,0 +1,5 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test reference.</title>
<p>
test.