Title: [191505] trunk/LayoutTests
- Revision
- 191505
- Author
- [email protected]
- Date
- 2015-10-23 12:06:23 -0700 (Fri, 23 Oct 2015)
Log Message
[Content Extensions] Add test for hiding content on <a ping> pings
https://bugs.webkit.org/show_bug.cgi?id=150499
Patch by Roopesh Chander <[email protected]> on 2015-10-23
Reviewed by Alex Christensen.
Test for ensuring that <a ping> pings are subject to
'css-display-none' content blocking rules.
* http/tests/contentextensions/hide-on-ping-expected.txt: Added.
* http/tests/contentextensions/hide-on-ping.html: Added.
* http/tests/contentextensions/hide-on-ping.html.json: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (191504 => 191505)
--- trunk/LayoutTests/ChangeLog 2015-10-23 19:01:34 UTC (rev 191504)
+++ trunk/LayoutTests/ChangeLog 2015-10-23 19:06:23 UTC (rev 191505)
@@ -1,3 +1,17 @@
+2015-10-23 Roopesh Chander <[email protected]>
+
+ [Content Extensions] Add test for hiding content on <a ping> pings
+ https://bugs.webkit.org/show_bug.cgi?id=150499
+
+ Reviewed by Alex Christensen.
+
+ Test for ensuring that <a ping> pings are subject to
+ 'css-display-none' content blocking rules.
+
+ * http/tests/contentextensions/hide-on-ping-expected.txt: Added.
+ * http/tests/contentextensions/hide-on-ping.html: Added.
+ * http/tests/contentextensions/hide-on-ping.html.json: Added.
+
2015-10-23 Simon Fraser <[email protected]>
REGRESSION (r187121): Multiple-keyframe animations not honouring ' forwards' fill-mode
Added: trunk/LayoutTests/http/tests/contentextensions/hide-on-ping-expected.txt (0 => 191505)
--- trunk/LayoutTests/http/tests/contentextensions/hide-on-ping-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/hide-on-ping-expected.txt 2015-10-23 19:06:23 UTC (rev 191505)
@@ -0,0 +1,10 @@
+This test follows a link with a ping attribute where the ping URL matches a 'css-display-none' rule.
+This text should remain visible.
+ Link with ping
+
+
+--------
+Frame: 'result_frame'
+--------
+Ping received.
+No cookies in ping.
Added: trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html (0 => 191505)
--- trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html 2015-10-23 19:06:23 UTC (rev 191505)
@@ -0,0 +1,41 @@
+<head>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpChildFramesAsText();
+ testRunner.overridePreference("WebKitHyperlinkAuditingEnabled", 1);
+ testRunner.waitUntilDone();
+}
+
+function clickOnLinkWithPing() {
+ if (window.eventSender) {
+ var a = document.getElementById("a");
+ var x = a.offsetLeft + 2;
+ var y = a.offsetTop + 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+}
+
+function showPingResult() {
+ var iframe = document.getElementById("result_frame");
+ iframe._onload_ = function() {
+ if (window.testRunner) { testRunner.notifyDone(); }
+ }
+ iframe.src = ""
+}
+</script>
+</head>
+
+<body>
+This test follows a link with a ping attribute where the ping URL matches a 'css-display-none' rule.
+<div class="foo">This text should be hidden once the ping is sent.</div>
+<div class="bar">This text should remain visible.</div>
+<div>
+<img src="" _onerror_="clickOnLinkWithPing();">
+<a id="a" href="" ping="resources/save-ping.php?test=contentextensions-hide-on-ping" _onclick_="showPingResult();">Link with ping</a>
+</div>
+<iframe id="result_frame"><!-- Will contain ping data received by server --></iframe>
+</body>
+
Added: trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html.json (0 => 191505)
--- trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html.json (rev 0)
+++ trunk/LayoutTests/http/tests/contentextensions/hide-on-ping.html.json 2015-10-23 19:06:23 UTC (rev 191505)
@@ -0,0 +1,11 @@
+[
+ {
+ "trigger": {
+ "url-filter": "save-ping.php"
+ },
+ "action": {
+ "type": "css-display-none",
+ "selector": ".foo"
+ }
+ }
+]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes