You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2012/05/11 23:22:11 UTC
svn commit: r1337381 - in /rave/trunk/rave-portal-resources/src:
main/webapp/script/rave_opensocial.js test/javascript/raveOpenSocialSpec.js
Author: mfranklin
Date: Fri May 11 21:22:11 2012
New Revision: 1337381
URL: http://svn.apache.org/viewvc?rev=1337381&view=rev
Log:
Removed Rave specific RPC handler for resizing gadgets in favor of the Common Container implementation (RAVE-620)
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js
rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js
Modified: rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js?rev=1337381&r1=1337380&r2=1337381&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/script/rave_opensocial.js Fri May 11 21:22:11 2012
@@ -77,7 +77,6 @@ rave.opensocial = rave.opensocial || (fu
* Registers the RPC hooks with the container
*/
function registerRpcHooks() {
- container.rpcRegister('resize_iframe', resizeIframe);
container.rpcRegister('set_title', setTitle);
container.rpcRegister('requestNavigateTo', requestNavigateTo);
container.rpcRegister('set_pref', setPref);
@@ -291,16 +290,6 @@ rave.opensocial = rave.opensocial || (fu
/*
RPC Callback handlers
*/
- /**
- * Resizes the iFrame when gadgets.window.adjustHeight is called
- *
- * @param args the RPC event args
- */
- function resizeIframe(args) {
- var max = 0x7FFFFFFF;
- var height = args.a > max ? max : args.a;
- args.gs.setHeight(height);
- }
/**
* Sets the chrome title when gadgets.window.setTitle is caled
Modified: rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js?rev=1337381&r1=1337380&r2=1337381&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js (original)
+++ rave/trunk/rave-portal-resources/src/test/javascript/raveOpenSocialSpec.js Fri May 11 21:22:11 2012
@@ -99,7 +99,6 @@ describe("Rave OpenSocial", function() {
it("Initializes the RPC Hooks Correctly", function() {
rave.opensocial.init();
hooks = container.rpcHooks();
- expect(hooks["resize_iframe"]).toBeDefined();
expect(hooks["set_title"]).toBeDefined();
expect(hooks["requestNavigateTo"]).toBeDefined();
});
@@ -138,20 +137,6 @@ describe("Rave OpenSocial", function() {
}
}
}
-
- function getMockResizeArgs(size) {
- var called = false;
- return {
- f: "frameId",
- a: size,
- gs: {
- setHeight : function(value) {
- called = size == value;
- }
- },
- wasCalled : function() {return called; }
- }
- }
function getMockRequestNavigateToArgs(id) {
return {
@@ -166,20 +151,6 @@ describe("Rave OpenSocial", function() {
}
}
- it("resizes Iframe if argument is less than height", function() {
- rave.opensocial.init();
- var args = getMockResizeArgs(25);
- container.rpcHooks()["resize_iframe"](args);
- expect(args.wasCalled()).toBeTruthy();
- });
-
- it("resizes Iframe to max if height is greater than max", function() {
- rave.opensocial.init();
- var args = getMockResizeArgs(2147483648);
- container.rpcHooks()["resize_iframe"](args);
- expect(args.wasCalled()).toBeFalsy();
- });
-
it("set title changes the title DOM node", function() {
var mockElement = {innerHTML : "NOTHING"};
spyOn(document, "getElementById").andReturn(mockElement);