XSSAuditor should block pages by redirecting to a sandboxed data: URL.
https://bugs.webkit.org/show_bug.cgi?id=110406

Reviewed by Adam Barth.

Source/WebCore:

Patch originally by mkwst@chromium.org.
Tests: http/tests/security/xssAuditor/block-does-not-leak-location.html
       http/tests/security/xssAuditor/block-does-not-leak-referrer.html
       http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html

* html/parser/XSSAuditorDelegate.cpp:
(WebCore::XSSAuditorDelegate::didBlockScript):
    When blocking entire pages via the XSSAuditor, redirect to a data:
    URL to ensure that requests for properties don't leak information.

LayoutTests:

* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt: Added.
* http/tests/security/xssAuditor/block-does-not-leak-location.html: Added.
* http/tests/security/xssAuditor/block-does-not-leak-referrer-expected.txt: Added.
* http/tests/security/xssAuditor/block-does-not-leak-referrer.html: Added.
* http/tests/security/xssAuditor/full-block-base-href-expected.txt:
* http/tests/security/xssAuditor/full-block-base-href.html:
* http/tests/security/xssAuditor/full-block-get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url.html:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:
* http/tests/security/xssAuditor/full-block-javascript-link-expected.txt:
* http/tests/security/xssAuditor/full-block-javascript-link.html:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick.html:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag.html:
* http/tests/security/xssAuditor/full-block-post-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt: Added.
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html: Added.
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source.html:
* http/tests/security/xssAuditor/full-block-script-tag.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9.html:
* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-01-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-02.html:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03.html:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04.html:
    Rebaselined tests. Can no longer use final location of about:blank to
    indicate success.

* http/tests/security/xssAuditor/resources/utilities.js:
(checkIfFrameLocationMatchesSrcAndCallDone):
    Check final location against frame source (should only match when same
    origin and not blocked).

* http/tests/security/xssAuditor/resources/echo-intertag.pl:
    Clean up noise in httpd error log about undefined values.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Apache's HashMap.java translated into JavaScript as a JSRegress test

Rubber stamped by Geoffrey Garen.
        
* fast/js/regress/HashMap-put-get-iterate-keys.html: Added.
* fast/js/regress/HashMap-put-get-iterate.html: Added.
* fast/js/regress/HashMap-string-put-get-iterate.html: Added.
* fast/js/regress/script-tests/HashMap-put-get-iterate-keys.js: Added.
(HashMap):
(HashMap.):
(get var):
* fast/js/regress/script-tests/HashMap-put-get-iterate.js: Added.
(HashMap):
(HashMap.):
(get var):
* fast/js/regress/script-tests/HashMap-string-put-get-iterate.js: Added.
(HashMap):
(HashMap.):
(get var):



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