| Index: third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp b/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
|
| index 4737afcf713517c113c438c90a592b149a7a7d19..55e51f82e841c229d36d67b0706ea709f385eedb 100644
|
| --- a/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
|
| +++ b/third_party/WebKit/Source/wtf/testing/WTFTestPrinters.cpp
|
| @@ -30,56 +30,54 @@
|
|
|
| #include "wtf/text/AtomicString.h"
|
| #include "wtf/text/WTFString.h"
|
| -#include <ostream> // NOLINT
|
| +#include <ostream> // NOLINT
|
|
|
| namespace WTF {
|
|
|
| -std::ostream& operator<<(std::ostream& out, const String& string)
|
| -{
|
| - if (string.isNull())
|
| - return out << "<null>";
|
| +std::ostream& operator<<(std::ostream& out, const String& string) {
|
| + if (string.isNull())
|
| + return out << "<null>";
|
|
|
| - out << '"';
|
| - for (unsigned index = 0; index < string.length(); ++index) {
|
| - // Print shorthands for select cases.
|
| - UChar character = string[index];
|
| - switch (character) {
|
| - case '\t':
|
| - out << "\\t";
|
| - break;
|
| - case '\n':
|
| - out << "\\n";
|
| - break;
|
| - case '\r':
|
| - out << "\\r";
|
| - break;
|
| - case '"':
|
| - out << "\\\"";
|
| - break;
|
| - case '\\':
|
| - out << "\\\\";
|
| - break;
|
| - default:
|
| - if (character >= 0x20 && character < 0x7F) {
|
| - out << static_cast<char>(character);
|
| - } else {
|
| - // Print "\uXXXX" for control or non-ASCII characters.
|
| - out << "\\u";
|
| - out.width(4);
|
| - out.fill('0');
|
| - out.setf(std::ios_base::hex, std::ios_base::basefield);
|
| - out.setf(std::ios::uppercase);
|
| - out << character;
|
| - }
|
| - break;
|
| + out << '"';
|
| + for (unsigned index = 0; index < string.length(); ++index) {
|
| + // Print shorthands for select cases.
|
| + UChar character = string[index];
|
| + switch (character) {
|
| + case '\t':
|
| + out << "\\t";
|
| + break;
|
| + case '\n':
|
| + out << "\\n";
|
| + break;
|
| + case '\r':
|
| + out << "\\r";
|
| + break;
|
| + case '"':
|
| + out << "\\\"";
|
| + break;
|
| + case '\\':
|
| + out << "\\\\";
|
| + break;
|
| + default:
|
| + if (character >= 0x20 && character < 0x7F) {
|
| + out << static_cast<char>(character);
|
| + } else {
|
| + // Print "\uXXXX" for control or non-ASCII characters.
|
| + out << "\\u";
|
| + out.width(4);
|
| + out.fill('0');
|
| + out.setf(std::ios_base::hex, std::ios_base::basefield);
|
| + out.setf(std::ios::uppercase);
|
| + out << character;
|
| }
|
| + break;
|
| }
|
| - return out << '"';
|
| + }
|
| + return out << '"';
|
| }
|
|
|
| -std::ostream& operator<<(std::ostream& out, const AtomicString& s)
|
| -{
|
| - return out << s.string();
|
| +std::ostream& operator<<(std::ostream& out, const AtomicString& s) {
|
| + return out << s.string();
|
| }
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|