Set test conditions closer to conversion redirect in LayoutTests/http/tests/adClickAt...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 21:35:13 +0000 (21:35 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 21:35:13 +0000 (21:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196983
<rdar://problem/49952679>

Unreviewed test gardening.

* http/tests/adClickAttribution/resources/redirectToConversion.php:
* http/tests/adClickAttribution/send-attribution-conversion-request.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244359 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/adClickAttribution/resources/redirectToConversion.php
LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html

index 3684f83..b647b69 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-16  John Wilander  <wilander@apple.com>
+
+        Set test conditions closer to conversion redirect in LayoutTests/http/tests/adClickAttribution/send-attribution-conversion-request.html
+        https://bugs.webkit.org/show_bug.cgi?id=196983
+        <rdar://problem/49952679>
+
+        Unreviewed test gardening.
+
+        * http/tests/adClickAttribution/resources/redirectToConversion.php:
+        * http/tests/adClickAttribution/send-attribution-conversion-request.html:
+
 2019-04-16  Devin Rousso  <drousso@apple.com>
 
         Unprefix -webkit-sticky
 2019-04-16  Devin Rousso  <drousso@apple.com>
 
         Unprefix -webkit-sticky
index 1ad333c..3d71a83 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 header("HTTP/1.0 302 Found");
 <?php
 header("HTTP/1.0 302 Found");
+header("Cache-Control: no-cache, no-store, must-revalidate");
 if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
   header("Location: /.well-known/ad-click-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
 } else if (isset($_GET["conversionData"])) {
 if (isset($_GET["conversionData"]) && isset($_GET["priority"])) {
   header("Location: /.well-known/ad-click-attribution/" . $_GET["conversionData"] . "/" . $_GET["priority"]);
 } else if (isset($_GET["conversionData"])) {
index f8e2696..000987f 100644 (file)
@@ -18,7 +18,6 @@
         testRunner.waitUntilDone();
         testRunner.dumpChildFramesAsText();
         testRunner.setAllowsAnySSLCertificate(true);
         testRunner.waitUntilDone();
         testRunner.dumpChildFramesAsText();
         testRunner.setAllowsAnySSLCertificate(true);
-        testRunner.setAdClickAttributionOverrideTimerForTesting(true);
     }
 
     function activateElement(elementID) {
     }
 
     function activateElement(elementID) {
         document.body.removeChild(document.getElementById("pixel"));
 
         let iframeElement = document.createElement("iframe");
         document.body.removeChild(document.getElementById("pixel"));
 
         let iframeElement = document.createElement("iframe");
-        iframeElement.src = "http://127.0.0.1:8000/adClickAttribution/resources/getConversionData.php?endTest=true&timeout_ms=4000&nonce=" + nonce;
+        iframeElement.src = "http://127.0.0.1:8000/adClickAttribution/resources/getConversionData.php?endTest=true&timeout_ms=2000&nonce=" + nonce;
         document.body.appendChild(iframeElement);
     }
 
     function runTest() {
         if (window.testRunner) {
             if (window.location.search === "?stepTwo") {
         document.body.appendChild(iframeElement);
     }
 
     function runTest() {
         if (window.testRunner) {
             if (window.location.search === "?stepTwo") {
-                testRunner.setAdClickAttributionConversionURLForTesting("http://127.0.0.1:8000/adClickAttribution/resources/conversionReport.php?nonce=" + nonce);
                 let imageElement = document.createElement("img");
                 let imageElement = document.createElement("img");
-                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12";
+                imageElement.src = "https://127.0.0.1:8443/adClickAttribution/resources/redirectToConversion.php?conversionData=12&nonce=" + nonce;
                 imageElement.id = "pixel";
                 imageElement.onerror = function() {
                     appendConversionDataIframeAndFinish();
                 };
                 imageElement.id = "pixel";
                 imageElement.onerror = function() {
                     appendConversionDataIframeAndFinish();
                 };
+                testRunner.setAdClickAttributionConversionURLForTesting("http://127.0.0.1:8000/adClickAttribution/resources/conversionReport.php?nonce=" + nonce);
+                testRunner.setAdClickAttributionOverrideTimerForTesting(true);
                 document.body.appendChild(imageElement);
             } else {
                 activateElement("targetLink");
                 document.body.appendChild(imageElement);
             } else {
                 activateElement("targetLink");