You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/06/02 10:28:20 UTC
svn commit: r950419 - in /shindig/trunk/features/src:
main/javascript/features/core.util/ test/javascript/features/core.io/
test/javascript/features/core/ test/javascript/features/opensocial-data/
test/javascript/features/osapi/
Author: lindner
Date: Wed Jun 2 08:28:20 2010
New Revision: 950419
URL: http://svn.apache.org/viewvc?rev=950419&view=rev
Log:
minor js cleanups -- remove trailing commas, add semicolons
Modified:
shindig/trunk/features/src/main/javascript/features/core.util/util.js
shindig/trunk/features/src/test/javascript/features/core.io/iotest.js
shindig/trunk/features/src/test/javascript/features/core/config-test.js
shindig/trunk/features/src/test/javascript/features/opensocial-data/datatest.js
shindig/trunk/features/src/test/javascript/features/osapi/osapitest.js
Modified: shindig/trunk/features/src/main/javascript/features/core.util/util.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/core.util/util.js?rev=950419&r1=950418&r2=950419&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/core.util/util.js (original)
+++ shindig/trunk/features/src/main/javascript/features/core.util/util.js Wed Jun 2 08:28:20 2010
@@ -37,15 +37,14 @@ gadgets['util'] = function() {
// Get settings from url, 'hash' takes precedence over 'search' component
// don't use document.location.hash due to browser differences.
var query;
- var l = url;
- var queryIdx = l.indexOf("?");
- var hashIdx = l.indexOf("#");
+ var queryIdx = url.indexOf("?");
+ var hashIdx = url.indexOf("#");
if (hashIdx === -1) {
- query = l.substr(queryIdx + 1);
+ query = url.substr(queryIdx + 1);
} else {
// essentially replaces "#" with "&"
- query = [l.substr(queryIdx + 1, hashIdx - queryIdx - 1), "&",
- l.substr(hashIdx + 1)].join("");
+ query = [url.substr(queryIdx + 1, hashIdx - queryIdx - 1), "&",
+ url.substr(hashIdx + 1)].join("");
}
return query.split("&");
}
Modified: shindig/trunk/features/src/test/javascript/features/core.io/iotest.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/core.io/iotest.js?rev=950419&r1=950418&r2=950419&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/core.io/iotest.js (original)
+++ shindig/trunk/features/src/test/javascript/features/core.io/iotest.js Wed Jun 2 08:28:20 2010
@@ -171,7 +171,7 @@ IoTest.prototype.testNoMethod_nonDefault
resp = data;
},
{
- "REFRESH_INTERVAL" : 1800,
+ "REFRESH_INTERVAL" : 1800
});
this.assertEquals('some data', resp.text);
};
@@ -194,7 +194,7 @@ IoTest.prototype.testNoMethod_disableRef
resp = data;
},
{
- "REFRESH_INTERVAL" : 0,
+ "REFRESH_INTERVAL" : 0
});
this.assertEquals('some data', resp.text);
};
@@ -772,7 +772,7 @@ IoTest.prototype.testServerFailure = fun
resp = data;
},
{
- "CONTENT_TYPE" : "JSON",
+ "CONTENT_TYPE" : "JSON"
});
this.assertEquals(500, resp.rc);
this.assertEquals(gadgets.json.stringify(["500 Error"]), gadgets.json.stringify(resp.errors));
@@ -800,7 +800,7 @@ IoTest.prototype.testJsonNonAuthoritativ
resp = data;
},
{
- "CONTENT_TYPE" : "JSON",
+ "CONTENT_TYPE" : "JSON"
});
this.assertEquals(3, resp.data.somejsonparam);
};
@@ -826,7 +826,7 @@ IoTest.prototype.testJson = function() {
resp = data;
},
{
- "CONTENT_TYPE" : "JSON",
+ "CONTENT_TYPE" : "JSON"
});
this.assertEquals(3, resp.data.somejsonparam);
};
@@ -852,7 +852,7 @@ IoTest.prototype.testJson_malformed = fu
resp = data;
},
{
- "CONTENT_TYPE" : "JSON",
+ "CONTENT_TYPE" : "JSON"
});
this.assertEquals("500 Failed to parse JSON", resp.errors[0]);
};
@@ -865,7 +865,7 @@ IoTest.prototype.testPreload = function(
"body" : "preloadedbody",
"headers": {
"set-cookie": ["foo=bar","baz=quux"],
- "location": ["somewhere"],
+ "location": ["somewhere"]
}
}
];
@@ -907,7 +907,7 @@ IoTest.prototype.testPreloadMiss_postReq
{
"id": "http://target.example.com/somepage",
"rc" : 200,
- "body" : "preloadedbody",
+ "body" : "preloadedbody"
}
];
@@ -943,7 +943,7 @@ IoTest.prototype.testPreloadMiss_wrongUr
{
"id": "http://target.example.com/somepage2",
"rc" : 200,
- "body" : "preloadedbody",
+ "body" : "preloadedbody"
}
];
@@ -971,7 +971,7 @@ IoTest.prototype.testPreload_error404 =
gadgets.io.preloaded_ = [
{
"id": "http://target.example.com/somepage",
- "rc" : 404,
+ "rc" : 404
}
];
@@ -1010,7 +1010,7 @@ IoTest.prototype.testPreload_oauthApprov
"id": "http://target.example.com/somepage",
"rc" : 200,
"oauthState" : "stateinfo",
- "oauthApprovalUrl" : "http://example.com/approve",
+ "oauthApprovalUrl" : "http://example.com/approve"
}
];
Modified: shindig/trunk/features/src/test/javascript/features/core/config-test.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/core/config-test.js?rev=950419&r1=950418&r2=950419&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/core/config-test.js (original)
+++ shindig/trunk/features/src/test/javascript/features/core/config-test.js Wed Jun 2 08:28:20 2010
@@ -174,7 +174,7 @@ ConfigTest.prototype.testLikeValidator =
key1: function(data) {
key1value = data;
return true;
- },
+ }
});
this.assertTrue(validator({key0:"Key0", key1: "Key1"}));
@@ -193,7 +193,7 @@ ConfigTest.prototype.testLikeValidatorWi
key1: function(data) {
key1value = data;
return true;
- },
+ }
});
this.assertFalse(validator({key0:"Key0", key1: "Key1"}));
Modified: shindig/trunk/features/src/test/javascript/features/opensocial-data/datatest.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/opensocial-data/datatest.js?rev=950419&r1=950418&r2=950419&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/opensocial-data/datatest.js (original)
+++ shindig/trunk/features/src/test/javascript/features/opensocial-data/datatest.js Wed Jun 2 08:28:20 2010
@@ -126,5 +126,5 @@ DataTest.prototype.testListener = functi
});
opensocial.data.DataContext.putDataSet('testKey', {});
this.assertEquals(true, fired);
-}
+};
Modified: shindig/trunk/features/src/test/javascript/features/osapi/osapitest.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/test/javascript/features/osapi/osapitest.js?rev=950419&r1=950418&r2=950419&view=diff
==============================================================================
--- shindig/trunk/features/src/test/javascript/features/osapi/osapitest.js (original)
+++ shindig/trunk/features/src/test/javascript/features/osapi/osapitest.js Wed Jun 2 08:28:20 2010
@@ -36,8 +36,10 @@ OsapiTest.prototype.testCall = function(
var transportCalled = false;
transport.execute = function(requests, callback) {
transportCalled = true;
- callback([{id:"test.method",result:{a:"b"}}]);
- }
+ callback([
+ {id:"test.method",result:{a:"b"}}
+ ]);
+ };
var callbackCalled = false;
osapi.test.method({}).execute(function(result) {
callbackCalled = true;