Test more features of content extensions.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Feb 2015 23:37:07 +0000 (23:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Feb 2015 23:37:07 +0000 (23:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=142100

Patch by Alex Christensen <achristensen@webkit.org> on 2015-02-27
Reviewed by Brady Eidson.

* http/tests/usercontentfilter/basic-filter.html:
* http/tests/usercontentfilter/basic-filter.html.json:
* platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt:

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

LayoutTests/ChangeLog
LayoutTests/http/tests/usercontentfilter/basic-filter.html
LayoutTests/http/tests/usercontentfilter/basic-filter.html.json
LayoutTests/platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt

index 9f800a5..959a986 100644 (file)
@@ -1,3 +1,14 @@
+2015-02-27  Alex Christensen  <achristensen@webkit.org>
+
+        Test more features of content extensions.
+        https://bugs.webkit.org/show_bug.cgi?id=142100
+
+        Reviewed by Brady Eidson.
+
+        * http/tests/usercontentfilter/basic-filter.html:
+        * http/tests/usercontentfilter/basic-filter.html.json:
+        * platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt:
+
 2015-02-27  Alexey Proskuryakov  <ap@apple.com>
 
         Some WebGL tests fail on ATI hardware
index 4de5ec8..fe3cd7c 100644 (file)
@@ -1,4 +1,10 @@
 <body>
-The image below should not actually load.<br>
-<img src="http://localhost:8000/resources/square100.png">
+The images below should load.<br>
+<img src="http://127.0.0.1:8000/resources/square100.png?not_local_host"><br>
+<img src="http://localhost:8000/resources/square100.png?whitelist"><br>
+<img src="http://127.0.0.1:8000/resources/square100.png?whitelist_before_localhost"><br>
+The images below should be blocked.<br>
+<img src="http://localhost:8000/resources/square100.png"><br>
+<img src="http://127.0.0.1:8000/resources/square100.png?localhost_not_at_end"><br>
+<img src="http://127.0.0.1:8000/resources/square100.png?ends_with_localhost"><br>
 </body>
index 2171c2e..cc4239b 100644 (file)
@@ -4,7 +4,15 @@
             "type": "block"
         },
         "trigger": {
-            "url-filter": "http://localhost"
+            "url-filter": ".*localhost"
+        }
+    },
+    {
+        "action": {
+            "type": "ignore-previous-rules"
+        },
+        "trigger": {
+            "url-filter": ".*whitelist"
         }
     }
-]
\ No newline at end of file
+]
index cbd4247..72c4677 100644 (file)
@@ -3,8 +3,21 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderText {#text} at (0,0) size 273x18
-        text run at (0,0) width 273: "The image below should not actually load."
-      RenderBR {BR} at (272,14) size 1x0
-      RenderImage {IMG} at (0,18) size 0x0
-      RenderText {#text} at (0,0) size 0x0
+      RenderText {#text} at (0,0) size 200x18
+        text run at (0,0) width 200: "The images below should load."
+      RenderBR {BR} at (199,14) size 1x0
+      RenderImage {IMG} at (0,18) size 100x100
+      RenderBR {BR} at (100,118) size 0x0
+      RenderImage {IMG} at (0,118) size 100x100
+      RenderBR {BR} at (100,218) size 0x0
+      RenderImage {IMG} at (0,218) size 100x100
+      RenderBR {BR} at (100,318) size 0x0
+      RenderText {#text} at (0,318) size 242x18
+        text run at (0,318) width 242: "The images below should be blocked."
+      RenderBR {BR} at (241,332) size 1x0
+      RenderImage {IMG} at (0,336) size 0x0
+      RenderBR {BR} at (0,336) size 0x0
+      RenderImage {IMG} at (0,336) size 0x0
+      RenderBR {BR} at (0,336) size 0x0
+      RenderImage {IMG} at (0,336) size 0x0
+      RenderBR {BR} at (0,336) size 0x0