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

Side by Side Diff: LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js

Issue 692433003: Don't require getPropertyCSSValue in fast tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 description( 1 description(
2 'This tests the behavior of non-numeric values in contexts where the DOM has a n umeric parameter.' 2 'This tests the behavior of non-numeric values in contexts where the DOM has a n umeric parameter.'
3 ); 3 );
4 4
5 function nonNumericPolicy(template) 5 function nonNumericPolicy(template)
6 { 6 {
7 var x = 0; 7 var x = 0;
8 try { 8 try {
9 eval(template); 9 eval(template);
10 } catch (e) { 10 } catch (e) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return createCSSRuleList().item(0).style; 126 return createCSSRuleList().item(0).style;
127 } 127 }
128 128
129 function createCSSMediaRule() 129 function createCSSMediaRule()
130 { 130 {
131 var rule = createFromMarkup("<style>@media screen { a { text-weight: bold } }</style>").sheet.cssRules.item(0); 131 var rule = createFromMarkup("<style>@media screen { a { text-weight: bold } }</style>").sheet.cssRules.item(0);
132 rule.insertRule(ruleText, 0); 132 rule.insertRule(ruleText, 0);
133 return rule; 133 return rule;
134 } 134 }
135 135
136 function createCSSValueList()
137 {
138 // FIXME: Not working in Firefox, not sure why.
139 return createFromMarkup("<style>a { font-family: b, c }</style>").sheet.cssR ules.item(0).style.getPropertyCSSValue("font-family");
140 }
141
142 function createMediaList() 136 function createMediaList()
143 { 137 {
144 return createCSSMediaRule().media; 138 return createCSSMediaRule().media;
145 } 139 }
146 140
147 function createHTMLSelectElement() 141 function createHTMLSelectElement()
148 { 142 {
149 var select = document.createElement("select"); 143 var select = document.createElement("select");
150 select.options.add(document.createElement("option")); 144 select.options.add(document.createElement("option"));
151 return select; 145 return select;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 195
202 shouldBe("nonNumericPolicy('createCSSStyleDeclaration().item(x)')", "'any type a llowed'"); 196 shouldBe("nonNumericPolicy('createCSSStyleDeclaration().item(x)')", "'any type a llowed'");
203 197
204 // CSSStyleSheet 198 // CSSStyleSheet
205 199
206 shouldBe("nonNumericPolicy('createCSSStyleSheet().insertRule(ruleText, x)')", "' any type allowed'"); 200 shouldBe("nonNumericPolicy('createCSSStyleSheet().insertRule(ruleText, x)')", "' any type allowed'");
207 shouldBe("nonNumericPolicy('createCSSStyleSheet().deleteRule(x)')", "'any type a llowed (but not omitted)'"); 201 shouldBe("nonNumericPolicy('createCSSStyleSheet().deleteRule(x)')", "'any type a llowed (but not omitted)'");
208 shouldBe("nonNumericPolicy('createCSSStyleSheet().addRule(selector, styleText, x )')", "'any type allowed'"); 202 shouldBe("nonNumericPolicy('createCSSStyleSheet().addRule(selector, styleText, x )')", "'any type allowed'");
209 shouldBe("nonNumericPolicy('createCSSStyleSheet().removeRule(x)')", "'any type a llowed'"); 203 shouldBe("nonNumericPolicy('createCSSStyleSheet().removeRule(x)')", "'any type a llowed'");
210 204
211 // CSSValueList
212
213 shouldBe("nonNumericPolicy('createCSSValueList().item(x)')", "'any type allowed (but not omitted)'");
214
215 // Document 205 // Document
216 206
217 shouldBe("nonNumericPolicy('document.elementFromPoint(x, 0)')", "'any type allow ed'"); 207 shouldBe("nonNumericPolicy('document.elementFromPoint(x, 0)')", "'any type allow ed'");
218 shouldBe("nonNumericPolicy('document.elementFromPoint(0, x)')", "'any type allow ed'"); 208 shouldBe("nonNumericPolicy('document.elementFromPoint(0, x)')", "'any type allow ed'");
219 209
220 // Element 210 // Element
221 211
222 shouldBe("nonNumericPolicy('document.body.scrollLeft = x')", "'mixed'"); 212 shouldBe("nonNumericPolicy('document.body.scrollLeft = x')", "'mixed'");
223 shouldBe("nonNumericPolicy('document.body.scrollTop = x')", "'mixed'"); 213 shouldBe("nonNumericPolicy('document.body.scrollTop = x')", "'mixed'");
224 214
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre ntScale 623 ../../../../WebCore/svg/SVGSVGElement.idl: attribute float curre ntScale
634 624
635 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a; 625 ../../../../WebCore/svg/SVGMatrix.idl: attribute double a;
636 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b; 626 ../../../../WebCore/svg/SVGMatrix.idl: attribute double b;
637 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c; 627 ../../../../WebCore/svg/SVGMatrix.idl: attribute double c;
638 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d; 628 ../../../../WebCore/svg/SVGMatrix.idl: attribute double d;
639 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e; 629 ../../../../WebCore/svg/SVGMatrix.idl: attribute double e;
640 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f; 630 ../../../../WebCore/svg/SVGMatrix.idl: attribute double f;
641 631
642 */ 632 */
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/prototypes-expected.txt ('k') | LayoutTests/fast/dom/shadow/user-modify-inheritance.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698