1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/first-letter/dynamic-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>CSS 2.1 Test Suite: :first-letter</title> 1.8 + <link rel="author" title="Boris Zbarsky" href="mailto:bzbarsky@mit.edu" /> 1.9 + <link rel="author" title="Mozilla Corporation" href="http://mozilla.com/" /> 1.10 + <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-letter"/> 1.11 + <meta name="flags" content="dom" /> 1.12 +<script>function setTextContent(n, t) { n.textContent = t; } 1.13 + 1.14 +var stylesheets = []; 1.15 +function initFuzzerSpecific() 1.16 +{ 1.17 + var myStylesheetHolder = document.getElementsByTagName("head")[0]; 1.18 + 1.19 + for (var i = 0; i < 25; ++i) { 1.20 + var s = document.createElementNS("http://www.w3.org/1999/xhtml", 'style'); 1.21 + s.style.display = "none"; 1.22 + myStylesheetHolder.appendChild(s); 1.23 + stylesheets.push(s); 1.24 + } 1.25 +} 1.26 +</script> 1.27 +<style> 1.28 + span:before { content: open-quote; } 1.29 + span:after { content: close-quote; } 1.30 + span { quotes: '"' '"'; } 1.31 +</style> 1.32 +</head> 1.33 +<body> 1.34 + 1.35 +<p><span>Foo</span></p> 1.36 + 1.37 +<p id="p2"><span id="q2"></span></p> 1.38 + 1.39 +<script> 1.40 + document.body.offsetWidth; 1.41 + initFuzzerSpecific(); 1.42 + setTextContent(stylesheets[1], "*:after { border: 3px solid green; } :first-letter { color: green; }"); 1.43 + setTextContent(stylesheets[2], "*:before { counter-reset: chicken; }"); 1.44 +</script> 1.45 + 1.46 +</body> 1.47 +</html>