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

Side by Side Diff: ui/base/clipboard/clipboard_unittest.cc

Issue 14061025: ui: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/animation/test_animation_delegate.h ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/base/animation/test_animation_delegate.h ('k') | ui/base/clipboard/clipboard_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698