OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "base/message_loop.h" | 31 #include "base/message_loop.h" |
32 #endif | 32 #endif |
33 | 33 |
34 namespace ui { | 34 namespace ui { |
35 | 35 |
36 class ClipboardTest : public PlatformTest { | 36 class ClipboardTest : public PlatformTest { |
37 protected: | 37 protected: |
38 Clipboard& clipboard() { return clipboard_; } | 38 Clipboard& clipboard() { return clipboard_; } |
39 | 39 |
40 private: | 40 private: |
41 MessageLoopForUI message_loop_; | 41 base::MessageLoopForUI message_loop_; |
42 Clipboard clipboard_; | 42 Clipboard clipboard_; |
43 }; | 43 }; |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 bool MarkupMatches(const string16& expected_markup, | 47 bool MarkupMatches(const string16& expected_markup, |
48 const string16& actual_markup) { | 48 const string16& actual_markup) { |
49 return actual_markup.find(expected_markup) != string16::npos; | 49 return actual_markup.find(expected_markup) != string16::npos; |
50 } | 50 } |
51 | 51 |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 EXPECT_TRUE(clipboard().IsFormatAvailable( | 689 EXPECT_TRUE(clipboard().IsFormatAvailable( |
690 Clipboard::GetPlainTextWFormatType(), Clipboard::BUFFER_STANDARD)); | 690 Clipboard::GetPlainTextWFormatType(), Clipboard::BUFFER_STANDARD)); |
691 | 691 |
692 // Make sure the text is what we inserted while simulating the other app | 692 // Make sure the text is what we inserted while simulating the other app |
693 std::string contents; | 693 std::string contents; |
694 clipboard().ReadAsciiText(Clipboard::BUFFER_STANDARD, &contents); | 694 clipboard().ReadAsciiText(Clipboard::BUFFER_STANDARD, &contents); |
695 EXPECT_EQ(contents, new_value); | 695 EXPECT_EQ(contents, new_value); |
696 } | 696 } |
697 #endif | 697 #endif |
698 } // namespace ui | 698 } // namespace ui |
OLD | NEW |