Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1091)

Side by Side Diff: content/test/ppapi/ppapi_browsertest.cc

Issue 308663002: Pepper: Move several tests to content_browsertests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "content/test/ppapi/ppapi_test.h" 5 #include "content/test/ppapi/ppapi_test.h"
6 #include "ppapi/shared_impl/test_harness_utils.h" 6 #include "ppapi/shared_impl/test_harness_utils.h"
7 7
8 // This file lists tests for Pepper APIs (without NaCl) against content_shell. 8 // This file lists tests for Pepper APIs (without NaCl) against content_shell.
9 // TODO(teravest): Move more tests here. http://crbug.com/371873 9 // TODO(teravest): Move more tests here. http://crbug.com/371873
10 10
11 // See chrome/test/ppapi/ppapi_browsertests.cc for Pepper testing that's 11 // See chrome/test/ppapi/ppapi_browsertests.cc for Pepper testing that's
12 // covered in browser_tests. 12 // covered in browser_tests.
13 13
14 namespace content { 14 namespace content {
15 namespace { 15 namespace {
16 16
17 // This macro finesses macro expansion to do what we want. 17 // This macro finesses macro expansion to do what we want.
18 #define STRIP_PREFIXES(test_name) ppapi::StripTestPrefixes(#test_name) 18 #define STRIP_PREFIXES(test_name) ppapi::StripTestPrefixes(#test_name)
19 19
20 #define TEST_PPAPI_IN_PROCESS(test_name) \ 20 #define TEST_PPAPI_IN_PROCESS(test_name) \
21 IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \ 21 IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
22 RunTest(STRIP_PREFIXES(test_name)); \ 22 RunTest(STRIP_PREFIXES(test_name)); \
23 } 23 }
24 24
25 #define TEST_PPAPI_OUT_OF_PROCESS(test_name) \ 25 #define TEST_PPAPI_OUT_OF_PROCESS(test_name) \
26 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \ 26 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
27 RunTest(STRIP_PREFIXES(test_name)); \ 27 RunTest(STRIP_PREFIXES(test_name)); \
28 } 28 }
29 29
30 TEST_PPAPI_IN_PROCESS(BrowserFont)
31 // crbug.com/308949
32 #if defined(OS_WIN)
33 #define MAYBE_OUT_BrowserFont DISABLED_BrowserFont
34 #else
35 #define MAYBE_OUT_BrowserFont BrowserFont
36 #endif
37 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_BrowserFont)
38
39 TEST_PPAPI_IN_PROCESS(Buffer)
40 TEST_PPAPI_OUT_OF_PROCESS(Buffer)
41
42 TEST_PPAPI_IN_PROCESS(CharSet)
43 TEST_PPAPI_OUT_OF_PROCESS(CharSet)
44
45 TEST_PPAPI_IN_PROCESS(Console)
46 TEST_PPAPI_OUT_OF_PROCESS(Console)
47
30 TEST_PPAPI_IN_PROCESS(Crypto) 48 TEST_PPAPI_IN_PROCESS(Crypto)
31 TEST_PPAPI_OUT_OF_PROCESS(Crypto) 49 TEST_PPAPI_OUT_OF_PROCESS(Crypto)
32 50
51 TEST_PPAPI_IN_PROCESS(Graphics2D)
52 TEST_PPAPI_OUT_OF_PROCESS(Graphics2D)
53
54 TEST_PPAPI_IN_PROCESS(ImageData)
55 TEST_PPAPI_OUT_OF_PROCESS(ImageData)
56
57 TEST_PPAPI_OUT_OF_PROCESS(InputEvent)
58
59 // "Instance" tests are really InstancePrivate tests. InstancePrivate is not
60 // supported in NaCl, so these tests are only run trusted.
61 // Also note that these tests are run separately on purpose (versus collapsed
62 // in to one IN_PROC_BROWSER_TEST_F macro), because some of them have leaks
63 // on purpose that will look like failures to tests that are run later.
64 TEST_PPAPI_IN_PROCESS(Instance_ExecuteScript)
65 TEST_PPAPI_OUT_OF_PROCESS(Instance_ExecuteScript)
66
67 IN_PROC_BROWSER_TEST_F(PPAPITest,
68 Instance_ExecuteScriptAtInstanceShutdown) {
69 // In other tests, we use one call to RunTest so that the tests can all run
70 // in one plugin instance. This saves time on loading the plugin (especially
71 // for NaCl). Here, we actually want to destroy the Instance, to test whether
72 // the destructor can run ExecuteScript successfully. That's why we have two
73 // separate calls to RunTest; the second one forces a navigation which
74 // destroys the instance from the prior RunTest.
75 // See test_instance_deprecated.cc for more information.
76 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown");
77 RunTest("Instance_ExecuteScriptAtInstanceShutdown");
78 }
79 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest,
80 Instance_ExecuteScriptAtInstanceShutdown) {
81 // (See the comment for the in-process version of this test above)
82 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown");
83 RunTest("Instance_ExecuteScriptAtInstanceShutdown");
84 }
85
86 TEST_PPAPI_IN_PROCESS(Instance_LeakedObjectDestructors)
87 TEST_PPAPI_OUT_OF_PROCESS(Instance_LeakedObjectDestructors)
88
89 TEST_PPAPI_IN_PROCESS(Memory)
90 TEST_PPAPI_OUT_OF_PROCESS(Memory)
91
92 // TODO(danakj): http://crbug.com/115286
93 TEST_PPAPI_IN_PROCESS(DISABLED_Scrollbar)
94 // http://crbug.com/89961
95 TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Scrollbar)
96
33 TEST_PPAPI_IN_PROCESS(TraceEvent) 97 TEST_PPAPI_IN_PROCESS(TraceEvent)
34 TEST_PPAPI_OUT_OF_PROCESS(TraceEvent) 98 TEST_PPAPI_OUT_OF_PROCESS(TraceEvent)
35 99
100 TEST_PPAPI_IN_PROCESS(URLUtil)
101 TEST_PPAPI_OUT_OF_PROCESS(URLUtil)
102
103 TEST_PPAPI_IN_PROCESS(Var)
104 TEST_PPAPI_OUT_OF_PROCESS(Var)
105
106 // Flaky on mac, http://crbug.com/121107
107 #if defined(OS_MACOSX)
108 #define MAYBE_VarDeprecated DISABLED_VarDeprecated
109 #else
110 #define MAYBE_VarDeprecated VarDeprecated
111 #endif
112 TEST_PPAPI_IN_PROCESS(VarDeprecated)
113 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_VarDeprecated)
114
115 TEST_PPAPI_IN_PROCESS(VarResource)
116 TEST_PPAPI_OUT_OF_PROCESS(VarResource)
117
118 TEST_PPAPI_IN_PROCESS(VideoDecoderDev)
119 TEST_PPAPI_OUT_OF_PROCESS(VideoDecoderDev)
120
36 } // namespace 121 } // namespace
37 } // namespace content 122 } // namespace content
OLDNEW
« chrome/test/ppapi/ppapi_browsertest.cc ('K') | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698