Bug 1495301 - Disbale payment-request web-platform tests on non-nightly build. r=a=test-only,revert
authorEden Chuang <echuang@mozilla.com>
Fri, 12 Oct 2018 14:40:43 +0200
changeset 489302 8ce5fe12ae8d888639369cda659cb3c9130efc80
parent 489301 14243af871cc5419810f3e9638e62a6962ed401c
child 489303 ba1ab0b667800182fbcb56a5ffc7b0933fe50433
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersa
bugs1495301
milestone64.0a1
Bug 1495301 - Disbale payment-request web-platform tests on non-nightly build. r=a=test-only,revert
dom/payments/PaymentRequest.cpp
testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini
testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html.ini
testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy.https.sub.html.ini
testing/web-platform/meta/feature-policy/payment-default-feature-policy.https.sub.html.ini
testing/web-platform/meta/feature-policy/payment-disabled-by-feature-policy.https.sub.html.ini
testing/web-platform/meta/payment-request/__dir__.ini
--- a/dom/payments/PaymentRequest.cpp
+++ b/dom/payments/PaymentRequest.cpp
@@ -55,21 +55,24 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(PaymentRequest, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(PaymentRequest, DOMEventTargetHelper)
 
 bool
 PaymentRequest::PrefEnabled(JSContext* aCx, JSObject* aObj)
 {
+#ifdef NIGHTLY_BUILD
   if (!XRE_IsContentProcess()) {
     return false;
   }
-
   return StaticPrefs::dom_payments_request_enabled();
+#else
+  return false;
+#endif
 }
 
 nsresult
 PaymentRequest::IsValidStandardizedPMI(const nsAString& aIdentifier,
                                        nsAString& aErrorMsg)
 {
   /*
    *   The syntax of a standardized payment method identifier is given by the
--- a/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini
+++ b/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html.ini
@@ -1,9 +1,11 @@
 [payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html]
+  disabled:
+    if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
   [Feature-Policy allow="payment" allows same-origin relocation.]
     expected:
       if not e10s: FAIL
 
   [Feature-Policy allow="payment" disallows cross-origin relocation.]
     expected:
       if not e10s: FAIL
 
--- a/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html.ini
+++ b/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html.ini
@@ -1,8 +1,10 @@
 [payment-allowed-by-feature-policy-attribute.https.sub.html]
+  disabled:
+    if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
   [Feature policy "payment" can be enabled in same-origin iframe using allow="payment" attribute]
     expected:
       if not e10s: FAIL
 
   [Feature policy "payment" can be enabled in cross-origin iframe using allow="payment" attribute]
     expected: FAIL
 
--- a/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy.https.sub.html.ini
+++ b/testing/web-platform/meta/feature-policy/payment-allowed-by-feature-policy.https.sub.html.ini
@@ -1,9 +1,11 @@
 [payment-allowed-by-feature-policy.https.sub.html]
+  disabled:
+    if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
   [Feature-Policy header {"payment" : ["*"\]} allows the top-level document.]
     expected:
       if not e10s: FAIL
 
   [Feature-Policy header {"payment" : ["*"\]} allows same-origin iframes.]
     expected:
       if not e10s: FAIL
 
--- a/testing/web-platform/meta/feature-policy/payment-default-feature-policy.https.sub.html.ini
+++ b/testing/web-platform/meta/feature-policy/payment-default-feature-policy.https.sub.html.ini
@@ -1,9 +1,11 @@
 [payment-default-feature-policy.https.sub.html]
+  disabled:
+    if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
   [Default "payment" feature policy ["self"\] allows the top-level document.]
     expected:
       if not e10s: FAIL
 
   [Default "payment" feature policy ["self"\] allows same-origin iframes.]
     expected:
       if not e10s: FAIL
 
--- a/testing/web-platform/meta/feature-policy/payment-disabled-by-feature-policy.https.sub.html.ini
+++ b/testing/web-platform/meta/feature-policy/payment-disabled-by-feature-policy.https.sub.html.ini
@@ -1,5 +1,7 @@
 [payment-disabled-by-feature-policy.https.sub.html]
+  disabled:
+    if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301
   [Feature-Policy header {"payment" : [\]} disallows the top-level document.]
     expected:
       if not e10s: FAIL
 
--- a/testing/web-platform/meta/payment-request/__dir__.ini
+++ b/testing/web-platform/meta/payment-request/__dir__.ini
@@ -1,1 +1,3 @@
 prefs: [dom.payments.request.enabled:true]
+disabled:
+  if not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1495301