| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "net/spdy/spdy_protocol_test_utils.h" | 7 #include "net/spdy/spdy_protocol_test_utils.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 namespace test { | 10 namespace test { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 return ::testing::AssertionFailure(); | 59 return ::testing::AssertionFailure(); |
| 60 | 60 |
| 61 return ::testing::AssertionSuccess(); | 61 return ::testing::AssertionSuccess(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 ::testing::AssertionResult VerifySpdyFrameIREquals(const SpdyGoAwayIR& expected, | 64 ::testing::AssertionResult VerifySpdyFrameIREquals(const SpdyGoAwayIR& expected, |
| 65 const SpdyGoAwayIR& actual) { | 65 const SpdyGoAwayIR& actual) { |
| 66 DVLOG(1) << "VerifySpdyFrameIREquals SpdyGoAwayIR"; | 66 DVLOG(1) << "VerifySpdyFrameIREquals SpdyGoAwayIR"; |
| 67 if (expected.last_good_stream_id() != actual.last_good_stream_id()) | 67 if (expected.last_good_stream_id() != actual.last_good_stream_id()) |
| 68 return ::testing::AssertionFailure(); | 68 return ::testing::AssertionFailure(); |
| 69 if (expected.status() != actual.status()) | 69 if (expected.error_code() != actual.error_code()) |
| 70 return ::testing::AssertionFailure(); | 70 return ::testing::AssertionFailure(); |
| 71 if (expected.description() != actual.description()) | 71 if (expected.description() != actual.description()) |
| 72 return ::testing::AssertionFailure(); | 72 return ::testing::AssertionFailure(); |
| 73 | 73 |
| 74 return ::testing::AssertionSuccess(); | 74 return ::testing::AssertionSuccess(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 ::testing::AssertionResult VerifySpdyFrameIREquals( | 77 ::testing::AssertionResult VerifySpdyFrameIREquals( |
| 78 const SpdyHeadersIR& expected, | 78 const SpdyHeadersIR& expected, |
| 79 const SpdyHeadersIR& actual) { | 79 const SpdyHeadersIR& actual) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 return ::testing::AssertionSuccess(); | 135 return ::testing::AssertionSuccess(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 ::testing::AssertionResult VerifySpdyFrameIREquals( | 138 ::testing::AssertionResult VerifySpdyFrameIREquals( |
| 139 const SpdyRstStreamIR& expected, | 139 const SpdyRstStreamIR& expected, |
| 140 const SpdyRstStreamIR& actual) { | 140 const SpdyRstStreamIR& actual) { |
| 141 DVLOG(1) << "VerifySpdyFrameIREquals SpdyRstStreamIR"; | 141 DVLOG(1) << "VerifySpdyFrameIREquals SpdyRstStreamIR"; |
| 142 if (expected.stream_id() != actual.stream_id()) | 142 if (expected.stream_id() != actual.stream_id()) |
| 143 return ::testing::AssertionFailure(); | 143 return ::testing::AssertionFailure(); |
| 144 if (expected.status() != actual.status()) | 144 if (expected.error_code() != actual.error_code()) |
| 145 return ::testing::AssertionFailure(); | 145 return ::testing::AssertionFailure(); |
| 146 | 146 |
| 147 return ::testing::AssertionSuccess(); | 147 return ::testing::AssertionSuccess(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 ::testing::AssertionResult VerifySpdyFrameIREquals( | 150 ::testing::AssertionResult VerifySpdyFrameIREquals( |
| 151 const SpdySettingsIR& expected, | 151 const SpdySettingsIR& expected, |
| 152 const SpdySettingsIR& actual) { | 152 const SpdySettingsIR& actual) { |
| 153 DVLOG(1) << "VerifySpdyFrameIREquals SpdySettingsIR"; | 153 DVLOG(1) << "VerifySpdyFrameIREquals SpdySettingsIR"; |
| 154 // Note, ignoring non-HTTP/2 fields such as clear_settings. | 154 // Note, ignoring non-HTTP/2 fields such as clear_settings. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 182 if (expected.stream_id() != actual.stream_id()) | 182 if (expected.stream_id() != actual.stream_id()) |
| 183 return ::testing::AssertionFailure(); | 183 return ::testing::AssertionFailure(); |
| 184 if (expected.delta() != actual.delta()) | 184 if (expected.delta() != actual.delta()) |
| 185 return ::testing::AssertionFailure(); | 185 return ::testing::AssertionFailure(); |
| 186 | 186 |
| 187 return ::testing::AssertionSuccess(); | 187 return ::testing::AssertionSuccess(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace test | 190 } // namespace test |
| 191 } // namespace net | 191 } // namespace net |
| OLD | NEW |