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 2011/03/05 13:54:29 UTC
svn commit: r1078280 - in /shindig/trunk/content/gadgets/compliance: ./
javascript-tests/ javascript-tests/1.1/ javascript-tests/1.1/activities/
javascript-tests/1.1/appdata/ javascript-tests/1.1/people/
Author: lindner
Date: Sat Mar 5 12:54:28 2011
New Revision: 1078280
URL: http://svn.apache.org/viewvc?rev=1078280&view=rev
Log:
SHINDIG-1510 | Patch from Matthew Marum | Opensocial Javascript Compliance tests
Added:
shindig/trunk/content/gadgets/compliance/
shindig/trunk/content/gadgets/compliance/javascript-tests/
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/activitiessuite.js
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/suite.xml
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/appdatasuite.js
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/suite.xml
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/peoplesuite.js
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/suite.xml
shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/suite.xml
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/activitiessuite.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/activitiessuite.js?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/activitiessuite.js (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/activitiessuite.js Sat Mar 5 12:54:28 2011
@@ -0,0 +1,150 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function runActivitiesSuite(){
+
+ module("OpenSocial JavaScript Activities Tests 1.1");
+
+ asyncTest("osapi.activities.get defaults", function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get();
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ ok(response.totalResults == 1,"total results = " + response.totalResults + ", expected 1");
+ var count = 0;
+ for(var i in response.list){
+ ok(response.list[i], "Activity " + i);
+ ok(response.list[i].id, "Activity " + i + " id: " + response.list[i].id);
+ ok(response.list[i].title, "Activity " + i + " title: " + response.list[i].title);
+ ok(response.list[i].userId, "Activity " + i + " userId: " + response.list[i].userId);
+ count ++;
+ }
+ ok(count == response.totalResults,"Number of activities in list should match totalResults");
+ start();
+ });
+ },1000);
+
+ });
+
+ asyncTest("osapi.activities.get viewer", function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get({userId: "@viewer"});
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ ok(response.totalResults == 1,"total results = " + response.totalResults + ", expected 1");
+ var count = 0;
+ for(var i in response.list){
+ ok(response.list[i], "Activity " + i);
+ ok(response.list[i].id, "Activity " + i + " id: " + response.list[i].id);
+ ok(response.list[i].title, "Activity " + i + " title: " + response.list[i].title);
+ ok(response.list[i].userId, "Activity " + i + " userId: " + response.list[i].userId);
+ count ++;
+ }
+ ok(count == response.totalResults,"Number of activities in list should match totalResults");
+ start();
+ });
+ },1000);
+
+ });
+
+ asyncTest("osapi.activities.get owner", function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get({userId: "@owner"});
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ ok(response.totalResults == 1,"total results = " + response.totalResults + ", expected 1");
+ var count = 0;
+ for(var i in response.list){
+ ok(response.list[i], "Activity " + i);
+ ok(response.list[i].id, "Activity " + i + " id: " + response.list[i].id);
+ ok(response.list[i].title, "Activity " + i + " title: " + response.list[i].title);
+ ok(response.list[i].userId, "Activity " + i + " userId: " + response.list[i].userId);
+ count ++;
+ }
+ ok(count == response.totalResults,"Number of activities in list should match totalResults");
+ start();
+ });
+ },1000);
+
+ });
+
+ asyncTest("osapi.activities.get viewer friends",function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get({userId : "@viewer", groupId : "@friends"});
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ ok(response.totalResults == 2,"total results = " + response.totalResults + ", expected 2");
+ var count = 0;
+ for(var i in response.list){
+ ok(response.list[i], "Activity " + i);
+ ok(response.list[i].id, "Activity " + i + " id: " + response.list[i].id);
+ ok(response.list[i].title, "Activity " + i + " title: " + response.list[i].title);
+ ok(response.list[i].userId, "Activity " + i + " userId: " + response.list[i].userId);
+ count ++;
+ }
+ ok(count == response.totalResults,"Number of activities in list should match totalResults");
+ start();
+ });
+ },1000);
+
+ });
+
+ asyncTest("osapi.activities.get owner friends",function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get({userId : "@owner", groupId : "@friends"});
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ ok(response.totalResults == 2,"total results = " + response.totalResults + ", expected 2");
+ var count = 0;
+ for(var i in response.list){
+ ok(response.list[i], "Activity " + i);
+ ok(response.list[i].id, "Activity " + i + " id: " + response.list[i].id);
+ ok(response.list[i].title, "Activity " + i + " title: " + response.list[i].title);
+ ok(response.list[i].userId, "Activity " + i + " userId: " + response.list[i].userId);
+ count ++;
+ }
+ ok(count == response.totalResults,"Number of activities in list should match totalResults");
+ start();
+ });
+ },1000);
+
+ });
+
+ asyncTest("osapi.activities.get with non-existant ID",function(){
+ ok(osapi.activities.get, "osapi.activities.get exists");
+ var req = osapi.activities.get({userId : "DOES_NOT_EXIST"});
+ ok(req != null,"Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in get response");
+ console.log(response);
+ ok(response.totalResults == 0);
+ start();
+ });
+ },1000);
+
+ });
+
+
+}
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/suite.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/suite.xml?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/suite.xml (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/activities/suite.xml Sat Mar 5 12:54:28 2011
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module specificationVersion="1.1">
+ <ModulePrefs title="Activities Tests 1.1" author="OpenSocial_QA"
+ description="Activities Requests Tests 1.1">
+ <Require feature="dynamic-height"/>
+ <Require feature="osapi"/>
+ <Require feature="opensocial-data"/>
+ <Require feature="opensocial"/>
+ </ModulePrefs>
+ <Content type="html" scrolling="true">
+ <![CDATA[
+<html>
+ <head>
+ <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript" src="activitiessuite.js"></script>
+
+ <script>
+
+ gadgets.util.registerOnLoadHandler(runActivitiesSuite);
+ gadgets.util.registerOnLoadHandler(function(){
+ gadgets.window.adjustHeight(2000);
+ });
+
+ </script>
+ </head>
+
+ <body>
+ <h1 id="qunit-header">OpenSocial JavaScript 1.1 Activities</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+ </body>
+</html>
+
+
+]]>
+ </Content>
+</Module>
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/appdatasuite.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/appdatasuite.js?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/appdatasuite.js (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/appdatasuite.js Sat Mar 5 12:54:28 2011
@@ -0,0 +1,411 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+var appDataPersonalValue2 = 'personalValue2 ' + new Date().getTime();
+var appDataPersonalValue1 = 'personalValue1 ' + new Date().getTime();
+function runAppDataSuite(){
+
+ module("OpenSocial JavaScript AppData Tests 1.1");
+
+ asyncTest("osapi.appdata.(update, get) defaults" , function(){
+
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var pairs = {"testKey1" : appDataPersonalValue1};
+ ok(pairs,"Setting testKey1 to " + appDataPersonalValue1);
+ var params = {data : pairs};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+
+ var params = {keys : ["testKey1"]};
+ var req2 = osapi.appdata.get(params);
+ ok(req2 != null, "Req not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in response");
+ for(var person in response){
+ ok(response[person]["testKey1"],"Response contains personalValue1");
+ ok(response[person]["testKey1"] == appDataPersonalValue1, "personalValue1 matches expected value");
+ }
+ start();
+ });
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.(update, get) @me" , function(){
+
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var pairs = {"testKey2" : appDataPersonalValue2};
+ ok(pairs,"Setting personalValue to " + appDataPersonalValue2);
+ var params = {userId : "@me", data : pairs};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+ var params = {userId : "@me" , keys : ["testKey2"]};
+ var req2 = osapi.appdata.get(params);
+ ok(req2 != null, "Req not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in response");
+ var i = 0;
+ for(var person in response){
+ i++;
+ ok(response[person]["testKey2"] == appDataPersonalValue2,
+ appDataPersonalValue2 + " matches retreived value "+ response[person]["testKey2"]);
+ }
+ ok(i == 1, "Expect 1 Person in response, found " + i);
+ start();
+ });
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.get w/ wildcard", function(){
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var params = {keys : ["*"]};
+ var req = osapi.appdata.get(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+// for(var person in response){
+//TODO VALIDATE RESPONSE
+// }
+ start();
+ });
+ }, 1000);
+ });
+
+ //TODO fully validate response against compliance db
+ asyncTest("osapi.appdata.get @viewer", function(){
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var params = {userId : "@viewer"};
+ var req = osapi.appdata.get(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+ var count = 0;
+ for(var person in response){
+ ok(person, person + " in response");
+ count ++;
+ }
+ ok(count == 1, "Expected 1 person in response");
+ start();
+ });
+ }, 1000);
+ });
+
+
+ //TODO fully validate response against compliance db
+ asyncTest("osapi.appdata.get @owner", function(){
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var params = {userId : "@owner"};
+ var req = osapi.appdata.get(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+ var count = 0;
+ for(var person in response){
+ ok(person, person + " in response");
+ count ++;
+ }
+ ok(count == 1, "Expected 1 person in response");
+ start();
+ });
+ }, 1000);
+ });
+
+ asyncTest("osapi.appdata.get w/ DOES_NOT_EXIST property", function(){
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var params = {keys : ["DOES_NOT_EXIST"]};
+ var req = osapi.appdata.get(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error, "No error in response");
+ for(var person in response){
+ ok(person, person +" in response");
+ for(var data in response[person]){
+ ok(false,person+" response should not contain data, but found \'" + data+"\'");
+ }
+ }
+ start();
+ });
+ }, 1000);
+ });
+
+
+ asyncTest("osapi.appdata.UPDATE without data property (Expect Error)", function(){
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ var params = {};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(response.error,"Expecting error in UPDATE response");
+ start();
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.DELETE without keys property (Expect Error)", function(){
+ ok(osapi.appdata.delete, "osapi.appdata.delete exists");
+ var params = {};
+ var req = osapi.appdata.delete(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(response.error,"Expecting error in DELETE response");
+ start();
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.GET without keys property (Expect Error)", function(){
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var params = {};
+ var req = osapi.appdata.get(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(response.error,"Expecting error in GET response");
+ start();
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.(update, get) @viewer w/ key array" , function(){
+
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var pairs = {"testKey2" : appDataPersonalValue2, "testKey1" : appDataPersonalValue1};
+ var params = {userId : "@viewer", data : pairs};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+
+ var params = {userId : "@viewer" , keys : ["testKey2", "testKey1"]};
+ var req2 = osapi.appdata.get(params);
+ ok(req2 != null, "Req not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in response");
+ var i = 0;
+ for(var person in response){
+ i++;
+ var j = 0;
+ for(var data in response[person]){
+ j++;
+ if(data == "testKey1"){
+ ok(response[person]["testKey1"] == appDataPersonalValue1,
+ "testKey1 value = " + response[person]["testKey1"] + ", expected " + appDataPersonalValue1);
+ } else if(data == "testKey2"){
+ ok(response[person]["testKey2"] == appDataPersonalValue2,
+ "testKey2 value = " + response[person]["testKey2"] + ", expected " + appDataPersonalValue2);
+ } else {
+ ok(false, "Found unexpected key \'" + data + "\', value = " + response[person][data]);
+ }
+ }
+ }
+ ok(i == 1, "Expect 1 Person in response, found " + i);
+ start();
+ });
+ });
+ }, 1000);
+
+ });
+
+
+ //Assumes that one of the @viewer's friends is jane.doe
+ asyncTest("osapi.appdata.(update, get) Viewer Friends" , function(){
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var pairs = {"testKey1" : "friendDataZZ"};
+ ok(pairs,"Setting \'jane.doe\' testKey1 to \'friendDataZZ\'");
+ var params = {userId : "jane.doe", groupId : "@self", data : pairs};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+ var params = {userId : "@viewer", groupId : "@friends", keys : ["testKey1"]};
+ var req2 = osapi.appdata.get(params);
+ ok(req2 != null, "Req not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in response");
+ for(var person in response){
+ ok(person != "john.doe", person + " is not john.doe");
+ if(person == "jane.doe"){
+ ok(response[person]["testKey1"], person + " appdata contains contains testKey1");
+ ok(response[person]["testKey1"] == "friendDataZZ",
+ person + " testKey1 value = " + response[person]["testKey1"] + ", expected = friendDataZZ");
+ }
+ }
+ start();
+ });
+ });
+ }, 1000);
+
+ });
+
+ //Assumes that one of the @owner's friends is jane.doe
+ asyncTest("osapi.appdata.(update, get) Owner Friends" , function(){
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.get, "osapi.appdata.get exists");
+ var pairs = {"testKey1" : "friendDataZZ"};
+ ok(pairs,"Setting \'jane.doe\' testKey1 to \'friendDataZZ\'");
+ var params = {userId : "jane.doe", groupId : "@self", data : pairs};
+ var req = osapi.appdata.update(params);
+ ok(req != null, "Req not null");
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"No error in response");
+ var params = {userId : "@owner", groupId : "@friends", keys : ["testKey1"]};
+ var req2 = osapi.appdata.get(params);
+ ok(req2 != null, "Req not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in response");
+ for(var person in response){
+ ok(person != "john.doe", person + " is not john.doe");
+ if(person == "jane.doe"){
+ ok(response[person]["testKey1"], person + " appdata contains contains testKey1");
+ ok(response[person]["testKey1"] == "friendDataZZ",
+ person + " testKey1 value = " + response[person]["testKey1"] + ", expected = friendDataZZ");
+ }
+ }
+ start();
+ });
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.appdata.(update, delete) Create TO_DELETE appdata then delete it" , function(){
+ ok(osapi.appdata.update, "osapi.appdata.update exists");
+ ok(osapi.appdata.delete, "osapi.appdata.delete exists");
+ var pairs = {"TO_DELETE" : "value"};
+ ok(pairs,"Setting TO_DELETE");
+ var params = {data : pairs};
+ var req = osapi.appdata.update(params);
+ setTimeout(function(){
+ req.execute(function(response){
+ ok(!response.error,"TO_DELETE set successfully");
+ var params = {keys : ["TO_DELETE"]};
+ var req2 = osapi.appdata.delete(params);
+ ok(req2 != null, "Delete request not null");
+ req2.execute(function(response){
+ ok(!response.error,"No error in DELETE response");
+ var params = {keys : ["*"]};
+ var req2 = osapi.appdata.get(params);
+ req2.execute(function(response){
+ ok(!response.error,"No error in GET response");
+ for(var person in response){
+ ok(!response[person]["TO_DELETE"], person + " does not have TO_DELETE appdata");
+ }
+ start();
+ });
+ });
+ });
+ }, 1500);
+
+ });
+
+
+ //Assumes the existence of john.doe and jane.doe
+ asyncTest("osapi.batch appdata requests (multi-user multi-key)", function(){
+ ok(osapi.newBatch,"osapi.newBatch exists");
+ var time = new Date().getTime();
+ var johnvalue1 = "john.doe value1 " + time;
+ var johnvalue2 = "john.doe value2 " + time;
+ var janevalue1 = "jane.doe value1 " + time;
+ var janevalue2 = "jane.doe value2 " + time;
+ var batchUpdate = osapi.newBatch().add("john.doe", osapi.appdata.update({userId : "john.doe",
+ data : {
+ "batchKey1" : johnvalue1,
+ "batchKey2" : johnvalue2}
+ })).add("jane.doe", osapi.appdata.update({userId: "jane.doe",
+ data : {
+ "batchKey1" : janevalue1,
+ "batchKey2" : janevalue2}}));
+
+
+ var batchGet = osapi.newBatch().add("john.doe", osapi.appdata.get({userId : "john.doe", "keys" : ["batchKey1", "batchKey2"]}))
+ .add("jane.doe", osapi.appdata.get({userId: "jane.doe", "keys" : ["batchKey1", "batchKey2"]}));
+
+ setTimeout(function(){
+ batchUpdate.execute(function(result) {
+ ok(!result["john.doe"].error,"No error in john.doe update response");
+ ok(!result["jane.doe"].error,"No error in jane.doe update response");
+ if (!result["jane.doe"].error && !result["jane.doe"].error) {
+ batchGet.execute(function(result) {
+ ok(!result["john.doe"].error,"No error in john.doe get response");
+ ok(!result["jane.doe"].error,"No error in jane.doe get response");
+ if (!result["jane.doe"].error && !result["jane.doe"].error) {
+ ok(result["john.doe"]["john.doe"]["batchKey1"] == johnvalue1,"john.doe key1 = " + johnvalue1 + " (expected "+johnvalue1+")");
+ ok(result["jane.doe"]["jane.doe"]["batchKey1"] == janevalue1,"jane.doe key1 = " + janevalue1 + " (expected "+janevalue1+")");
+ ok(result["john.doe"]["john.doe"]["batchKey2"] == johnvalue2,"john.doe key2 = " + johnvalue2 + " (expected "+johnvalue2+")");
+ ok(result["jane.doe"]["jane.doe"]["batchKey2"] == janevalue2,"jane.doe key2 = " + janevalue2 + " (expected "+janevalue2+")");
+ }
+ start();
+ });
+ }
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.batch mixed appdata & people requests", function(){
+ var batch = osapi.newBatch().
+ add("viewer", osapi.people.getViewer()).
+ add("appdata", osapi.appdata.get({ userId : '@viewer', groupId : '@self', "keys" : ["*"]}));
+ setTimeout(function(){
+ batch.execute(function(result) {
+ ok(!result.viewer.error, "osapi.people.getViewer() succeeded");
+ if(result.viewer.error){
+ ok(false, result.viewer.error.message);
+ }
+ ok(!result.appdata.error, "osapi.appdata.get() succeeded");
+ if(result.appdata.error){
+ ok(false, result.appdata.error.message);
+ }
+ ok(result.viewer.id,"Got viewer "+result.viewer.id);
+ //TODO validate that appdata values match expected
+ for(var person in result.appdata){
+ for(var data in result.appdata[person]){
+ ok(result.appdata[person][data], person + " - key: " + data + ", value: " + result.appdata[person][data]);
+ }
+ }
+ start();
+ });
+ }, 1000);
+
+
+
+ });
+
+
+
+}
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/suite.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/suite.xml?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/suite.xml (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/appdata/suite.xml Sat Mar 5 12:54:28 2011
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module specificationVersion="1.1">
+ <ModulePrefs title="AppData Tests 1.1" author="OpenSocial_QA"
+ description="AppData Requests Tests 1.1">
+ <Require feature="dynamic-height"/>
+ <Require feature="osapi"/>
+ <Require feature="opensocial-data"/>
+ <Require feature="opensocial"/>
+ </ModulePrefs>
+ <Content type="html" scrolling="true">
+ <![CDATA[
+<html>
+ <head>
+ <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript" src="appdatasuite.js"></script>
+
+ <script>
+
+ gadgets.util.registerOnLoadHandler(runAppDataSuite);
+ gadgets.util.registerOnLoadHandler(function(){
+ gadgets.window.adjustHeight(2000);
+ });
+
+ </script>
+ </head>
+
+ <body>
+ <h1 id="qunit-header">OpenSocial JavaScript 1.1 AppData</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+ </body>
+</html>
+
+
+]]>
+ </Content>
+</Module>
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/peoplesuite.js
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/peoplesuite.js?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/peoplesuite.js (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/peoplesuite.js Sat Mar 5 12:54:28 2011
@@ -0,0 +1,577 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//TODO Verify person objects against compliance person data
+function personResponse(dataResponse) {
+
+ ok(!dataResponse.error, "No error in response");
+ if (!dataResponse.error) {
+ var viewerData = dataResponse;
+ for (var field in opensocial.Person.Field) {
+ try {
+ var fieldValue = viewerData[opensocial.Person.Field[field]];
+ var req = requiredBySpec(opensocial.Person.Field[field]);
+ var msg;
+ if(req){
+ msg = "REQUIRED: ";
+ } else {
+ msg = "OPTIONAL: ";
+ }
+ if(fieldValue != null) {
+ ok(fieldValue != null, msg + (opensocial.Person.Field[field] + " is set."));
+ } else if (opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PERSON, opensocial.Person.Field[field])) {
+ ok(!req, msg + (opensocial.Person.Field[field] +" is empty."));
+ } else {
+ ok(fieldValue == null, 'Container non-supported field - ' + opensocial.Person.Field[field]);
+ }
+ } catch (ex) {
+ ok(false,ex);
+ }
+ }
+ }
+ start();
+}
+
+/**
+ * Returns TRUE if field is a required Person field
+ *
+ * http://opensocial-resources.googlecode.com/svn/spec/1.1/Social-Data.xml#Person
+ *
+ * @param field Person Field
+ * @returns {Boolean} TRUE if required, FALSE if not required (see spec).
+ */
+function requiredBySpec(field){
+ if(field == "id" ||
+ field == "name" ||
+ field == "thumbnailUrl"){
+ return true;
+ }
+ return false;
+}
+
+function runPeopleSuite(){
+ module("OpenSocial JavaScript People/Person Tests 1.1");
+
+ asyncTest("osapi.people.getViewer() - (no parameters)", function(){
+ var req = osapi.people.getViewer();
+ ok(osapi.people.getViewer,"osapi.people.getViewer exists");
+ ok(req != null, "Req not null");
+ ok(req.execute != null, "Req has execute method");
+ setTimeout(function(){
+ req.execute(personResponse);
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.people.getOwner() - (no parameters)", function(){
+ var req = osapi.people.getOwner();
+ ok(osapi.people.getOwner,"osapi.people.getOwner exists");
+ ok(req != null, "Req not null");
+ ok(req.execute != null, "Req has execute method");
+ setTimeout(function(){
+ req.execute(personResponse);
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.people.get() - VIEWER (with params)", function(){
+
+ var params = { userId : "@me", groupId : "@self"};
+ var req = osapi.people.getViewer(params);
+ ok(req != null, "osapi request not null");
+ ok(req.execute != null, "Request has execute method");
+ setTimeout(function(){
+ req.execute(personResponse);
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.people.get() - OWNER (with params)", function(){
+
+ var params = { userId : "@me", groupId : "@self"};
+ var req = osapi.people.getOwner(params);
+ ok(req != null, "osapi request not null");
+ ok(req.execute != null, "Request has execute method");
+ setTimeout(function(){
+ req.execute(personResponse);
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.people.get() - (by id 'john.doe')", function(){
+
+ var params = {userId : "john.doe", groupId : "@self"};
+ var req = osapi.people.get(params);
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+
+ ok(!dataResponse.error,"no error in data response");
+ if (!dataResponse.error) {
+ ok(dataResponse.id == "john.doe","ID is john.doe");
+ ok(dataResponse.name.givenName == "John", "given name is John");
+ ok(dataResponse.name.familyName == "Doe", "family name is Doe");
+ }
+ start();
+ });
+
+ }, 1000);
+ });
+
+ test("opensocial.hasPermission(VIEWER)", function(){
+ var hasViewerPermission;
+ try {
+ ok(opensocial.hasPermission,"hasPermission exists");
+ ok(opensocial.Permission.VIEWER,"opensocial.Permission.VIEWER exists");
+ hasViewerPermission = opensocial.hasPermission(opensocial.Permission.VIEWER);
+ ok(hasViewerPermission != null,"User permission not null.")
+ ok(!hasViewerPermission,"Gadget should not have Viewer permission");
+ } catch (ex) {
+ ok(false,ex);
+ }
+ });
+
+ asyncTest("opensocial.requestPermission(VIEWER)", function(){
+ expect(2);
+ ok(opensocial.requestPermission,"opensocial.requestPermission exists");
+ opensocial.requestPermission(opensocial.Permission.VIEWER, 'test',
+ function(dataResponse) {
+ ok(dataResponse instanceof opensocial.ResponseItem,"dataResponse is a opensocial.ResponseItem");
+ });
+ setTimeout(function(){
+ start();
+ },1000);
+ });
+
+
+ asyncTest("opensocial.requestShareApp(VIEWER/VIEWER_FRIENDS/OWNER/OWNER_FRIENDS)", function(){
+
+ var ids = [ 'VIEWER', 'OWNER'];
+ expect(2 + (ids.length*2));
+ ok(opensocial.requestShareApp,"opensocial.requestShareApp exists");
+ ok(opensocial.newMessage,"opensocial.newMessage exists");
+
+ for (var i = 0; i < ids.length; i++) {
+ var idSpec = {userId : ids[i],
+ groupId : '@friends',
+ networkDistance : 1};
+ opensocial.requestShareApp(idSpec, opensocial.newMessage("test"), function(dataResponse) {
+ /* Does this have to be called? */
+ ok(dataResponse instanceof opensocial.ResponseItem, ids[i]+" response is a opensocial.ResponseItem");
+ });
+ }
+
+ for (i = 0; i < ids.length; i++) {
+ var idSpec = {userId : ids[i],
+ groupId : '@self',
+ networkDistance : 1};
+ opensocial.requestShareApp(idSpec, opensocial.newMessage("test"), function(dataResponse) {
+ /* Does this have to be called? */
+ ok(dataResponse instanceof opensocial.ResponseItem, ids[i]+" response is a opensocial.ResponseItem");
+ });
+ }
+
+ setTimeout(function(){
+ start();
+ },3000);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: addresses)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.ADDRESSES);
+
+ });
+
+
+ asyncTest("osapi.people.getViewer() (profile_details: urls)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.URLS);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: name)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.NAME);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: currentLocation)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.CURRENT_LOCATION);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: gender)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.GENDER);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: bodyType)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.BODY_TYPE);
+
+ });
+
+ asyncTest("osapi.people.getViewer() (profile_details: schools)", function(){
+
+ testAsyncViewerFieldResult(opensocial.Person.Field.SCHOOLS);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: addresses)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.ADDRESSES);
+
+ });
+
+
+ asyncTest("osapi.people.getOwner() (profile_details: urls)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.URLS);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: name)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.NAME);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: currentLocation)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.CURRENT_LOCATION);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: gender)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.GENDER);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: bodyType)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.BODY_TYPE);
+
+ });
+
+ asyncTest("osapi.people.getOwner() (profile_details: schools)", function(){
+
+ testAsyncOwnerFieldResult(opensocial.Person.Field.SCHOOLS);
+
+ });
+
+ asyncTest("osapi.people.get() - String ID",function(){
+
+ var req = osapi.people.getViewer();
+ var id;
+ setTimeout(function(){
+ req.execute(function(dataResponse){
+ id = dataResponse['id']
+ ok(id != null && id != undefined, "Viewer id is " + id);
+
+ var params = { userId : id, groupId : "@self"};
+ var req = osapi.people.get(params);
+
+ req.execute(function(dataResponse) {
+ ok(!dataResponse.error,"No error in data response");
+ if (!dataResponse.error) {
+ var actual = dataResponse['id'];
+ ok(actual == id, "Expected " + id + " got " + actual);
+ }
+ start();
+ });
+
+ });
+ }, 1000);
+
+ });
+
+ asyncTest("osapi.people.get() w/bad parameters - Error expected", function(){
+
+
+ var req = osapi.people.get("bad_param");
+
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+ ok(dataResponse.error,"Error in data response");
+ start();
+ });
+
+
+ }, 1000);
+
+
+ });
+
+ asyncTest("osapi.people.get() - viewer\'s friends (default) ", function(){
+
+ var params = {userId : "@viewer", groupId : "@friends", networkDistance : 1};
+ var req = osapi.people.get(params);
+ testAsyncPeopleCollection(req,getSupportedPersonFields());
+
+ });
+
+ asyncTest("osapi.people.get() - john.doe\'s friends (default) ", function(){
+
+ var params = {userId : "john.doe", groupId : "@friends", networkDistance : 1};
+ var req = osapi.people.get(params);
+ testAsyncPeopleCollection(req,getSupportedPersonFields());
+
+ });
+
+ asyncTest("osapi.people.getViewerFriends() - (default) ", function(){
+
+ testAsyncPeopleCollection(osapi.people.getViewerFriends(),getSupportedPersonFields());
+
+ });
+
+ asyncTest("osapi.people.getOwnerFriends() - (default) ", function(){
+ var supportedPersonFields = getSupportedPersonFields();
+ testAsyncPeopleCollection(osapi.people.getOwnerFriends(),supportedPersonFields);
+
+ });
+
+ asyncTest("osapi.people.getViewerFriends() - w/fields ", function(){
+ var fieldIds = ['id','thumbnailUrl'];
+ var params = {fields : fieldIds};
+ var req = osapi.people.getViewerFriends(params);
+ testAsyncPeopleCollection(req, fieldIds);
+
+ });
+
+ asyncTest("osapi.people.getViewerFriends() - (paginated 1 per page, start index 1)", function(){
+
+ var params = {networkDistance : 1, count : 1};
+
+ var req = osapi.people.getViewerFriends(params);
+
+ var params2 = {networkDistance : 1, startIndex : 1, count : 1};
+
+ var req2 = osapi.people.getViewerFriends(params2);
+ setTimeout(function(){
+ var count = 0;
+ var name;
+
+ req.execute(function(dataResponse){
+
+ ok(!dataResponse.error,"no error in data response");
+ if (!dataResponse.error) {
+ var dataCollection = dataResponse;
+ ok(dataResponse.startIndex == 0,"OpenSocial collections are zero indexed");
+ ok(dataResponse.itemsPerPage == 1, "1 item per page");
+ ok(dataResponse.list.length == 1,"list contains 1 item");
+ ok(dataResponse.list[0].id,"Person id at 0 is " + dataResponse.list[0].id);
+ if(!name){
+ name = dataResponse.list[0].id;
+ } else {
+ ok(dataResponse.list[0].id != name,"Different indices returned different names");
+ }
+ }
+ if(count == 1){
+ start();
+ }
+
+ count ++;
+ });
+
+ req2.execute(function(dataResponse){
+
+ ok(!dataResponse.error,"no error in data response");
+ if (!dataResponse.error) {
+ var dataCollection = dataResponse;
+ ok(dataResponse.startIndex == 1,"Expect a start index of 1");
+ ok(dataResponse.itemsPerPage == 1, "1 item per page");
+ ok(dataResponse.list.length == 1,"list contains 1 item");
+ ok(dataResponse.list[0].id,"Person id at 1 is " + dataResponse.list[0].id);
+ if(!name){
+ name = dataResponse.list[0].id;
+ } else {
+ ok(dataResponse.list[0].id != name,"0 and 1 indices point to different Person objects");
+ }
+ }
+ if(count == 1){
+ start();
+ }
+ count ++;
+ });
+
+ }, 1000);
+
+
+ });
+
+
+ asyncTest("osapi.people.get() - (viewer's friends sorted by id)", function(){
+
+ var params = {userId : "@viewer", groupId : "@friends", networkDistance : 1, sortBy : "id"};
+ var req = osapi.people.get(params);
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+
+ ok(!dataResponse.error,"no error in data response");
+ if (!dataResponse.error) {
+ var dataCollection = dataResponse;
+ ok(dataCollection.sorted,"Collection is marked as sorted");
+ //TODO Verify sorting
+
+ }
+ start();
+ });
+
+ }, 1000);
+ });
+
+ asyncTest("osapi.people.get() - (viewer's friends fitered - id contains 'doe')", function(){
+
+ var params = { userId : "@viewer",
+ groupId : "@friends",
+ networkDistance : 1,
+ filterBy : "id",
+ filterValue : "doe"
+ };
+ var req = osapi.people.get(params);
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+
+ ok(!dataResponse.error,"no error in data response");
+ if (!dataResponse.error) {
+ var dataCollection = dataResponse;
+ ok(dataCollection.filtered,"Collection is marked as filtered");
+ for(var i in dataCollection.list){
+ ok(dataCollection.list[i].id.indexOf("doe") != -1,dataCollection.list[i].id+" contains \"doe\"");
+ }
+
+ }
+ start();
+ });
+
+ }, 1000);
+
+
+ });
+
+ asyncTest("osapi.people.getViewerFriends() - (Paging out of bounds, startIndex = 9999)", function(){
+
+ var params = {networkDistance : 1, count : 10, startIndex : 9999};
+
+ var req = osapi.people.getViewerFriends(params);
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+ ok(dataResponse.error,"Error in data response");
+ start();
+ });
+
+ }, 1000);
+
+
+ });
+
+}
+
+var _supportedPersonFields;
+
+function getSupportedPersonFields(){
+ if(!_supportedPersonFields){
+ _supportedPersonFields = new Array();
+ for(var field in opensocial.Person.Field){
+ if(opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PERSON, opensocial.Person.Field[field])){
+ _supportedPersonFields.push(opensocial.Person.Field[field]);
+ }
+ }
+ ok(_supportedPersonFields,"Got list of supported Person fields");
+ }
+ return _supportedPersonFields;
+}
+
+//TODO Verify field values against compliance data
+function testAsyncPeopleCollection(req, fields){
+
+
+ setTimeout(function(){
+
+ req.execute(function(dataResponse){
+ ok(!dataResponse.error,"No error in data response");
+ ok(dataResponse.totalResults,"Response has "+dataResponse.totalResults+" results");
+ ok(dataResponse.list.length == dataResponse.totalResults,"Response has a result list of size " + dataResponse.list.length);
+ var list = dataResponse.list;
+ for(var i=0; i<list.length; i++){
+ for(var j=0; j<fields.length; j++){
+ ok(requiredBySpec(fields[j]) && list[i][fields[j]] != null,
+ "Friend " + i +" : " +fields[j] + " - " + list[i][fields[j]]);
+ }
+
+ }
+ start();
+ });
+
+
+ }, 1000);
+}
+
+
+function testAsyncViewerFieldResult(field){
+ if (opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PERSON,field)) {
+ var params = {fields: [opensocial.Person.Field[field]]};
+ var req = osapi.people.getViewer(params);
+
+ setTimeout(function(){
+ req.execute(function(dataResponse) {
+ ok(!dataResponse.error,"dataResponse without an error");
+ if (!dataResponse.error) {
+ var actual = dataResponse[opensocial.Person.Field[field]];
+ ok(actual != null, opensocial.Person.Field[field] + " value is " + actual);
+ }
+
+ });
+
+ start();
+ }, 1000);
+
+ } else {
+ ok(!requiredBySpec(field),"Container does not declare support for "+ field +" field.")
+ start();
+ }
+}
+
+function testAsyncOwnerFieldResult(field){
+ if (opensocial.getEnvironment().supportsField(opensocial.Environment.ObjectType.PERSON,field)) {
+ var params = {"fields": [opensocial.Person.Field[field]]};
+ var req = osapi.people.getOwner(params);
+
+ setTimeout(function(){
+ req.execute(function(dataResponse) {
+ ok(!dataResponse.error,"dataResponse without an error");
+ if (!dataResponse.error) {
+ var actual = dataResponse[opensocial.Person.Field[field]];
+ ok(actual != null, opensocial.Person.Field[field] + " value is " + actual);
+ }
+
+ });
+
+ start();
+ },1000);
+
+ } else {
+ ok(!requiredBySpec(field),"Container does not declare support for "+ field +" field.")
+ start();
+ }
+}
+
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/suite.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/suite.xml?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/suite.xml (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/people/suite.xml Sat Mar 5 12:54:28 2011
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module specificationVersion="1.1">
+ <ModulePrefs title="People Tests 1.1" author="OpenSocial_QA"
+ description="Person/People Requests Tests 1.1">
+ <Require feature="dynamic-height"/>
+ <Require feature="osapi"/>
+ <Require feature="opensocial-data"/>
+ <Require feature="opensocial"/>
+ </ModulePrefs>
+ <Content type="html" scrolling="true">
+ <![CDATA[
+<html>
+ <head>
+ <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript" src="peoplesuite.js"></script>
+
+ <script>
+
+ gadgets.util.registerOnLoadHandler(runPeopleSuite);
+ gadgets.util.registerOnLoadHandler(function(){
+ gadgets.window.adjustHeight(2000);
+ });
+
+ </script>
+ </head>
+
+ <body>
+ <h1 id="qunit-header">OpenSocial JavaScript 1.1 People</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+ </body>
+</html>
+
+
+]]>
+ </Content>
+</Module>
Added: shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/suite.xml
URL: http://svn.apache.org/viewvc/shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/suite.xml?rev=1078280&view=auto
==============================================================================
--- shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/suite.xml (added)
+++ shindig/trunk/content/gadgets/compliance/javascript-tests/1.1/suite.xml Sat Mar 5 12:54:28 2011
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module specificationVersion="1.1">
+ <ModulePrefs title="OpenSocial JavaScript 1.1 Compliance Tests" author="OpenSocial_QA"
+ description="OpenSocial JavaScript 1.1 Compliance Tests">
+ <Require feature="dynamic-height"/>
+ <Require feature="osapi"/>
+ <Require feature="opensocial-data"/>
+ <Require feature="opensocial"/>
+ </ModulePrefs>
+ <Content type="html" scrolling="true">
+ <![CDATA[
+<html>
+ <head>
+ <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
+ <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
+ <script type="text/javascript" src="appdata/appdatasuite.js"></script>
+ <script type="text/javascript" src="people/peoplesuite.js"></script>
+ <script type="text/javascript" src="activities/activitiessuite.js"></script>
+ <script type="text/javascript" src="all.js"></script>
+
+
+ <script>
+
+ gadgets.util.registerOnLoadHandler(function(){
+ runActivitiesSuite();
+ runAppDataSuite();
+ runPeopleSuite();
+ gadgets.window.adjustHeight(3000);
+ });
+
+ </script>
+ </head>
+
+ <body>
+ <h1 id="qunit-header">OpenSocial JavaScript 1.1 Compliance</h1>
+ <h2 id="qunit-banner"></h2>
+ <div id="qunit-testrunner-toolbar"></div>
+ <h2 id="qunit-userAgent"></h2>
+ <ol id="qunit-tests"></ol>
+ <div id="qunit-fixture">test markup, will be hidden</div>
+ </body>
+</html>
+
+
+]]>
+ </Content>
+</Module>