Update CSS tests to revision 0698c2aa9ead844b6d7d10eafb096cb1118e13ef

This commit is contained in:
Ms2ger 2015-12-09 01:48:05 -05:00
parent 9aa1b1e408
commit 35c74aecc2
11290 changed files with 92400 additions and 49214 deletions

View file

@ -8,17 +8,17 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id="s-0">
@namespace svg "http://www.w3.org/2000/svg";
@namespace svg "http://www.w3.org/2000/svg";
</style>
<style id="s-1">
@import url('main.css');
@import url('main.css');
</style>
<style id="s-2">
<style id="s-2">
h1 { background: indianred; }
</style>
</style>
<style id="s-3">
@namespace svg "http://www.w3.org/2000/svg";
svg|a { color: white; }
@namespace svg "http://www.w3.org/2000/svg";
svg|a { color: white; }
</style>
<style id="s-4">
@font-face {
@ -30,7 +30,7 @@
url('fonts/megalopolisextra-webfont.svg#MEgalopolisExtraRegular') format('svg');
font-weight: normal;
font-style: normal;
}
}
</style>
<style id="s-5">
@media (min-width: 200px) {
@ -42,14 +42,14 @@
h1 { color: #444; }
}
</style>
</head>
</head>
<body>
<div id="log"></div>
<div id="log"></div>
<script>
var stylesheets = document.styleSheets;
var ruletypes = {
1: 'Style Rule',
3: '@import rule',
3: '@import rule',
4: 'media rule',
5: '@font-face rule',
6: 'page rule',
@ -67,28 +67,28 @@
's-6': '@page :first'
}
var ruleOrder = [10, 3, 1, 1, 5, 4, 6];
var ruleOrder = [10, 3, 1, 1, 5, 4, 6];
var results = [];
for (i = 0; i < stylesheets.length; i++) {
for (i = 0; i < stylesheets.length; i++) {
if(i == 3) {
cssType = stylesheets[i].cssRules.length > 0 && stylesheets[i].cssRules[1] ? stylesheets[i].cssRules[1].type : 11;
cssType = stylesheets[i].cssRules.length > 0 && stylesheets[i].cssRules[1] ? stylesheets[i].cssRules[1].type : 11;
} else {
cssType = stylesheets[i].cssRules.length > 0 ? stylesheets[i].cssRules[0].type : 11;
cssType = stylesheets[i].cssRules.length > 0 ? stylesheets[i].cssRules[0].type : 11;
}
results.push([
ruletypes[ruleOrder[i]] + ' is expected to be ' + types['s-' + i],
ruletypes[cssType],
ruletypes[ruleOrder[i]]
]);
]);
}
generate_tests(assert_equals, results);
generate_tests(assert_equals, results);
</script>