diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 05:06:29 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 05:06:29 +0000 |
commit | f8554294db9c534f2cf4c0069bd705dd490f9d67 (patch) | |
tree | dc26caa184546477ee290910832df7a168a46bb3 /chrome_frame/html_utils.cc | |
parent | d2177996db8711c972258e43d70ed90252170441 (diff) | |
download | chromium_src-f8554294db9c534f2cf4c0069bd705dd490f9d67.zip chromium_src-f8554294db9c534f2cf4c0069bd705dd490f9d67.tar.gz chromium_src-f8554294db9c534f2cf4c0069bd705dd490f9d67.tar.bz2 |
ChromeFrame tests now use the mock http server instead of the python web server. This allows
us to control the behavior of the http server in the future.
The change in the \chrome_frame_tester_helpers.js file is to send over asynchronous XHR post
requests to prevent the browser from blocking in the UI thread while waiting for a response.
We copy the the CFInstall and CFInstance scripts to the test\data folder to enable the mock
server to serve them. Added support for the /echoheader? based GET requests. Some ChromeFrame
tests rely on this.
Bug=54908
Review URL: http://codereview.chromium.org/3356013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/html_utils.cc')
-rw-r--r-- | chrome_frame/html_utils.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome_frame/html_utils.cc b/chrome_frame/html_utils.cc index 0f7d8ab..afe4378 100644 --- a/chrome_frame/html_utils.cc +++ b/chrome_frame/html_utils.cc @@ -386,4 +386,14 @@ bool HasFrameBustingHeader(const std::string& http_headers) { return false; } +std::string GetHttpHeaderFromHeaderList(const std::string& header, + const std::string& headers) { + net::HttpUtil::HeadersIterator it(headers.begin(), headers.end(), "\r\n"); + while (it.GetNext()) { + if (!lstrcmpiA(it.name().c_str(), header.c_str())) + return std::string(it.values_begin(), it.values_end()); + } + return std::string(); +} + } // namespace http_utils |