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

Commit

Permalink
Merge pull request #4642 from TomMalbran/tom/jslint-pre-update
Browse files Browse the repository at this point in the history
Change JSLint back to the commit we were using before switching to a submodule
  • Loading branch information
peterflynn committed Aug 2, 2013
2 parents e921555 + 88948cf commit c2af2b6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
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

0 comments on commit c2af2b6

Please sign in to comment.