summaryrefslogtreecommitdiffstats
path: root/ppapi/tests/test_flash_clipboard.h
blob: 3b11d5b8c243daea1ad350d1105fd509af85bb1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_TESTS_TEST_FLASH_CLIPBOARD_H_
#define PPAPI_TESTS_TEST_FLASH_CLIPBOARD_H_

#include <string>

#include "ppapi/c/private/ppb_flash_clipboard.h"
#include "ppapi/tests/test_case.h"
#include "ppapi/tests/test_utils.h"

class TestFlashClipboard : public TestCase {
 public:
  explicit TestFlashClipboard(TestingInstance* instance);

  // TestCase implementation.
  virtual void RunTests(const std::string& filter);

 private:
  // Helpers.
  bool ReadStringVar(uint32_t format, std::string* result);
  bool WriteStringVar(uint32_t format, const std::string& text);
  bool IsFormatAvailableMatches(uint32_t format, bool expected);
  bool ReadPlainTextMatches(const std::string& expected);
  bool ReadHTMLMatches(const std::string& expected);

  // Tests.
  std::string TestReadWritePlainText();
  std::string TestReadWriteHTML();
  std::string TestReadWriteRTF();
  std::string TestReadWriteMultipleFormats();
  std::string TestReadWriteCustomData();
  std::string TestClear();
  std::string TestInvalidFormat();
  std::string TestRegisterCustomFormat();
};

#endif  // PAPPI_TESTS_TEST_FLASH_FULLSCREEN_H_