WebCore:
2008-10-23 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=21787
Update postMessage to send origin = "null" for non-serializable
origins to match latest spec. Merge SecurityOrigin::toString and
SecurityOrigin::toHTTPOrigin because they are now the same.
Test: http/tests/security/postMessage/data-url-sends-null-origin.html
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::outgoingOrigin):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::addHTTPOriginIfNeeded):
(WebCore::FrameLoader::loadItem):
* loader/loader.cpp:
(WebCore::Loader::Host::servePendingRequests):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::toString):
* page/SecurityOrigin.h:
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
(WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
(WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
(WebCore::XMLHttpRequest::didReceiveResponsePreflight):
LayoutTests:
2008-10-23 Adam Barth <abarth@webkit.org>
Reviewed by Sam Weinig.
https://bugs.webkit.org/show_bug.cgi?id=21787
Add test coverage for postMessaging from a data URL.
* http/tests/security/postMessage/data-url-sends-null-origin-expected.txt: Added.
* http/tests/security/postMessage/data-url-sends-null-origin.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed