From 24c36055faa941b0646554aae7b7d24d8cbeb491 Mon Sep 17 00:00:00 2001 From: Ritesh Zaveri Date: Fri, 25 Aug 2023 19:10:14 +0530 Subject: [PATCH 1/4] updated omid libs --- sdk/assets/OMLICENSE | 3 +- sdk/assets/apn_omsdk.js | 158 +++++++++++++++++---------------- sdk/assets/mobilevastplayer.js | 10 +-- sdk/libs/omsdk.jar | Bin 81883 -> 83044 bytes 4 files changed, 89 insertions(+), 82 deletions(-) diff --git a/sdk/assets/OMLICENSE b/sdk/assets/OMLICENSE index 494772b9..54ede95b 100755 --- a/sdk/assets/OMLICENSE +++ b/sdk/assets/OMLICENSE @@ -1,5 +1,4 @@ -Open Measurement (OM) License, V 1.1 - +Open Measurement (OM) License for Native-App Measurement, V 1.1 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION diff --git a/sdk/assets/apn_omsdk.js b/sdk/assets/apn_omsdk.js index 1a04260a..d46cc078 100644 --- a/sdk/assets/apn_omsdk.js +++ b/sdk/assets/apn_omsdk.js @@ -1,78 +1,86 @@ ;(function(omidGlobal) { - 'use strict';var n;function aa(a){var b=0;return function(){return bc&&(c=Math.max(c+e,0));cf&&w.yh){m=!0;break}}m&&(c+=Math.round(l)*Math.round(k))}}return c} -function Da(a,b){a=A(a);for(var c=[],d=[],e=0;eMath.abs(f-c))||(f=b.x,f=f>e||.01>Math.abs(f-e));(e=f)||(e=b.endY,e=eMath.abs(e-d));(d=e)||(b=b.y,d=b>a||.01>Math.abs(b-a));b=!d}return b}function B(a,b){for(var c=!1,d=0;dd.time&&(d=b[e]);c=d;a.g=Nb(c.rootBounds);a.a=Nb(c.boundingClientRect);a.v=Nb(c.intersectionRect);a.G=!!c.isIntersecting;yb(a)}}catch(f){a.m(),hb(a.F,'generic','Problem handling IntersectionObserver callback: '+f.message)}},{root:null,rootMargin:'0px',threshold:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]})} -function Mb(a){a.f.ResizeObserver?a.l||(a.l=Ob(a,function(){return Pb(a)}),a.l.observe(a.b)):(a.o||(a.o=function(){return Pb(a)},(0,a.f.addEventListener)('resize',a.o)),a.j||(a.j=new MutationObserver(function(){return Pb(a)}),a.j.observe(a.b,{childList:!1,attributes:!0,subtree:!1})))}function Pb(a){a.b&&!Lb(a.b)&&(Kb(a),Ib(a))}function Ob(a,b){return new a.f.ResizeObserver(b)}function Nb(a){if(a&&null!==a.x&&null!==a.y&&null!==a.width&&null!==a.height)return new z(a,!1)};function Sb(a){return a&&L(a)?Object.entries(a).reduce(function(b,c){var d=p(c);c=d.next().value;d=d.next().value;return b&&N(c)&&null!=d&&L(d)&&N(d.resourceUrl)},!0):!1};function T(a,b,c,d){this.b=a;this.method=b;this.version=c;this.a=d}function Tb(a){return!!a&&void 0!==a.omid_message_guid&&void 0!==a.omid_message_method&&void 0!==a.omid_message_version&&'string'===typeof a.omid_message_guid&&'string'===typeof a.omid_message_method&&'string'===typeof a.omid_message_version&&(void 0===a.omid_message_args||void 0!==a.omid_message_args)}function Ub(a){return new T(a.omid_message_guid,a.omid_message_method,a.omid_message_version,a.omid_message_args)} -function Vb(a){var b={};b=(b.omid_message_guid=a.b,b.omid_message_method=a.method,b.omid_message_version=a.version,b);void 0!==a.a&&(b.omid_message_args=a.a);return b};function Wb(a){this.c=a};function U(a){this.c=a;this.handleExportedMessage=U.prototype.f.bind(this)}r(U,Wb);U.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.handleExportedMessage(Vb(a),this)};U.prototype.f=function(a,b){Tb(a)&&this.a&&this.a(Ub(a),b)};function Xb(a){return Yb(a,'SessionService.')}function Yb(a,b){return(a=a.match(new RegExp('^'+b+'(.*)')))&&a[1]};function Zb(a,b){this.c=b=void 0===b?F:b;var c=this;a.addEventListener('message',function(d){if('object'===typeof d.data){var e=d.data;Tb(e)&&d.source&&c.a&&c.a(Ub(e),d.source)}})}r(Zb,Wb);Zb.prototype.b=function(a,b){b=void 0===b?this.c:b;if(!b)throw Error('Message destination must be defined at construction time or when sending the message.');b.postMessage(Vb(a),'*')};function $b(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(a){var b=16*Math.random()|0;return'y'===a?(b&3|8).toString(16):b.toString(16)})};function ac(a){if(!a.a||!a.a.document)throw Error('OMID Service Script is not running within a window.');var b=a.b;a.b=[];b.forEach(function(c){try{var d=a.c.B?'limited':'full',e=O(c.accessMode,ua)?c.accessMode:null;var f=e?'full'==e&&'limited'==d?d:'domain'==e?'limited':e:d;c.accessMode=f;a:{var l=c.resourceUrl,g=a.a.location.origin;try{var h=new URL(l,g);break a}catch(X){}try{h=new URL(l);break a}catch(X){}h=null}if(d=h){var k=$b(),m=a.a.document,t=m.createElement('iframe');t.id='omid-verification-script-frame-'+ -k;t.style.display='none';['full','limited'].includes(f)?t.srcdoc="\n"; private static final String NATIVE_MAIN_MEDIA = "[{\"url\":\"%s\",\"width\":%d,\"height\":%d,\"label\":\"default\"},{\"url\":\"%s\",\"width\":%d,\"height\":%d},{\"url\":\"%s\",\"width\":%d,\"height\":%d}]"; private static final String NATIVE_RATING = "{\"value\":%.2f,\"scale\":%.2f}"; - private static final String RTB_NATIVE_VIEWABILITY_CONFIG = ""; - private static final String RTB_NATIVE_RENDERER_VIEWABILITY_CONFIG = ""; - private static final String CSM_NATIVE_VIEWABILITY_CONFIG = ""; + private static final String RTB_NATIVE_VIEWABILITY_CONFIG = ""; + private static final String RTB_NATIVE_RENDERER_VIEWABILITY_CONFIG = ""; + private static final String CSM_NATIVE_VIEWABILITY_CONFIG = ""; // template strings private static final String CLASSNAME = "com.appnexus.opensdk.testviews.%s"; diff --git a/sdk/test/com/appnexus/opensdk/viewability/ANOMIDNativeViewabilityTests.java b/sdk/test/com/appnexus/opensdk/viewability/ANOMIDNativeViewabilityTests.java index d0a30825..8af7c105 100644 --- a/sdk/test/com/appnexus/opensdk/viewability/ANOMIDNativeViewabilityTests.java +++ b/sdk/test/com/appnexus/opensdk/viewability/ANOMIDNativeViewabilityTests.java @@ -78,7 +78,7 @@ public void setup() { private void assertVerificationScriptResourceRTB() { ANOmidAdSession anOmidAdSession = getOMIDAdSession(); VerificationScriptResource verificationScriptResource = anOmidAdSession.verificationScriptResources.get(0); - assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/test/omid-validation-verification-script-1.2.5.js")); + assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/validation-verification-scripts-fortesting/omsdk-js-1.4.8/Validation-Script/omid-validation-verification-script-v1.js")); assertTrue(verificationScriptResource.getVendorKey().equalsIgnoreCase("dummyVendor")); assertTrue(verificationScriptResource.getVerificationParameters().equalsIgnoreCase("v;vk=dummyVendor;tv=cet=0;cecb=")); } @@ -86,7 +86,7 @@ private void assertVerificationScriptResourceRTB() { private void assertVerificationScriptResourceNativeRenderer() { ANOmidAdSession anOmidAdSession = getOMIDAdSession(); VerificationScriptResource verificationScriptResource = anOmidAdSession.verificationScriptResources.get(0); - assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/test/omid-validation-verification-script-1.2.5.js")); + assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/validation-verification-scripts-fortesting/omsdk-js-1.4.8/Validation-Script/omid-validation-verification-script-v1.js")); assertTrue(verificationScriptResource.getVendorKey().equalsIgnoreCase("dummyVendorRenderer")); assertTrue(verificationScriptResource.getVerificationParameters().equalsIgnoreCase("v;vk=dummyVendorRenderer;tv=cet=0;cecb=")); } @@ -95,7 +95,7 @@ private void assertVerificationScriptResourceNativeRenderer() { private void assertVerificationScriptResourceCSM() { ANOmidAdSession anOmidAdSession = getOMIDAdSession(); VerificationScriptResource verificationScriptResource = anOmidAdSession.verificationScriptResources.get(0); - assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/test/omid-validation-verification-script-1.2.5.js")); + assertTrue(verificationScriptResource.getResourceUrl().toString().equalsIgnoreCase("https://acdn.adnxs.com/mobile/omsdk/validation-verification-scripts-fortesting/omsdk-js-1.4.8/Validation-Script/omid-validation-verification-script-v1.js")); assertTrue(verificationScriptResource.getVendorKey().equalsIgnoreCase("dummyVendorCSM")); assertTrue(verificationScriptResource.getVerificationParameters().equalsIgnoreCase("v;vk=dummyVendorCSM;tv=cet=0;cecb=")); } From e72001b5baed43f7a6e966b397b6bad8a93633f0 Mon Sep 17 00:00:00 2001 From: Ritesh Zaveri Date: Wed, 6 Sep 2023 14:33:57 +0530 Subject: [PATCH 4/4] trackertestapp changes --- .../appnexus/com/trackertestapp/TestResponsesUT.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/TrackerTestApp/app/src/androidTest/java/appnexus/com/trackertestapp/TestResponsesUT.java b/tests/TrackerTestApp/app/src/androidTest/java/appnexus/com/trackertestapp/TestResponsesUT.java index 8f5aa061..7398c57d 100644 --- a/tests/TrackerTestApp/app/src/androidTest/java/appnexus/com/trackertestapp/TestResponsesUT.java +++ b/tests/TrackerTestApp/app/src/androidTest/java/appnexus/com/trackertestapp/TestResponsesUT.java @@ -57,9 +57,9 @@ public static void setTestURL(String url) { private static final String MRAID_CONTENT = ""; private static final String NATIVE_MAIN_MEDIA = "[{\"url\":\"%s\",\"width\":%d,\"height\":%d,\"label\":\"default\"},{\"url\":\"%s\",\"width\":%d,\"height\":%d},{\"url\":\"%s\",\"width\":%d,\"height\":%d}]"; private static final String NATIVE_RATING = "{\"value\":%.2f,\"scale\":%.2f}"; - private static final String RTB_NATIVE_VIEWABILITY_CONFIG = ""; - private static final String RTB_NATIVE_RENDERER_VIEWABILITY_CONFIG = ""; - private static final String CSM_NATIVE_VIEWABILITY_CONFIG = ""; + private static final String RTB_NATIVE_VIEWABILITY_CONFIG = ""; + private static final String RTB_NATIVE_RENDERER_VIEWABILITY_CONFIG = ""; + private static final String CSM_NATIVE_VIEWABILITY_CONFIG = ""; // template strings private static final String CLASSNAME = "com.appnexus.opensdk.testviews.%s"; @@ -187,7 +187,7 @@ public static void setTestURL(String url) { " \"mraid_2\",\n" + " \"ormma\"\n" + " ],\n" + - " \"content\": \"adnxs00:00:32\"\n" + + " \"content\": \"adnxs00:00:32\"\n" + " }\n" + " }\n" + " }\n" + @@ -216,7 +216,7 @@ public static void setTestURL(String url) { " \"client_initiated_ad_counting\": true,\n" + " \"rtb\": {\n" + " \"banner\": {\n" + - " \"content\": \"
\",\n" + + " \"content\": \"
\",\n" + " \"width\": 300,\n" + " \"height\": 250\n" + " },\n" +