TestAutoType.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (C) 2012 Felix Geyer <debfx@fobos.de>
  3. * Copyright (C) 2017 KeePassXC Team <team@keepassxc.org>
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 2 or (at your option)
  8. * version 3 of the License.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef KEEPASSX_TESTAUTOTYPE_H
  19. #define KEEPASSX_TESTAUTOTYPE_H
  20. #include <QObject>
  21. #include <QSharedPointer>
  22. class AutoType;
  23. class AutoTypePlatformInterface;
  24. class AutoTypeTestInterface;
  25. class Database;
  26. class Entry;
  27. class Group;
  28. class TestAutoType : public QObject
  29. {
  30. Q_OBJECT
  31. private slots:
  32. void initTestCase();
  33. void init();
  34. void cleanup();
  35. void testInternal();
  36. void testSingleAutoType();
  37. void testGlobalAutoTypeWithNoMatch();
  38. void testGlobalAutoTypeWithOneMatch();
  39. void testGlobalAutoTypeTitleMatch();
  40. void testGlobalAutoTypeUrlMatch();
  41. void testGlobalAutoTypeUrlSubdomainMatch();
  42. void testGlobalAutoTypeTitleMatchDisabled();
  43. void testGlobalAutoTypeRegExp();
  44. void testAutoTypeResults();
  45. void testAutoTypeResults_data();
  46. void testAutoTypeSyntaxChecks();
  47. void testAutoTypeEffectiveSequences();
  48. private:
  49. AutoTypePlatformInterface* m_platform;
  50. AutoTypeTestInterface* m_test;
  51. AutoType* m_autoType;
  52. QSharedPointer<Database> m_db;
  53. QList<QSharedPointer<Database>> m_dbList;
  54. Group* m_group;
  55. Entry* m_entry1;
  56. Entry* m_entry2;
  57. Entry* m_entry3;
  58. Entry* m_entry4;
  59. Entry* m_entry5;
  60. };
  61. #endif // KEEPASSX_TESTAUTOTYPE_H