Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6337)

Unified Diff: chrome_frame/test/html_util_unittests.cc

Issue 521072: Attempt 2 at landing this.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/test/data/fulltab_delete_cookie_test.html.mock-http-headers ('k') | net/base/cookie_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/test/html_util_unittests.cc
===================================================================
--- chrome_frame/test/html_util_unittests.cc (revision 35771)
+++ chrome_frame/test/html_util_unittests.cc (working copy)
@@ -5,6 +5,8 @@
#include <windows.h>
#include <atlsecurity.h>
#include <shellapi.h>
+#include <string>
+#include <vector>
#include "base/basictypes.h"
#include "base/file_util.h"
@@ -22,6 +24,7 @@
#include "chrome_frame/chrome_frame_delegate.h"
#include "chrome_frame/html_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "chrome/browser/automation/url_request_automation_job.h"
const char kChromeFrameUserAgent[] = "chromeframe";
@@ -360,4 +363,25 @@
"X-Frame-Options: ALLOWall\r\n"));
}
+TEST(HttpCookieTest, IdentifyDuplicateCookieTest) {
+ std::vector<std::string> header_cookies;
+ header_cookies.push_back("BLAHHH; Path=/;");
+ EXPECT_FALSE(URLRequestAutomationJob::IsCookiePresentInCookieHeader(
+ "BLAHHH=1", header_cookies));
+
+ header_cookies.clear();
+
+ header_cookies.push_back("BLAHHH=1; Path=/;");
+
+ EXPECT_TRUE(URLRequestAutomationJob::IsCookiePresentInCookieHeader(
+ "BLAHHH=1", header_cookies));
+
+ header_cookies.clear();
+
+ header_cookies.push_back("BLAH=1; Path=/blah;");
+
+ EXPECT_FALSE(URLRequestAutomationJob::IsCookiePresentInCookieHeader(
+ "BLAH", header_cookies));
+}
+
« no previous file with comments | « chrome_frame/test/data/fulltab_delete_cookie_test.html.mock-http-headers ('k') | net/base/cookie_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698