Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: LayoutTests/fast/dom/css-element-attribute-js-null.html

Issue 107313004: Remove TreatNullAs=NullString for CSS*Rule (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/css-element-attribute-js-null-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/css-element-attribute-js-null.html
diff --git a/LayoutTests/fast/dom/css-element-attribute-js-null.html b/LayoutTests/fast/dom/css-element-attribute-js-null.html
index e0f1a89c273b1c72f70e7faa79cc1b5501b37025..becc945b0d5a8dd8c85357b58163e14f037a7245 100644
--- a/LayoutTests/fast/dom/css-element-attribute-js-null.html
+++ b/LayoutTests/fast/dom/css-element-attribute-js-null.html
@@ -9,7 +9,12 @@
@media screen {
.bar { color: blue; }
}
- </style>
+ @keyframes name { }
+ @page { }
+ </style>
+ <!-- @charset must be the first rule per spec, and additionally
+ with no leading whitespace per our parser. -->
+ <style>@charset "UTF-8";</style>
<script>
function printOut(msg) {
var console = document.getElementById("console");
@@ -47,31 +52,52 @@
if (window.testRunner)
testRunner.dumpAsText();
- var rules = document.getElementsByTagName('style')[1].sheet.cssRules;
+ var rules = document.styleSheets[1].cssRules;
- var rule = rules.item(0);
+ var rule = rules[0];
+ var mediaRule = rules[1];
+ var keyframesRule = rules[2];
+ var pageRule = rules[3];
+ var charsetRule = document.styleSheets[2].cssRules[0];
var style = rule.style;
var value = style.getPropertyCSSValue('color');
- var mediaList = rules.item(1).media;
-
+ var mediaList = mediaRule.media;
var listing = [
{
type: 'CSSRule',
elementToUse: rule,
attributes: [
- // for now, setting cssText does not doing anything. When it gets implemented, the expectedNull
- // should become the empty string.
+ // 'null' is not a valid rule, so the setter does nothing.
{name: 'cssText', expectedNull: '.foo { color: black; }'}
]
},
{
+ type: 'CSSCharsetRule',
+ elementToUse: charsetRule,
+ attributes: [
+ {name: 'encoding', expectedNull: 'null'}
+ ]
+ },
+ {
+ type: 'CSSKeyframesRule',
+ elementToUse: keyframesRule,
+ attributes: [
+ {name: 'name', expectedNull: 'null'}
+ ]
+ },
+ {
+ type: 'CSSPageRule',
+ elementToUse: pageRule,
+ attributes: [
+ {name: 'selectorText', expectedNull: '@page null'}
+ ]
+ },
+ {
type: 'CSSStyleRule',
elementToUse: rule,
attributes: [
- // for now, setting selectorText does not doing anything. When it gets implemented, the expectedNull
- // should become the empty string.
- {name: 'selectorText', expectedNull: '.foo'}
+ {name: 'selectorText', expectedNull: 'null'}
]
},
{
@@ -87,7 +113,7 @@
elementToUse: value,
attributes: [
// for now, setting cssText does not doing anything. When it gets implemented, the expectedNull
- // should become the empty string.
+ // should become the empty string.
{name: 'cssText', expectedNull: 'black'}
]
},
@@ -98,15 +124,8 @@
{name: 'mediaText', expectedNull: ''}
]
}
- // ,{
- // type: 'PageRule',
- // elementToUse: mediaList,
- // attributes: [
- // {name: 'cssText', expectedNull: ''}
- // ]
- // }
];
-
+
for (element in listing) {
var type = listing[element].type;
var elementToUse = listing[element].elementToUse;
« no previous file with comments | « no previous file | LayoutTests/fast/dom/css-element-attribute-js-null-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698