<!doctype html>
<html>
<head>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
.to_be_shown {
display:none;
color:green;
}
.to_be_hidden {
display:block;
color:red;
}
</style>
<style>
/* page rule must not interfere with non-page rules */
#test1 {
display:none;
}
@page {
#test1 {
display:block;
}
@top-center {
content:"Test";
display:block;
}
#test2 {
display:block;
}
}
#test2 {
display:none;
}
</style>
<style>
/* Malformed page rule must not interfere with non-page rules as far as braces are paired properly */
@page {
p:before {
content:"malformed
}
@top-left
}
#test3 {
display:none;
}
</style>
<style>
/* Successfully parsed */
#last {
display:block;
}
</style>
</head>
<body>
<div class="to_be_hidden" id="test1">FAIL: Test 1</div>
<div class="to_be_hidden" id="test2">FAIL: Test 2</div>
<div class="to_be_hidden" id="test3">FAIL: Test 3</div>
<div class="to_be_shown" id="last">PASS</div>
</body>
</html>