OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/base/test/test_clipboard.h" | 5 #include "ui/base/test/test_clipboard.h" |
6 | 6 |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace ui { | 9 namespace ui { |
10 | 10 |
11 struct TestClipboardTraits { | 11 struct TestClipboardTraits { |
12 static Clipboard* Create() { | 12 static Clipboard* Create() { |
13 return TestClipboard::CreateForCurrentThread(); | 13 TestClipboard::UseForCurrentThread(); |
| 14 return Clipboard::GetForCurrentThread(); |
14 } | 15 } |
15 | 16 |
16 static void Destroy(Clipboard* clipboard) { | 17 static void Destroy(Clipboard* clipboard) { |
17 ASSERT_EQ(Clipboard::GetForCurrentThread(), clipboard); | 18 ASSERT_EQ(Clipboard::GetForCurrentThread(), clipboard); |
18 Clipboard::DestroyClipboardForCurrentThread(); | 19 Clipboard::DestroyClipboardForCurrentThread(); |
19 } | 20 } |
20 }; | 21 }; |
21 | 22 |
22 typedef TestClipboardTraits TypesToTest; | 23 typedef TestClipboardTraits TypesToTest; |
23 | 24 |
24 } // namespace ui | 25 } // namespace ui |
25 | 26 |
26 #include "ui/base/clipboard/clipboard_test_template.h" | 27 #include "ui/base/clipboard/clipboard_test_template.h" |
OLD | NEW |