From 65e82a56b3f1ca882db8c53f07781ecdc6cb7ece Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Tue, 23 Nov 2010 00:34:27 +0000 Subject: 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 --- chrome/test/data/npapi/geturl_redirect_notify.html | 26 ++++++++++++++++++++++ .../data/npapi/plugin_read_page_redirect_src.html | 4 ++++ ...n_read_page_redirect_src.html.mock-http-headers | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 chrome/test/data/npapi/geturl_redirect_notify.html create mode 100644 chrome/test/data/npapi/plugin_read_page_redirect_src.html create mode 100644 chrome/test/data/npapi/plugin_read_page_redirect_src.html.mock-http-headers (limited to 'chrome/test/data') 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 @@ + + + + + + + + +
+Test running.... +
+ + +GetURL Test

+This test fetches a URL via the plugin and validates that the plugin does +receive notification about the redirect which is then denied. + + + + + 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 @@ + +Test redirect page +Redirect page. This page redirects to another page. + 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 -- cgit v1.1