зеркало из https://github.com/mozilla/gecko-dev.git
Bug 951793 - Add a test for the pref that controls overscroll-behavior. r=emilio
MozReview-Commit-ID: 9qIuF1Vdsm4
This commit is contained in:
Родитель
d42b78ef86
Коммит
94aad98f21
|
@ -255,6 +255,7 @@ skip-if = android_version == '18' #debug-only failure; timed out #Android 4.3 aw
|
|||
[test_namespace_rule.html]
|
||||
[test_non_content_accessible_properties.html]
|
||||
[test_of_type_selectors.xhtml]
|
||||
[test_overscroll_behavior_pref.html]
|
||||
[test_page_parser.html]
|
||||
[test_parse_eof.html]
|
||||
[test_parse_ident.html]
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Test pref for overscroll-behavior property</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
</head>
|
||||
<script class="testbody" type="text/javascript">
|
||||
function runTest() {
|
||||
let css = "div { overscroll-behavior: auto; }";
|
||||
let style = document.createElement('style');
|
||||
style.appendChild(document.createTextNode(css));
|
||||
document.head.appendChild(style);
|
||||
|
||||
is(document.styleSheets[0].cssRules[0].style.length,
|
||||
0,
|
||||
"overscroll-behavior shouldn't be parsed if the pref is off");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SpecialPowers.pushPrefEnv({ set: [["layout.css.overscroll-behavior.enabled", false]] },
|
||||
runTest);
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
</script>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче