⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 197085 in webkit


Ignore:
Timestamp:
Feb 25, 2016, 2:26:42 AM (11 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r196878 - Attempt to fix the Content Extension test failures following <​https://trac.webkit.org/changeset/196875>
(​https://bugs.webkit.org/show_bug.cgi?id=154307)

Convert Content Extension tests that use the Content Security Policy directive report-uri from HTML files
to PHP scripts and modified them to define the content security policy for the page via the Content-Security-Policy
HTTP header instead of via a meta element so that the report-uri directive is honored. Following
<​https://trac.webkit.org/changeset/196875> the directive report-uri is only honored when contained in a
policy that is delivered via an HTTP header. That is, it is no longer honored when delivered in a meta element.

  • http/tests/contentextensions/block-cookies-in-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.
  • http/tests/contentextensions/block-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.
  • http/tests/contentextensions/hide-on-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.

Merge r196879 - Another attempt to fix the Content Extension test failures following <​https://trac.webkit.org/changeset/196875>
(​https://bugs.webkit.org/show_bug.cgi?id=154307)

Rename Content Extension JSON files so that they are associated with tests http/tests/contentextensions/block-cookies-in-csp-report.php
http/tests/contentextensions/block-csp-report.php and http/tests/contentextensions/hide-on-csp-report.php. These
files were formerly named block-cookies-in-csp-report.html, block-csp-report.html, and hide-on-csp-report.html,
respectively, prior to <​https://trac.webkit.org/changeset/196878>. Also, update expected result for test block-csp-report.html
following <​https://trac.webkit.org/changeset/196878>.

  • http/tests/contentextensions/block-cookies-in-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.json.
  • http/tests/contentextensions/block-csp-report-expected.txt:
  • http/tests/contentextensions/block-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.json.
  • http/tests/contentextensions/hide-on-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.json.
Location:
releases/WebKitGTK/webkit-2.12/LayoutTests
Files:
2 edited
6 moved

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.12/LayoutTests/ChangeLog

    r197084 r197085  
     12016-02-21  Daniel Bates  <dabates@apple.com>
     2
     3        Another attempt to fix the Content Extension test failures following <https://trac.webkit.org/changeset/196875>
     4        (https://bugs.webkit.org/show_bug.cgi?id=154307)
     5
     6        Rename Content Extension JSON files so that they are associated with tests http/tests/contentextensions/block-cookies-in-csp-report.php
     7        http/tests/contentextensions/block-csp-report.php and http/tests/contentextensions/hide-on-csp-report.php. These
     8        files were formerly named block-cookies-in-csp-report.html, block-csp-report.html, and hide-on-csp-report.html,
     9        respectively, prior to <https://trac.webkit.org/changeset/196878>. Also, update expected result for test block-csp-report.html
     10        following <https://trac.webkit.org/changeset/196878>.
     11
     12        * http/tests/contentextensions/block-cookies-in-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.json.
     13        * http/tests/contentextensions/block-csp-report-expected.txt:
     14        * http/tests/contentextensions/block-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.json.
     15        * http/tests/contentextensions/hide-on-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.json.
     16
     172016-02-21  Daniel Bates  <dabates@apple.com>
     18
     19        Attempt to fix the Content Extension test failures following <https://trac.webkit.org/changeset/196875>
     20        (https://bugs.webkit.org/show_bug.cgi?id=154307)
     21
     22        Convert Content Extension tests that use the Content Security Policy directive report-uri from HTML files
     23        to PHP scripts and modified them to define the content security policy for the page via the Content-Security-Policy
     24        HTTP header instead of via a meta element so that the report-uri directive is honored. Following
     25        <https://trac.webkit.org/changeset/196875> the directive report-uri is only honored when contained in a
     26        policy that is delivered via an HTTP header. That is, it is no longer honored when delivered in a meta element.
     27
     28        * http/tests/contentextensions/block-cookies-in-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.
     29        * http/tests/contentextensions/block-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.
     30        * http/tests/contentextensions/hide-on-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.
     31
    1322016-02-21  Daniel Bates  <dabates@apple.com>
    233
  • releases/WebKitGTK/webkit-2.12/LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.php

    r197084 r197085  
     1<?php
     2    header("Content-Security-Policy: img-src 'self'; report-uri /contentextensions/resources/save-ping.php?test=contentextensions-block-cookies-in-csp-report");
     3?>
    14<head>
    2 <meta http-equiv="Content-Security-Policy" content="img-src 'self'; report-uri /contentextensions/resources/save-ping.php?test=contentextensions-block-cookies-in-csp-report">
    35<script>
    46if (window.testRunner) {
  • releases/WebKitGTK/webkit-2.12/LayoutTests/http/tests/contentextensions/block-csp-report-expected.txt

    r191167 r197085  
    11CONSOLE MESSAGE: Refused to load the image 'http://localhost/foo.png' because it violates the following Content Security Policy directive: "img-src 'self'".
    22
    3 CONSOLE MESSAGE: line 34: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/block-csp-report.html from loading a resource from http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-block-csp-report
     3CONSOLE MESSAGE: line 33: Content blocker prevented frame displaying http://127.0.0.1:8000/contentextensions/block-csp-report.php from loading a resource from http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-block-csp-report
    44This test creates a CSP violation report, but the report URL matches a 'block' rule. 
    55
  • releases/WebKitGTK/webkit-2.12/LayoutTests/http/tests/contentextensions/block-csp-report.php

    r197084 r197085  
     1<?php
     2    header("Content-Security-Policy: img-src 'self'; report-uri http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-block-csp-report");
     3?>
    14<head>
    2 <meta http-equiv="Content-Security-Policy" content="img-src 'self'; report-uri http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-block-csp-report">
    35<script>
    46if (window.testRunner) {
  • releases/WebKitGTK/webkit-2.12/LayoutTests/http/tests/contentextensions/hide-on-csp-report.php

    r197084 r197085  
     1<?php
     2    header("Content-Security-Policy: img-src 'self'; report-uri http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-hide-on-csp-report");
     3?>
    14<head>
    2 <meta http-equiv="Content-Security-Policy" content="img-src 'self'; report-uri http://localhost:8000/contentextensions/resources/save-ping.php?test=contentextensions-hide-on-csp-report">
    35<script>
    46if (window.testRunner) {
Note: See TracChangeset for help on using the changeset viewer.