diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 00:34:27 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 00:34:27 +0000 |
commit | 65e82a56b3f1ca882db8c53f07781ecdc6cb7ece (patch) | |
tree | e224abcb3aa50320f55bf7a35bbf2e72ee0e0270 /chrome/test/data/npapi | |
parent | 52426e4c3b775666fa9fd52e1c52f8dbbbaadd49 (diff) | |
download | chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.zip chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.tar.gz chromium_src-65e82a56b3f1ca882db8c53f07781ecdc6cb7ece.tar.bz2 |
Implement NPAPI HTTP Redirect handling. This basically supports the NPAPI URL redirect
notifications which are sent out from the browser while processing URL requests issued
by the plugin via the NPN_GetURLNotify and NPN_PostURLNotify APIs.
For more info please see https://wiki.mozilla.org/NPAPI:HTTPRedirectHandling
As part of this CL we also block cross origin 307 POST url redirects.
Test=Covered by NPAPI UI test GetURLRedirectNotification
Bug=63030,63698
Review URL: http://codereview.chromium.org/5228007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/data/npapi')
3 files changed, 33 insertions, 0 deletions
diff --git a/chrome/test/data/npapi/geturl_redirect_notify.html b/chrome/test/data/npapi/geturl_redirect_notify.html new file mode 100644 index 0000000..568834d --- /dev/null +++ b/chrome/test/data/npapi/geturl_redirect_notify.html @@ -0,0 +1,26 @@ +<html> + +<head> +<script src="npapi.js"></script> +</head> + + +<body> +<div id="statusPanel" style="border: 1px solid red; width: 100%"> +Test running.... +</div> + + +GetURL Test<p> +This test fetches a URL via the plugin and validates that the plugin does +receive notification about the redirect which is then denied. + +<embed type="application/vnd.npapi-test" + src="foo" + name="geturlredirectnotify" + id="1" + mode="np_embed" +> + +</body> +</html> diff --git a/chrome/test/data/npapi/plugin_read_page_redirect_src.html b/chrome/test/data/npapi/plugin_read_page_redirect_src.html new file mode 100644 index 0000000..d359a54 --- /dev/null +++ b/chrome/test/data/npapi/plugin_read_page_redirect_src.html @@ -0,0 +1,4 @@ +<html> +<head><title>Test redirect page</title></head> +<body>Redirect page. This page redirects to another page.</body> +</html> diff --git a/chrome/test/data/npapi/plugin_read_page_redirect_src.html.mock-http-headers b/chrome/test/data/npapi/plugin_read_page_redirect_src.html.mock-http-headers new file mode 100644 index 0000000..0818be1 --- /dev/null +++ b/chrome/test/data/npapi/plugin_read_page_redirect_src.html.mock-http-headers @@ -0,0 +1,3 @@ +HTTP/1.1 301 Moved Permanently +Location: http://mock.http/npapi/plugin_read_page.html +Content-type: text/html |