Permalink
Browse files

Merge branch 'line_numbers' into gh-pages

Conflicts:
	test/vendor/qunit.js
  • Loading branch information...
NV committed Feb 6, 2011
2 parents d9ccbbc + 26ba912 commit a45905c06db75d16ba973b0b8af3b23231563a24
Showing with 149 additions and 52 deletions.
  1. +6 −0 lib/parse.js
  2. +2 −3 test/helper.js
  3. +18 −0 test/parse.test.js
  4. +123 −49 test/vendor/qunit.js
View
@@ -69,6 +69,9 @@ CSSOM.parse = function parse(token, options) {
}
buffer += token.slice(i, index);
i = index - 1;
if (state == 'before-value') {
state = 'value';
}
break;
case "'":
@@ -79,6 +82,9 @@ CSSOM.parse = function parse(token, options) {
}
buffer += token.slice(i, index);
i = index - 1;
if (state == 'before-value') {
state = 'value';
}
break;
// Comment
View
@@ -90,8 +90,7 @@ function subsetOfOwnProperties(base, another) {
* @param {string} [message]
*/
function compare(css, expected, message) {
var actual = CSSOM.parse(css);
test(css, function(){
equalOwnProperties(actual, expected, message || "");
test(css, function() {
equalOwnProperties(CSSOM.parse(css), expected, message || "");
});
}
View
@@ -89,6 +89,24 @@ var TESTS = [
]
}
},
{
input: "h3 {font-family: 'times new roman'} ",
result: {
cssRules: [
{
selectorText: "h3",
style: {
0: "font-family",
'font-family': "'times new roman'",
__starts: 3,
length: 1
},
__starts: 0,
__ends: 35
}
]
}
},
{
input: ".icon>*{background-image: url(../images/ramona_strong.gif);}",
result: {
Oops, something went wrong.

0 comments on commit a45905c

Please sign in to comment.