blob: b648fc704144eaa2f91d2b0e7020a52f492711b0 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (c) 2009 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 CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
#define CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
#pragma once
#include "chrome/test/ui/ui_test.h"
namespace npapi_test {
extern const char kTestCompleteCookie[];
extern const char kTestCompleteSuccess[];
} // namespace npapi_test.
// Base class for NPAPI tests. It provides common functionality between
// regular NPAPI plugins and pepper NPAPI plugins. The base classes provide the
// name of the plugin they need test in the constructor. This base class will
// copy the plugin (assuming it has been built) to the plugins directory
// so it is loaded when chromium is launched.
class NPAPITesterBase : public UITest {
protected:
explicit NPAPITesterBase(const std::string& test_plugin_name);
virtual void SetUp();
virtual void TearDown();
FilePath GetPluginsDirectory();
private:
std::string test_plugin_name_;
FilePath test_plugin_path_;
};
// Helper class for NPAPI plugin UI tests.
class NPAPITester : public NPAPITesterBase {
protected:
NPAPITester();
virtual void SetUp();
virtual void TearDown();
private:
#if defined(OS_MACOSX)
FilePath layout_plugin_path_;
#endif // OS_MACOSX
};
// Helper class for NPAPI plugin UI tests, which need the browser window
// to be visible.
class NPAPIVisiblePluginTester : public NPAPITester {
protected:
virtual void SetUp();
};
// Helper class for NPAPI plugin UI tests which use incognito mode.
class NPAPIIncognitoTester : public NPAPITester {
protected:
virtual void SetUp();
};
#endif // CHROME_TEST_UI_NPAPI_TEST_HELPER_H_
|