Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attributio...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 17:23:33 +0000 (17:23 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Apr 2019 17:23:33 +0000 (17:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196476

Patch by Alex Christensen <achristensen@webkit.org> on 2019-04-03
Reviewed by Chris Dumez.

Source/WebKit:

Re-apply a change I reverted in r241754 now that it's safe to do so.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):

LayoutTests:

* http/tests/adClickAttribution/store-ad-click-attribution-expected.txt:

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

LayoutTests/ChangeLog
LayoutTests/http/tests/adClickAttribution/store-ad-click-attribution-expected.txt
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index 7b6f41a..719ebb1 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-03  Alex Christensen  <achristensen@webkit.org>
+
+        Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
+        https://bugs.webkit.org/show_bug.cgi?id=196476
+
+        Reviewed by Chris Dumez.
+
+        * http/tests/adClickAttribution/store-ad-click-attribution-expected.txt:
+
 2019-04-03  Daniel Bates  <dabates@apple.com>
 
         [iOS] Should be able to dismiss picker or popover using the keyboard
index 5be66cf..8ab7f9e 100644 (file)
@@ -1,4 +1,8 @@
 Tests storage of ad click attribution.
 
 
-No stored Ad Click Attribution data.
\ No newline at end of file
+WebCore::AdClickAttribution 1
+Source: 127.0.0.1
+Destination: localhost
+Campaign ID: 3
+No conversion data.
index 38a016f..c308dff 100644 (file)
@@ -1,3 +1,15 @@
+2019-04-03  Alex Christensen  <achristensen@webkit.org>
+
+        Resurrect and fix layout test http/tests/adClickAttribution/store-ad-click-attribution.html
+        https://bugs.webkit.org/show_bug.cgi?id=196476
+
+        Reviewed by Chris Dumez.
+
+        Re-apply a change I reverted in r241754 now that it's safe to do so.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didCommitLoadForFrame):
+
 2019-04-03  Daniel Bates  <dabates@apple.com>
 
         [iOS] Should be able to dismiss picker or popover using the keyboard
index 4e39ad3..12c3344 100644 (file)
@@ -4145,6 +4145,13 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, uint64_t navigationID
 
     frame->didCommitLoad(mimeType, webCertificateInfo, containsPluginDocument);
 
+    if (navigation && frame->isMainFrame()) {
+        if (auto& adClickAttribution = navigation->adClickAttribution()) {
+            if (adClickAttribution->destination().matches(frame->url()))
+                m_process->processPool().sendToNetworkingProcess(Messages::NetworkProcess::StoreAdClickAttribution(m_websiteDataStore->sessionID(), *adClickAttribution));
+        }
+    }
+
     if (frame->isMainFrame()) {
         m_mainFrameHasCustomContentProvider = frameHasCustomContentProvider;