Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: third_party/WebKit/Source/core/layout/api/SelectionStateTest.cpp

Issue 2732643004: Add operator<< to SelectionState for debug logging. (Closed)
Patch Set: Use FOR_EACH pattern and add test. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/SelectionState.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/api/SelectionStateTest.cpp
diff --git a/third_party/WebKit/Source/core/layout/api/SelectionStateTest.cpp b/third_party/WebKit/Source/core/layout/api/SelectionStateTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..edbaa76ca7e69b1fbc4410b5722c576bc000097b
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/api/SelectionStateTest.cpp
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/layout/api/SelectionState.h"
+
+#include <sstream>
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace blink {
+
+TEST(SelectionStateTest, StreamOutput) {
+ // Just explicitly sanity check a couple of values.
+ {
+ std::stringstream stringStream;
+ stringStream << SelectionNone;
+ EXPECT_EQ("None", stringStream.str());
+ }
+ {
+ std::stringstream stringStream;
+ stringStream << SelectionBoth;
+ EXPECT_EQ("Both", stringStream.str());
+ }
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/api/SelectionState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698