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

Side by Side Diff: components/clipboard/clipboard_apptest.cc

Issue 1687693002: Rename ConnectToService to ConnectToInterface() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sp2
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.cc ('k') | components/filesystem/files_test_base.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 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 namespace clipboard { 52 namespace clipboard {
53 53
54 class ClipboardAppTest : public mojo::test::ApplicationTestBase { 54 class ClipboardAppTest : public mojo::test::ApplicationTestBase {
55 public: 55 public:
56 ClipboardAppTest() : ApplicationTestBase() {} 56 ClipboardAppTest() : ApplicationTestBase() {}
57 ~ClipboardAppTest() override {} 57 ~ClipboardAppTest() override {}
58 58
59 void SetUp() override { 59 void SetUp() override {
60 mojo::test::ApplicationTestBase::SetUp(); 60 mojo::test::ApplicationTestBase::SetUp();
61 shell()->ConnectToService("mojo:clipboard", &clipboard_); 61 shell()->ConnectToInterface("mojo:clipboard", &clipboard_);
62 } 62 }
63 63
64 uint64_t GetSequenceNumber() { 64 uint64_t GetSequenceNumber() {
65 base::RunLoop run_loop; 65 base::RunLoop run_loop;
66 uint64_t sequence_num = 999999; 66 uint64_t sequence_num = 999999;
67 clipboard_->GetSequenceNumber( 67 clipboard_->GetSequenceNumber(
68 Clipboard::Type::COPY_PASTE, 68 Clipboard::Type::COPY_PASTE,
69 base::Bind(&CopyUint64AndEndRunloop, &sequence_num, &run_loop)); 69 base::Bind(&CopyUint64AndEndRunloop, &sequence_num, &run_loop));
70 run_loop.Run(); 70 run_loop.Run();
71 return sequence_num; 71 return sequence_num;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 Map<String, Array<uint8_t>> mime_data; 154 Map<String, Array<uint8_t>> mime_data;
155 clipboard_->WriteClipboardData(Clipboard::Type::COPY_PASTE, 155 clipboard_->WriteClipboardData(Clipboard::Type::COPY_PASTE,
156 std::move(mime_data)); 156 std::move(mime_data));
157 157
158 EXPECT_EQ(2ul, GetSequenceNumber()); 158 EXPECT_EQ(2ul, GetSequenceNumber());
159 EXPECT_FALSE(GetDataOfType(Clipboard::MIME_TYPE_TEXT, &data)); 159 EXPECT_FALSE(GetDataOfType(Clipboard::MIME_TYPE_TEXT, &data));
160 } 160 }
161 161
162 } // namespace clipboard 162 } // namespace clipboard
OLDNEW
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.cc ('k') | components/filesystem/files_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698