[chromium] Rebaseline 7 media/video-* tests on Linux and Mac.

* platform/chromium-linux/media/video-aspect-ratio-expected.png:
* platform/chromium-linux/media/video-colorspace-yuv420-expected.png:
* platform/chromium-linux/media/video-colorspace-yuv422-expected.png:
* platform/chromium-linux/media/video-layer-crash-expected.png:
* platform/chromium-linux/media/video-transformed-expected.png:
* platform/chromium-linux/media/video-zoom-controls-expected.png:
* platform/chromium-linux/platform/chromium/media/video-frame-size-change-expected.png:
* platform/chromium-mac-lion/media/video-aspect-ratio-expected.png: Added.
* platform/chromium-mac-lion/media/video-colorspace-yuv420-expected.png: Added.
* platform/chromium-mac-lion/media/video-colorspace-yuv422-expected.png: Added.
* platform/chromium-mac-lion/media/video-layer-crash-expected.png: Added.
* platform/chromium-mac-lion/media/video-transformed-expected.png: Added.
* platform/chromium-mac-lion/media/video-zoom-controls-expected.png: Added.
* platform/chromium-mac-lion/platform/chromium/media/video-frame-size-change-expected.png: Added.
* platform/chromium-mac-snowleopard/media/video-aspect-ratio-expected.png:
* platform/chromium-mac-snowleopard/media/video-colorspace-yuv420-expected.png:
* platform/chromium-mac-snowleopard/media/video-colorspace-yuv422-expected.png:
* platform/chromium-mac-snowleopard/media/video-layer-crash-expected.png:
* platform/chromium-mac-snowleopard/media/video-transformed-expected.png:
* platform/efl-wk1/media/video-aspect-ratio-expected.png: Renamed from LayoutTests/platform/efl/media/video-aspect-ratio-expected.png.
* platform/efl-wk1/media/video-colorspace-yuv420-expected.png: Renamed from LayoutTests/platform/efl/media/video-colorspace-yuv420-expected.png.
* platform/efl-wk1/media/video-colorspace-yuv422-expected.png: Renamed from LayoutTests/platform/efl/media/video-colorspace-yuv422-expected.png.
* platform/efl-wk1/media/video-layer-crash-expected.png: Renamed from LayoutTests/platform/efl/media/video-layer-crash-expected.png.
* platform/efl-wk1/media/video-transformed-expected.png: Renamed from LayoutTests/platform/efl/media/video-transformed-expected.png.
* platform/efl-wk1/media/video-zoom-controls-expected.png: Renamed from LayoutTests/platform/efl/media/video-zoom-controls-expected.png.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Rebaseline media/video-zoom.html.

* platform/chromium-linux/media/video-zoom-expected.png:
* platform/chromium-mac-lion/media/video-zoom-expected.png: Added.
* platform/chromium-mac-snowleopard/media/video-zoom-expected.png:
* platform/efl-wk1/media/video-zoom-expected.png: Renamed from LayoutTests/platform/efl/media/video-zoom-expected.png.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Script run from an isolated world should bypass a page's CSP.
https://bugs.webkit.org/show_bug.cgi?id=97398

Reviewed by Adam Barth.

Source/WebCore:

A page's Content Security Policy currently applies to all resources
loaded, regardless of their source. That generally makes sense, but
proves problematic when considering script run from an isolated
world (Chrome extensions, for instance). These scripts should be allowed
to inject resources into a page's DOM without eiher being restricted by
the page's active CSP, or generating violation reports that spam the
page owner.

Ideally, the isolated world could define its own Content Security Policy
which should be applied to resources it loads. For the moment, this
patch accepts a String that we can parse later on, but only uses it in
a binary way. If a non-empty policy String is provided, we bypass the
main world's CSP checks. If an empty String is provided, the main
world's CSP checks remain active.

Test: http/tests/security/isolatedWorld/bypass-main-world-csp.html

(WebCore::isolatedWorldContentSecurityPolicies):
(WebCore::DOMWrapperWorld::isolatedWorldHasContentSecurityPolicy):
(WebCore::DOMWrapperWorld::setIsolatedWorldContentSecurityPolicy):
(WebCore::DOMWrapperWorld::clearIsolatedWorldContentSecurityPolicy):
* bindings/v8/DOMWrapperWorld.h:
(DOMWrapperWorld):
    Mechanisms for setting and clearing Content Security Policies from
    isolated worlds; implemented in the same HashMappy way as
    SecurityOrigin.
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
(WebCore):
* bindings/v8/ScriptController.h:
(ScriptController):
    Adding a method to ScriptController to query the state of the
    current world's Content Security Policy. We'll drop this once we can
    apply a policy more directly, but for the moment it's necessary for
    the next bit.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::canRequest):
    Check the new ScriptController method, and only perform CSP checks
    when loading resources if we're executing code from the main world,
    or an isolated world with no Content Security Policy set.

Source/WebKit/chromium:

* public/WebFrame.h:
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::setIsolatedWorldSecurityOrigin):
(WebKit):
(WebKit::WebFrameImpl::setIsolatedWorldContentSecurityPolicy):
* src/WebFrameImpl.h:
(WebFrameImpl):
    Piping a Content Security Policy through WebFrame, in the same way
    we're currently doing for SecurityOrigin. As a drive-by, this also
    uses the static method on DOMWrapperWindow to set the security
    origin, rather than routing through the frame's ScriptController.

Tools:

* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
(DRTTestRunner::setIsolatedWorldContentSecurityPolicy):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
    Adding a mechanism to set the Content Security Policy for an
    isolated world to Chromium's testRunner.

LayoutTests:

* http/tests/security/isolatedWorld/bypass-main-world-csp-expected.txt: Added.
* http/tests/security/isolatedWorld/bypass-main-world-csp.html: Added.
* platform/efl/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
    Skip the new tests on ports that don't support the new functionality


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