Chromium Code Reviews| Index: third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp |
| diff --git a/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp b/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..63d11015bb97a01144215e40a2428f92d118e4de |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
|
tyoshino (SeeGerritForStatus)
2016/03/09 05:36:20
2016
hiroshige
2016/03/11 20:36:14
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "config.h" |
|
tyoshino (SeeGerritForStatus)
2016/03/09 05:36:21
remove
hiroshige
2016/03/11 20:36:14
Done.
|
| + |
| +#include "platform/network/ResourceError.h" |
| +#include <ostream> |
| + |
| +// Pretty printer for gtest. |
| +// Each corresponding declaration should be placed in the header file of |
| +// the corresponding class (e.g. ResourceError.h) to avoid ODR violations, |
| +// not in e.g. PlatformTestPrinters.h. See https://crbug.com/514330. |
| + |
| +namespace blink { |
| + |
| +std::ostream& operator<<(std::ostream& os, const ResourceError& error) |
| +{ |
| + return os |
| + << "domain = " << error.domain() |
| + << ", errorCode = " << error.errorCode() |
| + << ", failingURL = " << error.failingURL() |
| + << ", localizedDescription = " << error.localizedDescription() |
|
tyoshino (SeeGerritForStatus)
2016/03/09 05:36:21
isNull() is not included intentionally?
hiroshige
2016/03/11 20:36:14
Added.
|
| + << ", isCancellation = " << error.isCancellation() |
| + << ", isAccessCheck = " << error.isAccessCheck() |
| + << ", isTimeout = " << error.isTimeout() |
| + << ", staleCopyInCache = " << error.staleCopyInCache() |
| + << ", wasIgnoredByHandler = " << error.wasIgnoredByHandler(); |
| +} |
| + |
| +} |
|
tyoshino (SeeGerritForStatus)
2016/03/09 05:36:21
// namespace blink
hiroshige
2016/03/11 20:36:14
Done.
|