layout/reftests/font-face/delete-rule-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/font-face/delete-rule-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,42 @@
     1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
     1.5 +	"http://www.w3.org/TR/html4/strict.dtd">
     1.6 +<html lang="en-US" class="reftest-wait">
     1.7 +<head>
     1.8 +	<title></title>
     1.9 +	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    1.10 +	<style type="text/css">
    1.11 +
    1.12 +	@font-face {
    1.13 +		font-family: "MarkA";
    1.14 +		src: url(../fonts/markA.ttf);
    1.15 +	}
    1.16 +
    1.17 +	@font-face {
    1.18 +		font-family: "MarkB";
    1.19 +		src: url(../fonts/markB.ttf);
    1.20 +	}
    1.21 +
    1.22 +	body { font-family: "MarkA", "MarkB"; }
    1.23 +
    1.24 +	</style>
    1.25 +	<script type="application/ecmascript">
    1.26 +
    1.27 +	function run() {
    1.28 +		var sheet = document.getElementsByTagName("style")[0].sheet;
    1.29 +		for (var i = sheet.cssRules.length - 1; i >= 0; --i) {
    1.30 +			if (sheet.cssRules[i].type == CSSRule.FONT_FACE_RULE) {
    1.31 +				sheet.deleteRule(i);
    1.32 +			}
    1.33 +		}
    1.34 +
    1.35 +		document.documentElement.removeAttribute("class");
    1.36 +	}
    1.37 +
    1.38 +	</script>
    1.39 +</head>
    1.40 +<body onload="setTimeout(run, 20)">
    1.41 +
    1.42 +<p>ABC</p>
    1.43 +
    1.44 +</body>
    1.45 +</html>

mercurial