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

Unified Diff: third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js

Issue 1475903002: Don't handle unitless length quirk in CSS parser fast path (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css-parser/unitless-length-quirk.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js
diff --git a/third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js b/third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js
index d0a9db37c55e834a0968690ebc048992459fb02e..109bbcd460d75fdee8f26d796b2b9fb72d9933cd 100644
--- a/third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js
+++ b/third_party/WebKit/LayoutTests/css-parser/resources/property-parsing-test.js
@@ -12,15 +12,19 @@ function convert_to_dashes(property) {
});
}
-function assert_valid_value(property, value, serializedValue) {
- if (arguments.length != 3)
+function assert_valid_value(property, value, serializedValue, quirksModeOnly) {
+ if (arguments.length < 4)
+ quirksModeOnly = false;
+
+ if (arguments.length < 3)
serializedValue = value;
stringifiedValue = JSON.stringify(value);
+ dashedProperty = convert_to_dashes(property);
test(function(){
- assert_true(CSS.supports(convert_to_dashes(property), value));
- }, "CSS.supports('" + property + "', " + stringifiedValue + ") should return true");
+ assert_equals(!quirksModeOnly, CSS.supports(dashedProperty, value));
+ }, "CSS.supports('" + dashedProperty + "', " + stringifiedValue + ") should return " + !quirksModeOnly);
test(function(){
var div = document.createElement('div');
@@ -40,10 +44,11 @@ function assert_valid_value(property, value, serializedValue) {
function assert_invalid_value(property, value) {
stringifiedValue = JSON.stringify(value);
+ dashedProperty = convert_to_dashes(property);
test(function(){
- assert_false(CSS.supports(convert_to_dashes(property), value));
- }, "CSS.supports('" + property + "', " + stringifiedValue + ") should return false");
+ assert_false(CSS.supports(dashedProperty, value));
+ }, "CSS.supports('" + dashedProperty + "', " + stringifiedValue + ") should return false");
test(function(){
var div = document.createElement('div');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/css-parser/unitless-length-quirk.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698