| 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 <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" |
| 11 #include "components/clipboard/public/interfaces/clipboard.mojom.h" | 11 #include "components/clipboard/public/interfaces/clipboard.mojom.h" |
| 12 #include "mojo/application/public/cpp/application_impl.h" | |
| 13 #include "mojo/application/public/cpp/application_test_base.h" | |
| 14 #include "mojo/common/common_type_converters.h" | 12 #include "mojo/common/common_type_converters.h" |
| 13 #include "mojo/shell/public/cpp/application_impl.h" |
| 14 #include "mojo/shell/public/cpp/application_test_base.h" |
| 15 | 15 |
| 16 using mojo::Array; | 16 using mojo::Array; |
| 17 using mojo::Clipboard; | 17 using mojo::Clipboard; |
| 18 using mojo::Map; | 18 using mojo::Map; |
| 19 using mojo::String; | 19 using mojo::String; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 void CopyUint64AndEndRunloop(uint64_t* output, | 23 void CopyUint64AndEndRunloop(uint64_t* output, |
| 24 base::RunLoop* run_loop, | 24 base::RunLoop* run_loop, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |