Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Upgrade JSLint to the commit we were using before switching to a submodule #4642

Merged
merged 2 commits into from
Aug 2, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/extensions/default/JSLint/thirdparty/jslint
18 changes: 10 additions & 8 deletions test/spec/CSSUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -973,10 +973,10 @@ define(function (require, exports, module) {

// Braces inside string; string inside rule (not inside selector)
css = "a::after { content: ' {' attr(href) '}'; } \n" +
".foo { color:red } \n" +
"a::after { content: \" {\" attr(href) \"}\"; } \n" +
"li::before { content: \"} h4 { color:black }\"; } \n" +
"div { color:green }";
".foo { color:red } \n" +
"a::after { content: \" {\" attr(href) \"}\"; } \n" +
"li::before { content: \"} h4 { color:black }\"; } \n" +
"div { color:green }";

result = match(css, { tag: "a" });
expect(result.length).toBe(2);
Expand All @@ -999,7 +999,8 @@ define(function (require, exports, module) {
expect(result.length).toBe(1);

css = "@import \"null?\\\"{\"; \n" + // a real-world CSS hack similar to the above case
"div { color: red }";
"div { color: red }";

result = match(css, { tag: "div" });
expect(result.length).toBe(1);

Expand Down Expand Up @@ -1051,9 +1052,10 @@ define(function (require, exports, module) {
expect(result.length).toBe(1);

css = ".foo\n" +
"{\n" +
" color: red;\n" +
"}";
"{\n" +
" color: red;\n" +
"}";

result = match(css, { clazz: "foo" });
expect(result.length).toBe(1);
});
Expand Down
36 changes: 16 additions & 20 deletions test/spec/Menu-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,19 @@ define(function (require, exports, module) {

function getBounds(object) {
return {
left: object.offset().left,
top: object.offset().top,
right: object.offset().left + object.width(),
bottom: object.offset().top + object.height()
left : object.offset().left,
top : object.offset().top,
right : object.offset().left + object.width(),
bottom : object.offset().top + object.height()
};
}

function boundsInsideWindow(object) {
var bounds = getBounds(object);
return (
bounds.left >= 0 &&
bounds.right <= $(testWindow).width() &&
bounds.top >= 0 &&
bounds.bottom <= $(testWindow).height()
);
return bounds.left >= 0 &&
bounds.right <= $(testWindow).width() &&
bounds.top >= 0 &&
bounds.bottom <= $(testWindow).height();
}

it("context menu is not clipped", function () {
Expand Down Expand Up @@ -762,21 +760,19 @@ define(function (require, exports, module) {

function getBounds(object) {
return {
left: object.offset().left,
top: object.offset().top,
right: object.offset().left + object.width(),
bottom: object.offset().top + object.height()
left : object.offset().left,
top : object.offset().top,
right : object.offset().left + object.width(),
bottom : object.offset().top + object.height()
};
}

function boundsInsideWindow(object) {
var bounds = getBounds(object);
return (
bounds.left >= 0 &&
bounds.right <= $(testWindow).width() &&
bounds.top >= 0 &&
bounds.bottom <= $(testWindow).height()
);
return bounds.left >= 0 &&
bounds.right <= $(testWindow).width() &&
bounds.top >= 0 &&
bounds.bottom <= $(testWindow).height();
}

it("context menu is not clipped", function () {
Expand Down