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

Unified Diff: ui/base/test/test_clipboard_unittest.cc

Issue 720373003: Add FakeClipboard implementation for unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: WINDOWS!!! Created 6 years, 1 month 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 | « ui/base/test/test_clipboard.cc ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/test/test_clipboard_unittest.cc
diff --git a/ui/base/test/test_clipboard_unittest.cc b/ui/base/test/test_clipboard_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e2f7a3b21368a451ac307977ba7e7f7c0b659f69
--- /dev/null
+++ b/ui/base/test/test_clipboard_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright 2014 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 "ui/base/test/test_clipboard.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace ui {
+
+struct TestClipboardTraits {
+ static Clipboard* Create() {
+ TestClipboard::UseForCurrentThread();
+ return Clipboard::GetForCurrentThread();
+ }
+
+ static void Destroy(Clipboard* clipboard) {
+ ASSERT_EQ(Clipboard::GetForCurrentThread(), clipboard);
+ Clipboard::DestroyClipboardForCurrentThread();
+ }
+};
+
+typedef TestClipboardTraits TypesToTest;
+
+} // namespace ui
+
+#include "ui/base/clipboard/clipboard_test_template.h"
« no previous file with comments | « ui/base/test/test_clipboard.cc ('k') | ui/base/ui_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698