1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/base/tests/roboextender/paymentsUI.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,25 @@ 1.4 +<html> 1.5 + <head> 1.6 + <script type="text/javascript"> 1.7 +function start() { 1.8 + if (!mozPaymentProvider) 1.9 + window.close(); 1.10 + 1.11 + // We don't have a way to mock these values yet. This check just makes sure the world 1.12 + // doesn't crash if we ask for them. 1.13 + var mcc = mozPaymentProvider.mcc; 1.14 + var mnc = mozPaymentProvider.mnc; 1.15 + 1.16 + // We use the jwt passed in here to test calling paymentFailed/Success 1.17 + if (window.location.hash == "#pass") 1.18 + mozPaymentProvider.paymentSuccess("PAID CORRECTLY"); 1.19 + else if (window.location.hash == "#fail") 1.20 + mozPaymentProvider.paymentFailed("FAILED CORRECTLY"); 1.21 + else 1.22 + mozPaymentProvider.paymentFailed("invalid hash " + window.location.hash); 1.23 +} 1.24 + 1.25 +document.addEventListener("DOMContentLoaded", start); 1.26 + </script> 1.27 + </head> 1.28 +</html>