jennyz | a77f6e8 | 2016-07-19 17:21:03 | [diff] [blame] | 1 | // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "chrome/browser/extensions/extension_apitest.h" |
| 6 | #include "extensions/test/extension_test_message_listener.h" |
| 7 | |
| 8 | namespace { |
| 9 | |
| 10 | class ClipboardExtensionApiTest : public ExtensionApiTest {}; |
| 11 | |
| 12 | } // namespace |
| 13 | |
| 14 | IN_PROC_BROWSER_TEST_F(ClipboardExtensionApiTest, ClipboardDataChanged) { |
| 15 | ExtensionTestMessageListener result_listener("success 2", false); |
| 16 | ASSERT_TRUE(RunPlatformAppTest("clipboard/clipboard_data_changed")) |
| 17 | << message_; |
| 18 | ASSERT_TRUE(result_listener.WaitUntilSatisfied()); |
| 19 | } |
jennyz | 6298fc5 | 2017-01-05 01:33:29 | [diff] [blame] | 20 | |
| 21 | IN_PROC_BROWSER_TEST_F(ClipboardExtensionApiTest, SetImageData) { |
| 22 | ASSERT_TRUE(StartEmbeddedTestServer()); |
| 23 | ExtensionTestMessageListener clipboard_change_listener( |
| 24 | "clipboard data changed 2", false); |
| 25 | ASSERT_TRUE(RunPlatformAppTest("clipboard/set_image_data")) |
| 26 | << message_; |
| 27 | ASSERT_TRUE(clipboard_change_listener.WaitUntilSatisfied()); |
| 28 | } |