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

Unified Diff: chrome/test/webdriver/http_response_unittest.cc

Issue 10827362: Fix ChromeDriver flakiness with the C# webdriver bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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/test/webdriver/http_response.cc ('k') | chrome/test/webdriver/webdriver_dispatch.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/http_response_unittest.cc
diff --git a/chrome/test/webdriver/http_response_unittest.cc b/chrome/test/webdriver/http_response_unittest.cc
index 71be83f1ec8a51a4e9f6954cbd0af75c45ea9d90..4e204c6a92e6a471b9b57ee449de7d63c38b6f44 100644
--- a/chrome/test/webdriver/http_response_unittest.cc
+++ b/chrome/test/webdriver/http_response_unittest.cc
@@ -65,25 +65,17 @@ TEST(HttpResponseTest, CanSetMimeType) {
ExpectHeaderValue(response, "content-type", "text/html");
}
-TEST(HttpResponseTest, SetBody) {
+TEST(HttpResponseTest, GetData) {
HttpResponse response;
-
- std::string body("foo bar");
- response.SetBody(body);
- ASSERT_EQ(body.length(), response.length());
- ASSERT_EQ(body, std::string(response.data(), response.length()));
-
- // Grow the response size.
- body.append(" baz");
- response.SetBody(body);
- ASSERT_EQ(body.length(), response.length());
- ASSERT_EQ(body, std::string(response.data(), response.length()));
-
- // Shrink the response size.
- body = "small";
- response.SetBody(body);
- ASSERT_EQ(body.length(), response.length());
- ASSERT_EQ(body, std::string(response.data(), response.length()));
+ response.set_body("my body");
+ std::string data;
+ response.GetData(&data);
+ const char* expected =
+ "HTTP/1.1 200 OK\r\n"
+ "content-length:7\r\n"
+ "\r\n"
+ "my body";
+ ASSERT_STREQ(expected, data.c_str());
}
} // namespace webdriver
« no previous file with comments | « chrome/test/webdriver/http_response.cc ('k') | chrome/test/webdriver/webdriver_dispatch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698