OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 void didReceiveResponse(WebURLLoader* loader, const WebURLResponse& response
) | 149 void didReceiveResponse(WebURLLoader* loader, const WebURLResponse& response
) |
150 { | 150 { |
151 m_didReceiveResponse = true; | 151 m_didReceiveResponse = true; |
152 m_actualResponse = WebURLResponse(response); | 152 m_actualResponse = WebURLResponse(response); |
153 EXPECT_EQ(m_expectedLoader, loader); | 153 EXPECT_EQ(m_expectedLoader, loader); |
154 EXPECT_EQ(m_expectedResponse.url(), response.url()); | 154 EXPECT_EQ(m_expectedResponse.url(), response.url()); |
155 EXPECT_EQ(m_expectedResponse.httpStatusCode(), response.httpStatusCode()
); | 155 EXPECT_EQ(m_expectedResponse.httpStatusCode(), response.httpStatusCode()
); |
156 } | 156 } |
157 | 157 |
158 void didDownloadData(WebURLLoader* loader, int dataLength) | 158 void didDownloadData(WebURLLoader* loader, int dataLength, int encodedDataLe
ngth) |
159 { | 159 { |
160 m_didDownloadData = true; | 160 m_didDownloadData = true; |
161 EXPECT_EQ(m_expectedLoader, loader); | 161 EXPECT_EQ(m_expectedLoader, loader); |
162 } | 162 } |
163 | 163 |
164 void didReceiveData(WebURLLoader* loader, const char* data, int dataLength,
int encodedDataLength) | 164 void didReceiveData(WebURLLoader* loader, const char* data, int dataLength,
int encodedDataLength) |
165 { | 165 { |
166 m_didReceiveData = true; | 166 m_didReceiveData = true; |
167 EXPECT_EQ(m_expectedLoader, loader); | 167 EXPECT_EQ(m_expectedLoader, loader); |
168 EXPECT_TRUE(data); | 168 EXPECT_TRUE(data); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 m_expectedLoader->loadAsynchronously(request, this); | 622 m_expectedLoader->loadAsynchronously(request, this); |
623 serveRequests(); | 623 serveRequests(); |
624 EXPECT_TRUE(m_didReceiveResponse); | 624 EXPECT_TRUE(m_didReceiveResponse); |
625 EXPECT_TRUE(m_didReceiveData); | 625 EXPECT_TRUE(m_didReceiveData); |
626 EXPECT_TRUE(m_didFinishLoading); | 626 EXPECT_TRUE(m_didFinishLoading); |
627 | 627 |
628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); | 628 EXPECT_FALSE(m_actualResponse.httpHeaderField(headerNameString).isEmpty()); |
629 } | 629 } |
630 | 630 |
631 } | 631 } |
OLD | NEW |