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

Side by Side Diff: mojo/services/clipboard/clipboard_standalone_unittest.cc

Issue 644963004: Some more virtual/override updates. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "mojo/common/common_type_converters.h" 8 #include "mojo/common/common_type_converters.h"
9 #include "mojo/services/public/interfaces/clipboard/clipboard.mojom.h" 9 #include "mojo/services/public/interfaces/clipboard/clipboard.mojom.h"
10 #include "mojo/shell/shell_test_helper.h" 10 #include "mojo/shell/shell_test_helper.h"
(...skipping 29 matching lines...) Expand all
40 const char* kHtmlData = "<html>data</html>"; 40 const char* kHtmlData = "<html>data</html>";
41 41
42 } // namespace 42 } // namespace
43 43
44 namespace mojo { 44 namespace mojo {
45 namespace service { 45 namespace service {
46 46
47 class ClipboardStandaloneTest : public testing::Test { 47 class ClipboardStandaloneTest : public testing::Test {
48 public: 48 public:
49 ClipboardStandaloneTest() {} 49 ClipboardStandaloneTest() {}
50 virtual ~ClipboardStandaloneTest() {} 50 ~ClipboardStandaloneTest() override {}
51 51
52 virtual void SetUp() override { 52 void SetUp() override {
53 test_helper_.Init(); 53 test_helper_.Init();
54 54
55 test_helper_.application_manager()->ConnectToService(GURL("mojo:clipboard"), 55 test_helper_.application_manager()->ConnectToService(GURL("mojo:clipboard"),
56 &clipboard_); 56 &clipboard_);
57 } 57 }
58 58
59 uint64_t GetSequenceNumber() { 59 uint64_t GetSequenceNumber() {
60 base::RunLoop run_loop; 60 base::RunLoop run_loop;
61 uint64_t sequence_num = 999999; 61 uint64_t sequence_num = 999999;
62 clipboard_->GetSequenceNumber( 62 clipboard_->GetSequenceNumber(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 Map<String, Array<uint8_t>> mime_data; 153 Map<String, Array<uint8_t>> mime_data;
154 clipboard_->WriteClipboardData(mojo::Clipboard::TYPE_COPY_PASTE, 154 clipboard_->WriteClipboardData(mojo::Clipboard::TYPE_COPY_PASTE,
155 mime_data.Pass()); 155 mime_data.Pass());
156 156
157 EXPECT_EQ(2ul, GetSequenceNumber()); 157 EXPECT_EQ(2ul, GetSequenceNumber());
158 EXPECT_FALSE(GetDataOfType(mojo::Clipboard::MIME_TYPE_TEXT, &data)); 158 EXPECT_FALSE(GetDataOfType(mojo::Clipboard::MIME_TYPE_TEXT, &data));
159 } 159 }
160 160
161 } // namespace service 161 } // namespace service
162 } // namespace mojo 162 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/utility/tests/run_loop_unittest.cc ('k') | mojo/services/network/udp_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698