OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "platform/network/ResourceError.h" |
| 6 #include <ostream> |
| 7 |
| 8 // Pretty printer for gtest. |
| 9 // Each corresponding declaration should be placed in the header file of |
| 10 // the corresponding class (e.g. ResourceError.h) to avoid ODR violations, |
| 11 // not in e.g. PlatformTestPrinters.h. See https://crbug.com/514330. |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 std::ostream& operator<<(std::ostream& os, const ResourceError& error) |
| 16 { |
| 17 return os |
| 18 << "domain = " << error.domain() |
| 19 << ", errorCode = " << error.errorCode() |
| 20 << ", failingURL = " << error.failingURL() |
| 21 << ", localizedDescription = " << error.localizedDescription() |
| 22 << ", isNull = " << error.isNull() |
| 23 << ", isCancellation = " << error.isCancellation() |
| 24 << ", isAccessCheck = " << error.isAccessCheck() |
| 25 << ", isTimeout = " << error.isTimeout() |
| 26 << ", staleCopyInCache = " << error.staleCopyInCache() |
| 27 << ", wasIgnoredByHandler = " << error.wasIgnoredByHandler(); |
| 28 } |
| 29 |
| 30 } // namespace blink |
OLD | NEW |