Skip to content

Commit

Permalink
Issue #813. Make fixes related to whitespace and consistent strings m…
Browse files Browse the repository at this point in the history
…ostly.
  • Loading branch information
Mike Taylor committed Nov 4, 2015
1 parent 2d53cbc commit 11007b3
Show file tree
Hide file tree
Showing 11 changed files with 320 additions and 320 deletions.
2 changes: 1 addition & 1 deletion tests/functional/comments-non-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define([
.get(require.toUrl(url('/issues/200')))
.findByCssSelector('.wc-Comment--form')
.then(assert.fail, function(err) {
assert.isTrue(/NoSuchElement/.test(String(err)));
assert.isTrue(/NoSuchElement/.test(String(err)));
})
.end();
}
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/issue-list-non-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ define([
.end()
.findByCssSelector('.repo-container .issues-listing')
.then(assert.fail, function(err) {
assert.isTrue(/NoSuchElement/.test(String(err)));
assert.isTrue(/NoSuchElement/.test(String(err)));
})
.end();
},
Expand All @@ -170,8 +170,8 @@ define([
},

'Loading partial params results in merge with defaults': function() {
var params = '?page=2';
return this.remote
var params = '?page=2';
return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
.get(require.toUrl(url('/issues') + params))
// find something so we know the page has loaded
Expand Down Expand Up @@ -237,7 +237,7 @@ define([
},

'Loading URL with stage param loads issues': function() {
var params = "?page=1&per_page=50&state=open&stage=new&sort=created&direction=desc";
var params = '?page=1&per_page=50&state=open&stage=new&sort=created&direction=desc';

return this.remote
.setFindTimeout(intern.config.wc.pageLoadTimeout)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/search-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ define([
assert.include(currUrl, 'page=1', 'Default params got merged.');
})
.end();
}
}
});
});
4 changes: 2 additions & 2 deletions tests/functional/search-non-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define([
.end()
.findByCssSelector('.repo-container .issues-listing')
.then(assert.fail, function(err) {
assert.isTrue(/NoSuchElement/.test(String(err)));
assert.isTrue(/NoSuchElement/.test(String(err)));
})
.end();
},
Expand Down Expand Up @@ -100,6 +100,6 @@ define([
assert.include(currUrl, 'page=1', 'Default params got merged.');
})
.end();
}
}
});
});
2 changes: 1 addition & 1 deletion tests/functional/user-activity-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define([
.get(require.toUrl(url('/me')))
.findByCssSelector('.wc-content--body .wc-Title--l').getVisibleText()
.then(function(text){
var usernameEnd = text.indexOf("'s activity");
var usernameEnd = text.indexOf('\'s activity');
username = text.slice(0, usernameEnd);
})
.getCurrentUrl()
Expand Down
20 changes: 10 additions & 10 deletions webcompat/static/js/lib/bugform.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ function BugForm() {
this.checkParams = function() {
// Assumes a URI like: /?open=1&url=http://webpy.org/, for use by addons
// Quick sanity check
if (!location.search.search(/open=1/) && !location.search.search(/url=/)) {
return;
}
var urlParam = location.search.match(/url=(.+)/);
if (urlParam != null) {
if (!location.search.search(/open=1/) && !location.search.search(/url=/)) {
return;
}
var urlParam = location.search.match(/url=(.+)/);
if (urlParam != null) {
// weird Gecko bug. See https://bugzilla.mozilla.org/show_bug.cgi?id=1098037
urlParam = this.trimWyciwyg(urlParam[1]);
this.urlField.val(decodeURIComponent(urlParam));
this.copyURL();
this.makeValid('url');
urlParam = this.trimWyciwyg(urlParam[1]);
this.urlField.val(decodeURIComponent(urlParam));
this.copyURL();
this.makeValid('url');
}
};

Expand Down Expand Up @@ -110,7 +110,7 @@ function BugForm() {
/* Check to see that the URL input element is not empty.
We don't do any other kind of validation yet. */
this.checkURLValidity = function() {
if ($.trim(this.urlField.val()) === "") {
if ($.trim(this.urlField.val()) === '') {
this.makeInvalid('url');
} else {
this.makeValid('url');
Expand Down
Loading

0 comments on commit 11007b3

Please sign in to comment.