1 // Copyright (c) 2012 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.
5 #include "chrome/test/ppapi/ppapi_test.h"
7 #include "base/test/test_timeouts.h"
8 #include "build/build_config.h"
9 #include "chrome/browser/content_settings/host_content_settings_map.h"
10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_navigator.h"
13 #include "chrome/browser/ui/tabs/tab_strip_model.h"
14 #include "chrome/test/base/javascript_test_observer.h"
15 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/browser/web_contents.h"
17 #include "content/public/common/url_constants.h"
18 #include "content/public/test/test_renderer_host.h"
20 using content::RenderViewHost
;
22 // This macro finesses macro expansion to do what we want.
23 #define STRIP_PREFIXES(test_name) StripPrefixes(#test_name)
24 // Turn the given token into a string. This allows us to use precompiler stuff
25 // to turn names into DISABLED_Foo, but still pass a string to RunTest.
26 #define STRINGIFY(test_name) #test_name
27 #define LIST_TEST(test_name) STRINGIFY(test_name) ","
29 // Use these macros to run the tests for a specific interface.
30 // Most interfaces should be tested with both macros.
31 #define TEST_PPAPI_IN_PROCESS(test_name) \
32 IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
33 RunTest(STRIP_PREFIXES(test_name)); \
35 #define TEST_PPAPI_OUT_OF_PROCESS(test_name) \
36 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
37 RunTest(STRIP_PREFIXES(test_name)); \
40 // Similar macros that test over HTTP.
41 #define TEST_PPAPI_IN_PROCESS_VIA_HTTP(test_name) \
42 IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
43 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
45 #define TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(test_name) \
46 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
47 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
50 // Similar macros that test with an SSL server.
51 #define TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(test_name) \
52 IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
53 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
55 #define TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(test_name) \
56 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
57 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
60 #if defined(DISABLE_NACL)
61 #define TEST_PPAPI_NACL(test_name)
62 #define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name)
63 #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name)
65 #elif defined(ARCH_CPU_ARM_FAMILY)
66 // NaCl glibc tests are not included in ARM as there is no glibc support
68 #define TEST_PPAPI_NACL(test_name) \
69 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
70 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
72 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
73 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
76 #define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name) \
77 IN_PROC_BROWSER_TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \
78 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
81 #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \
82 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
83 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
85 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
86 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
91 // NaCl based PPAPI tests
92 #define TEST_PPAPI_NACL(test_name) \
93 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
94 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
96 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \
97 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
99 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
100 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
103 // NaCl based PPAPI tests with disallowed socket API
104 #define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name) \
105 IN_PROC_BROWSER_TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \
106 RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
109 // NaCl based PPAPI tests with SSL server
110 #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \
111 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
112 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
114 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \
115 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
117 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
118 RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
124 // NaCl glibc tests are not included in ARM as there is no glibc support
126 #if defined(ARCH_CPU_ARM_FAMILY)
127 #define MAYBE_GLIBC(test_name) DISABLED_##test_name
129 #define MAYBE_GLIBC(test_name) test_name
137 TEST_PPAPI_IN_PROCESS(Broker
)
138 // Flaky, http://crbug.com/111355
139 TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Broker
)
141 IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest
, Accept
) {
142 // Accepting the infobar should grant permission to access the PPAPI broker.
143 InfoBarObserver
observer(this);
144 observer
.ExpectInfoBarAndAccept(true);
146 // PPB_Broker_Trusted::IsAllowed should return false before the infobar is
147 // popped and true after the infobar is popped.
148 RunTest("Broker_IsAllowedPermissionDenied");
149 RunTest("Broker_ConnectPermissionGranted");
150 RunTest("Broker_IsAllowedPermissionGranted");
152 // It should also set a content settings exception for the site.
153 GURL url
= GetTestFileUrl("Broker_ConnectPermissionGranted");
154 HostContentSettingsMap
* content_settings
=
155 browser()->profile()->GetHostContentSettingsMap();
156 EXPECT_EQ(CONTENT_SETTING_ALLOW
,
157 content_settings
->GetContentSetting(
158 url
, url
, CONTENT_SETTINGS_TYPE_PPAPI_BROKER
, std::string()));
161 IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest
, Deny
) {
162 // Canceling the infobar should deny permission to access the PPAPI broker.
163 InfoBarObserver
observer(this);
164 observer
.ExpectInfoBarAndAccept(false);
166 // PPB_Broker_Trusted::IsAllowed should return false before and after the
167 // infobar is popped.
168 RunTest("Broker_IsAllowedPermissionDenied");
169 RunTest("Broker_ConnectPermissionDenied");
170 RunTest("Broker_IsAllowedPermissionDenied");
172 // It should also set a content settings exception for the site.
173 GURL url
= GetTestFileUrl("Broker_ConnectPermissionDenied");
174 HostContentSettingsMap
* content_settings
=
175 browser()->profile()->GetHostContentSettingsMap();
176 EXPECT_EQ(CONTENT_SETTING_BLOCK
,
177 content_settings
->GetContentSetting(
178 url
, url
, CONTENT_SETTINGS_TYPE_PPAPI_BROKER
, std::string()));
181 IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest
, Blocked
) {
182 // Block access to the PPAPI broker.
183 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
184 CONTENT_SETTINGS_TYPE_PPAPI_BROKER
, CONTENT_SETTING_BLOCK
);
186 // We shouldn't see an infobar.
187 InfoBarObserver
observer(this);
189 RunTest("Broker_ConnectPermissionDenied");
190 RunTest("Broker_IsAllowedPermissionDenied");
193 IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest
, Allowed
) {
194 // Always allow access to the PPAPI broker.
195 browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
196 CONTENT_SETTINGS_TYPE_PPAPI_BROKER
, CONTENT_SETTING_ALLOW
);
198 // We shouldn't see an infobar.
199 InfoBarObserver
observer(this);
201 RunTest("Broker_ConnectPermissionGranted");
202 RunTest("Broker_IsAllowedPermissionGranted");
205 TEST_PPAPI_IN_PROCESS(Console
)
206 TEST_PPAPI_OUT_OF_PROCESS(Console
)
207 TEST_PPAPI_NACL(Console
)
209 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
210 // TODO(erg): linux_aura bringup: http://crbug.com/318961
211 #define MAYBE_Core DISABLED_Core
213 #define MAYBE_Core Core
215 TEST_PPAPI_IN_PROCESS(MAYBE_Core
)
216 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_Core
)
217 TEST_PPAPI_NACL(MAYBE_Core
)
219 TEST_PPAPI_IN_PROCESS(TraceEvent
)
220 TEST_PPAPI_OUT_OF_PROCESS(TraceEvent
)
221 TEST_PPAPI_NACL(TraceEvent
)
223 TEST_PPAPI_IN_PROCESS(InputEvent
)
224 TEST_PPAPI_OUT_OF_PROCESS(InputEvent
)
225 TEST_PPAPI_NACL(InputEvent
)
227 // Flaky on Linux and Windows. http://crbug.com/135403
228 #if defined(OS_LINUX) || defined(OS_WIN)
229 #define MAYBE_ImeInputEvent DISABLED_ImeInputEvent
231 #define MAYBE_ImeInputEvent ImeInputEvent
234 TEST_PPAPI_IN_PROCESS(MAYBE_ImeInputEvent
)
235 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_ImeInputEvent
)
236 TEST_PPAPI_NACL(MAYBE_ImeInputEvent
)
238 // "Instance" tests are really InstancePrivate tests. InstancePrivate is not
239 // supported in NaCl, so these tests are only run trusted.
240 // Also note that these tests are run separately on purpose (versus collapsed
241 // in to one IN_PROC_BROWSER_TEST_F macro), because some of them have leaks
242 // on purpose that will look like failures to tests that are run later.
243 TEST_PPAPI_IN_PROCESS(Instance_ExecuteScript
);
244 TEST_PPAPI_OUT_OF_PROCESS(Instance_ExecuteScript
)
246 // We run and reload the RecursiveObjects test to ensure that the InstanceObject
247 // (and others) are properly cleaned up after the first run.
248 IN_PROC_BROWSER_TEST_F(PPAPITest
, Instance_RecursiveObjects
) {
249 RunTestAndReload("Instance_RecursiveObjects");
251 // TODO(dmichael): Make it work out-of-process (or at least see whether we
253 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
,
254 DISABLED_Instance_RecursiveObjects
) {
255 RunTestAndReload("Instance_RecursiveObjects");
257 TEST_PPAPI_IN_PROCESS(Instance_LeakedObjectDestructors
);
258 TEST_PPAPI_OUT_OF_PROCESS(Instance_LeakedObjectDestructors
);
260 IN_PROC_BROWSER_TEST_F(PPAPITest
,
261 Instance_ExecuteScriptAtInstanceShutdown
) {
262 // In other tests, we use one call to RunTest so that the tests can all run
263 // in one plugin instance. This saves time on loading the plugin (especially
264 // for NaCl). Here, we actually want to destroy the Instance, to test whether
265 // the destructor can run ExecuteScript successfully. That's why we have two
266 // separate calls to RunTest; the second one forces a navigation which
267 // destroys the instance from the prior RunTest.
268 // See test_instance_deprecated.cc for more information.
269 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown");
270 RunTest("Instance_ExecuteScriptAtInstanceShutdown");
272 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
,
273 Instance_ExecuteScriptAtInstanceShutdown
) {
274 // (See the comment for the in-process version of this test above)
275 RunTest("Instance_SetupExecuteScriptAtInstanceShutdown");
276 RunTest("Instance_ExecuteScriptAtInstanceShutdown");
279 TEST_PPAPI_IN_PROCESS(Graphics2D
)
280 TEST_PPAPI_OUT_OF_PROCESS(Graphics2D
)
281 // Graphics2D_Dev isn't supported in NaCl, only test the other interfaces
282 // TODO(jhorwich) Enable when Graphics2D_Dev interfaces are proxied in NaCl.
283 TEST_PPAPI_NACL(Graphics2D_InvalidResource
)
284 TEST_PPAPI_NACL(Graphics2D_InvalidSize
)
285 TEST_PPAPI_NACL(Graphics2D_Humongous
)
286 TEST_PPAPI_NACL(Graphics2D_InitToZero
)
287 TEST_PPAPI_NACL(Graphics2D_Describe
)
288 TEST_PPAPI_NACL(Graphics2D_Paint
)
289 TEST_PPAPI_NACL(Graphics2D_Scroll
)
290 TEST_PPAPI_NACL(Graphics2D_Replace
)
291 TEST_PPAPI_NACL(Graphics2D_Flush
)
292 TEST_PPAPI_NACL(Graphics2D_FlushOffscreenUpdate
)
293 TEST_PPAPI_NACL(Graphics2D_BindNull
)
296 #if defined(USE_AURA)
297 // These tests fail with the test compositor which is what's used by default for
298 // browser tests on Windows Aura. Renable when the software compositor is
300 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D
301 #define MAYBE_OUT_Graphics3D DISABLED_Graphics3D
302 #define MAYBE_NACL_Graphics3D DISABLED_Graphics3D
303 #else // defined(USE_AURA)
304 // In-process and NaCl tests are having flaky failures on Win: crbug.com/242252
305 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D
306 #define MAYBE_OUT_Graphics3D Graphics3D
307 #define MAYBE_NACL_Graphics3D DISABLED_Graphics3D
308 #endif // defined(USE_AURA)
309 #elif defined(OS_MACOSX)
310 // These tests fail when using the legacy software mode. Reenable when the
311 // software compositor is enabled crbug.com/286038
312 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D
313 #define MAYBE_OUT_Graphics3D DISABLED_Graphics3D
314 #define MAYBE_NACL_Graphics3D DISABLED_Graphics3D
316 // The tests are failing in-process. crbug.com/280282
317 #define MAYBE_IN_Graphics3D DISABLED_Graphics3D
318 #define MAYBE_OUT_Graphics3D Graphics3D
319 #define MAYBE_NACL_Graphics3D Graphics3D
321 TEST_PPAPI_IN_PROCESS(MAYBE_IN_Graphics3D
)
322 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_Graphics3D
)
323 TEST_PPAPI_NACL(MAYBE_NACL_Graphics3D
)
325 TEST_PPAPI_IN_PROCESS(ImageData
)
326 TEST_PPAPI_OUT_OF_PROCESS(ImageData
)
327 TEST_PPAPI_NACL(ImageData
)
329 TEST_PPAPI_IN_PROCESS(BrowserFont
)
332 #define MAYBE_OUT_BrowserFont DISABLED_BrowserFont
334 #define MAYBE_OUT_BrowserFont BrowserFont
336 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_OUT_BrowserFont
)
338 TEST_PPAPI_IN_PROCESS(Buffer
)
339 TEST_PPAPI_OUT_OF_PROCESS(Buffer
)
342 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, TCPSocket
) {
344 LIST_TEST(TCPSocket_Connect
)
345 LIST_TEST(TCPSocket_ReadWrite
)
346 LIST_TEST(TCPSocket_SetOption
)
347 LIST_TEST(TCPSocket_Listen
)
348 LIST_TEST(TCPSocket_Backlog
)
349 LIST_TEST(TCPSocket_Interface_1_0
)
352 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, TCPSocket
) {
354 LIST_TEST(TCPSocket_Connect
)
355 LIST_TEST(TCPSocket_ReadWrite
)
356 LIST_TEST(TCPSocket_SetOption
)
357 LIST_TEST(TCPSocket_Listen
)
358 LIST_TEST(TCPSocket_Backlog
)
359 LIST_TEST(TCPSocket_Interface_1_0
)
362 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(TCPSocket
)) {
364 LIST_TEST(TCPSocket_Connect
)
365 LIST_TEST(TCPSocket_ReadWrite
)
366 LIST_TEST(TCPSocket_SetOption
)
367 LIST_TEST(TCPSocket_Listen
)
368 LIST_TEST(TCPSocket_Backlog
)
369 LIST_TEST(TCPSocket_Interface_1_0
)
372 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, TCPSocket
) {
374 LIST_TEST(TCPSocket_Connect
)
375 LIST_TEST(TCPSocket_ReadWrite
)
376 LIST_TEST(TCPSocket_SetOption
)
377 LIST_TEST(TCPSocket_Listen
)
378 LIST_TEST(TCPSocket_Backlog
)
379 LIST_TEST(TCPSocket_Interface_1_0
)
383 TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(TCPSocketPrivate
)
384 TEST_PPAPI_NACL_WITH_SSL_SERVER(TCPSocketPrivate
)
386 TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(TCPSocketPrivateTrusted
)
389 // UDPSocket_Broadcast is disabled for OSX because it requires root permissions
391 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, UDPSocket
) {
393 LIST_TEST(UDPSocket_ReadWrite
)
394 LIST_TEST(UDPSocket_SetOption
)
395 #if !defined(OS_MACOSX)
396 LIST_TEST(UDPSocket_Broadcast
)
400 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, UDPSocket
) {
402 LIST_TEST(UDPSocket_ReadWrite
)
403 LIST_TEST(UDPSocket_SetOption
)
404 #if !defined(OS_MACOSX)
405 LIST_TEST(UDPSocket_Broadcast
)
409 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(UDPSocket
)) {
411 LIST_TEST(UDPSocket_ReadWrite
)
412 LIST_TEST(UDPSocket_SetOption
)
413 #if !defined(OS_MACOSX)
414 LIST_TEST(UDPSocket_Broadcast
)
418 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, UDPSocket
) {
420 LIST_TEST(UDPSocket_ReadWrite
)
421 LIST_TEST(UDPSocket_SetOption
)
422 #if !defined(OS_MACOSX)
423 LIST_TEST(UDPSocket_Broadcast
)
428 // UDPSocketPrivate tests.
429 // UDPSocketPrivate_Broadcast is disabled for OSX because it requires
430 // root permissions on OSX 10.7+.
431 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Connect
)
432 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_ConnectFailure
)
433 #if !defined(OS_MACOSX)
434 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Broadcast
)
435 #endif // !defined(OS_MACOSX)
436 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_SetSocketFeatureErrors
)
437 TEST_PPAPI_NACL(UDPSocketPrivate_Connect
)
438 TEST_PPAPI_NACL(UDPSocketPrivate_ConnectFailure
)
439 #if !defined(OS_MACOSX)
440 TEST_PPAPI_NACL(UDPSocketPrivate_Broadcast
)
441 #endif // !defined(OS_MACOSX)
442 TEST_PPAPI_NACL(UDPSocketPrivate_SetSocketFeatureErrors
)
444 TEST_PPAPI_NACL_DISALLOWED_SOCKETS(HostResolverPrivateDisallowed
)
445 TEST_PPAPI_NACL_DISALLOWED_SOCKETS(TCPServerSocketPrivateDisallowed
)
446 TEST_PPAPI_NACL_DISALLOWED_SOCKETS(TCPSocketPrivateDisallowed
)
447 TEST_PPAPI_NACL_DISALLOWED_SOCKETS(UDPSocketPrivateDisallowed
)
449 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(TCPServerSocketPrivate
)
450 TEST_PPAPI_NACL(TCPServerSocketPrivate
)
452 // HostResolver tests.
453 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, HostResolver
) {
455 LIST_TEST(HostResolver_Empty
)
456 LIST_TEST(HostResolver_Resolve
)
457 LIST_TEST(HostResolver_ResolveIPv4
)
460 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, HostResolver
) {
462 LIST_TEST(HostResolver_Empty
)
463 LIST_TEST(HostResolver_Resolve
)
464 LIST_TEST(HostResolver_ResolveIPv4
)
467 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(HostResolver
)) {
469 LIST_TEST(HostResolver_Empty
)
470 LIST_TEST(HostResolver_Resolve
)
471 LIST_TEST(HostResolver_ResolveIPv4
)
474 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, HostResolver
) {
476 LIST_TEST(HostResolver_Empty
)
477 LIST_TEST(HostResolver_Resolve
)
478 LIST_TEST(HostResolver_ResolveIPv4
)
482 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_Resolve
)
483 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_ResolveIPv4
)
484 TEST_PPAPI_NACL(HostResolverPrivate_Resolve
)
485 TEST_PPAPI_NACL(HostResolverPrivate_ResolveIPv4
)
487 // Flaky on official Windows builder. http://crbug.com/95005
488 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN)
489 #define MAYBE_PPAPIURLLoader DISABLED_URLLoader
491 #define MAYBE_PPAPIURLLoader URLLoader
494 IN_PROC_BROWSER_TEST_F(PPAPITest
, MAYBE_PPAPIURLLoader
) {
496 LIST_TEST(URLLoader_BasicGET
)
497 LIST_TEST(URLLoader_BasicPOST
)
498 LIST_TEST(URLLoader_BasicFilePOST
)
499 LIST_TEST(URLLoader_BasicFileRangePOST
)
500 LIST_TEST(URLLoader_CompoundBodyPOST
)
501 LIST_TEST(URLLoader_EmptyDataPOST
)
502 LIST_TEST(URLLoader_BinaryDataPOST
)
503 LIST_TEST(URLLoader_CustomRequestHeader
)
504 LIST_TEST(URLLoader_FailsBogusContentLength
)
505 LIST_TEST(URLLoader_StreamToFile
)
506 LIST_TEST(URLLoader_UntrustedSameOriginRestriction
)
507 LIST_TEST(URLLoader_TrustedSameOriginRestriction
)
508 LIST_TEST(URLLoader_UntrustedCrossOriginRequest
)
509 LIST_TEST(URLLoader_TrustedCrossOriginRequest
)
510 LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction
)
511 // TODO(bbudge) Fix Javascript URLs for trusted loaders.
512 // http://crbug.com/103062
513 LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction
)
514 LIST_TEST(URLLoader_UntrustedHttpRequests
)
515 LIST_TEST(URLLoader_TrustedHttpRequests
)
516 LIST_TEST(URLLoader_FollowURLRedirect
)
517 LIST_TEST(URLLoader_AuditURLRedirect
)
518 LIST_TEST(URLLoader_AbortCalls
)
519 LIST_TEST(URLLoader_UntendedLoad
)
520 LIST_TEST(URLLoader_PrefetchBufferThreshold
)
523 // Timing out on Windows dbg. http://crbug.com/95005
524 #if defined(OS_WIN) && (!defined(NDEBUG) || defined(GOOGLE_CHROME_BUILD))
525 #define MAYBE_OutOfProcessURLLoader DISABLED_URLLoader
527 #define MAYBE_OutOfProcessURLLoader URLLoader
529 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, MAYBE_OutOfProcessURLLoader
) {
531 LIST_TEST(URLLoader_BasicGET
)
532 LIST_TEST(URLLoader_BasicPOST
)
533 LIST_TEST(URLLoader_BasicFilePOST
)
534 LIST_TEST(URLLoader_BasicFileRangePOST
)
535 LIST_TEST(URLLoader_CompoundBodyPOST
)
536 LIST_TEST(URLLoader_EmptyDataPOST
)
537 LIST_TEST(URLLoader_BinaryDataPOST
)
538 LIST_TEST(URLLoader_CustomRequestHeader
)
539 LIST_TEST(URLLoader_FailsBogusContentLength
)
540 LIST_TEST(URLLoader_StreamToFile
)
541 LIST_TEST(URLLoader_UntrustedSameOriginRestriction
)
542 LIST_TEST(URLLoader_TrustedSameOriginRestriction
)
543 LIST_TEST(URLLoader_UntrustedCrossOriginRequest
)
544 LIST_TEST(URLLoader_TrustedCrossOriginRequest
)
545 LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction
)
546 // TODO(bbudge) Fix Javascript URLs for trusted loaders.
547 // http://crbug.com/103062
548 LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction
)
549 LIST_TEST(URLLoader_UntrustedHttpRequests
)
550 LIST_TEST(URLLoader_TrustedHttpRequests
)
551 LIST_TEST(URLLoader_FollowURLRedirect
)
552 LIST_TEST(URLLoader_AuditURLRedirect
)
553 LIST_TEST(URLLoader_AbortCalls
)
554 LIST_TEST(URLLoader_UntendedLoad
)
555 LIST_TEST(URLLoader_PrefetchBufferThreshold
)
558 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, URLLoader
) {
560 LIST_TEST(URLLoader_BasicGET
)
561 LIST_TEST(URLLoader_BasicPOST
)
562 LIST_TEST(URLLoader_BasicFilePOST
)
563 LIST_TEST(URLLoader_BasicFileRangePOST
)
564 LIST_TEST(URLLoader_CompoundBodyPOST
)
565 LIST_TEST(URLLoader_EmptyDataPOST
)
566 LIST_TEST(URLLoader_BinaryDataPOST
)
567 LIST_TEST(URLLoader_CustomRequestHeader
)
568 LIST_TEST(URLLoader_FailsBogusContentLength
)
569 LIST_TEST(URLLoader_StreamToFile
)
570 LIST_TEST(URLLoader_UntrustedSameOriginRestriction
)
571 // We don't support Trusted APIs in NaCl.
572 LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction
)
573 LIST_TEST(URLLoader_UntrustedCrossOriginRequest
)
574 LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest
)
575 LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction
)
576 // TODO(bbudge) Fix Javascript URLs for trusted loaders.
577 // http://crbug.com/103062
578 LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction
)
579 LIST_TEST(URLLoader_UntrustedHttpRequests
)
580 LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests
)
581 LIST_TEST(URLLoader_FollowURLRedirect
)
582 LIST_TEST(URLLoader_AuditURLRedirect
)
583 LIST_TEST(URLLoader_AbortCalls
)
584 LIST_TEST(URLLoader_UntendedLoad
)
585 LIST_TEST(URLLoader_PrefetchBufferThreshold
)
588 // Flaky on 32-bit linux bot; http://crbug.com/308906
589 #if defined(OS_LINUX) && defined(ARCH_CPU_X86)
590 #define MAYBE_NaCl_Glibc_URLLoader DISABLED_URLLoader
592 #define MAYBE_NaCl_Glibc_URLLoader URLLoader
594 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_NaCl_Glibc_URLLoader
) {
596 LIST_TEST(URLLoader_BasicGET
)
597 LIST_TEST(URLLoader_BasicPOST
)
598 LIST_TEST(URLLoader_BasicFilePOST
)
599 LIST_TEST(URLLoader_BasicFileRangePOST
)
600 LIST_TEST(URLLoader_CompoundBodyPOST
)
601 LIST_TEST(URLLoader_EmptyDataPOST
)
602 LIST_TEST(URLLoader_BinaryDataPOST
)
603 LIST_TEST(URLLoader_CustomRequestHeader
)
604 LIST_TEST(URLLoader_FailsBogusContentLength
)
605 LIST_TEST(URLLoader_StreamToFile
)
606 LIST_TEST(URLLoader_UntrustedSameOriginRestriction
)
607 // We don't support Trusted APIs in NaCl.
608 LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction
)
609 LIST_TEST(URLLoader_UntrustedCrossOriginRequest
)
610 LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest
)
611 LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction
)
612 // TODO(bbudge) Fix Javascript URLs for trusted loaders.
613 // http://crbug.com/103062
614 LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction
)
615 LIST_TEST(URLLoader_UntrustedHttpRequests
)
616 LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests
)
617 LIST_TEST(URLLoader_FollowURLRedirect
)
618 LIST_TEST(URLLoader_AuditURLRedirect
)
619 LIST_TEST(URLLoader_AbortCalls
)
620 LIST_TEST(URLLoader_UntendedLoad
)
621 LIST_TEST(URLLoader_PrefetchBufferThreshold
)
624 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, URLLoader
) {
626 LIST_TEST(URLLoader_BasicGET
)
627 LIST_TEST(URLLoader_BasicPOST
)
628 LIST_TEST(URLLoader_BasicFilePOST
)
629 LIST_TEST(URLLoader_BasicFileRangePOST
)
630 LIST_TEST(URLLoader_CompoundBodyPOST
)
631 LIST_TEST(URLLoader_EmptyDataPOST
)
632 LIST_TEST(URLLoader_BinaryDataPOST
)
633 LIST_TEST(URLLoader_CustomRequestHeader
)
634 LIST_TEST(URLLoader_FailsBogusContentLength
)
635 LIST_TEST(URLLoader_StreamToFile
)
636 LIST_TEST(URLLoader_UntrustedSameOriginRestriction
)
637 // We don't support Trusted APIs in NaCl.
638 LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction
)
639 LIST_TEST(URLLoader_UntrustedCrossOriginRequest
)
640 LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest
)
641 LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction
)
642 // TODO(bbudge) Fix Javascript URLs for trusted loaders.
643 // http://crbug.com/103062
644 LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction
)
645 LIST_TEST(URLLoader_UntrustedHttpRequests
)
646 LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests
)
647 LIST_TEST(URLLoader_FollowURLRedirect
)
648 LIST_TEST(URLLoader_AuditURLRedirect
)
649 LIST_TEST(URLLoader_AbortCalls
)
650 LIST_TEST(URLLoader_UntendedLoad
)
651 LIST_TEST(URLLoader_PrefetchBufferThreshold
)
655 // URLRequestInfo tests.
656 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo
)
657 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo
)
659 // Timing out on Windows. http://crbug.com/129571
661 #define MAYBE_URLRequest_CreateAndIsURLRequestInfo \
662 DISABLED_URLRequest_CreateAndIsURLRequestInfo
664 #define MAYBE_URLRequest_CreateAndIsURLRequestInfo \
665 URLRequest_CreateAndIsURLRequestInfo
667 TEST_PPAPI_NACL(MAYBE_URLRequest_CreateAndIsURLRequestInfo
)
669 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_SetProperty
)
670 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_SetProperty
)
671 // http://crbug.com/167150
672 TEST_PPAPI_NACL(DISABLED_URLRequest_SetProperty
)
673 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody
)
674 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody
)
675 TEST_PPAPI_NACL(URLRequest_AppendDataToBody
)
676 TEST_PPAPI_IN_PROCESS_VIA_HTTP(DISABLED_URLRequest_AppendFileToBody
)
677 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(DISABLED_URLRequest_AppendFileToBody
)
678 TEST_PPAPI_NACL(DISABLED_URLRequest_AppendFileToBody
)
679 TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress
)
680 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress
)
681 TEST_PPAPI_NACL(URLRequest_Stress
)
683 TEST_PPAPI_IN_PROCESS(PaintAggregator
)
684 TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator
)
685 TEST_PPAPI_NACL(PaintAggregator
)
687 // TODO(danakj): http://crbug.com/115286
688 TEST_PPAPI_IN_PROCESS(DISABLED_Scrollbar
)
689 // http://crbug.com/89961
690 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, DISABLED_Scrollbar
) {
691 RunTest("Scrollbar");
693 // TODO(danakj): http://crbug.com/115286
694 TEST_PPAPI_NACL(DISABLED_Scrollbar
)
696 TEST_PPAPI_IN_PROCESS(URLUtil
)
697 TEST_PPAPI_OUT_OF_PROCESS(URLUtil
)
699 TEST_PPAPI_IN_PROCESS(CharSet
)
700 TEST_PPAPI_OUT_OF_PROCESS(CharSet
)
702 TEST_PPAPI_IN_PROCESS(Crypto
)
703 TEST_PPAPI_OUT_OF_PROCESS(Crypto
)
705 TEST_PPAPI_IN_PROCESS(Var
)
706 TEST_PPAPI_OUT_OF_PROCESS(Var
)
709 TEST_PPAPI_IN_PROCESS(VarResource
)
710 TEST_PPAPI_OUT_OF_PROCESS(VarResource
)
711 TEST_PPAPI_NACL(VarResource
)
713 // Flaky on mac, http://crbug.com/121107
714 #if defined(OS_MACOSX)
715 #define MAYBE_VarDeprecated DISABLED_VarDeprecated
717 #define MAYBE_VarDeprecated VarDeprecated
720 TEST_PPAPI_IN_PROCESS(VarDeprecated
)
721 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_VarDeprecated
)
723 // Windows defines 'PostMessage', so we have to undef it.
727 // PostMessage tests.
728 IN_PROC_BROWSER_TEST_F(PPAPITest
, PostMessage
) {
730 LIST_TEST(PostMessage_SendInInit
)
731 LIST_TEST(PostMessage_SendingData
)
732 LIST_TEST(PostMessage_SendingArrayBuffer
)
733 LIST_TEST(DISABLED_PostMessage_SendingArray
)
734 LIST_TEST(DISABLED_PostMessage_SendingDictionary
)
735 LIST_TEST(DISABLED_PostMessage_SendingResource
)
736 LIST_TEST(DISABLED_PostMessage_SendingComplexVar
)
737 LIST_TEST(PostMessage_MessageEvent
)
738 LIST_TEST(PostMessage_NoHandler
)
739 LIST_TEST(PostMessage_ExtraParam
)
743 // Flaky: crbug.com/269530
745 #define MAYBE_PostMessage DISABLED_PostMessage
747 #define MAYBE_PostMessage PostMessage
749 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, MAYBE_PostMessage
) {
751 LIST_TEST(PostMessage_SendInInit
)
752 LIST_TEST(PostMessage_SendingData
)
753 LIST_TEST(PostMessage_SendingArrayBuffer
)
754 LIST_TEST(PostMessage_SendingArray
)
755 LIST_TEST(PostMessage_SendingDictionary
)
756 LIST_TEST(PostMessage_SendingResource
)
757 LIST_TEST(PostMessage_SendingComplexVar
)
758 LIST_TEST(PostMessage_MessageEvent
)
759 LIST_TEST(PostMessage_NoHandler
)
760 LIST_TEST(PostMessage_ExtraParam
)
761 LIST_TEST(PostMessage_NonMainThread
)
764 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, PostMessage
) {
766 LIST_TEST(PostMessage_SendInInit
)
767 LIST_TEST(PostMessage_SendingData
)
768 LIST_TEST(PostMessage_SendingArrayBuffer
)
769 LIST_TEST(PostMessage_SendingArray
)
770 LIST_TEST(PostMessage_SendingDictionary
)
771 LIST_TEST(PostMessage_SendingResource
)
772 LIST_TEST(PostMessage_SendingComplexVar
)
773 LIST_TEST(PostMessage_MessageEvent
)
774 LIST_TEST(PostMessage_NoHandler
)
775 LIST_TEST(PostMessage_ExtraParam
)
776 LIST_TEST(PostMessage_NonMainThread
)
779 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(PostMessage
)) {
781 LIST_TEST(PostMessage_SendInInit
)
782 LIST_TEST(PostMessage_SendingData
)
783 LIST_TEST(PostMessage_SendingArrayBuffer
)
784 LIST_TEST(PostMessage_SendingArray
)
785 LIST_TEST(PostMessage_SendingDictionary
)
786 LIST_TEST(PostMessage_SendingResource
)
787 LIST_TEST(PostMessage_SendingComplexVar
)
788 LIST_TEST(PostMessage_MessageEvent
)
789 LIST_TEST(PostMessage_NoHandler
)
790 LIST_TEST(PostMessage_ExtraParam
)
791 LIST_TEST(PostMessage_NonMainThread
)
794 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, PostMessage
) {
796 LIST_TEST(PostMessage_SendInInit
)
797 LIST_TEST(PostMessage_SendingData
)
798 LIST_TEST(PostMessage_SendingArrayBuffer
)
799 LIST_TEST(PostMessage_SendingArray
)
800 LIST_TEST(PostMessage_SendingDictionary
)
801 LIST_TEST(PostMessage_SendingResource
)
802 LIST_TEST(PostMessage_SendingComplexVar
)
803 LIST_TEST(PostMessage_MessageEvent
)
804 LIST_TEST(PostMessage_NoHandler
)
805 LIST_TEST(PostMessage_ExtraParam
)
806 LIST_TEST(PostMessage_NonMainThread
)
810 TEST_PPAPI_IN_PROCESS(Memory
)
811 TEST_PPAPI_OUT_OF_PROCESS(Memory
)
812 TEST_PPAPI_NACL(Memory
)
814 TEST_PPAPI_IN_PROCESS(VideoDecoder
)
815 TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder
)
817 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
818 // TODO(erg): linux_aura bringup: http://crbug.com/318961
819 #define MAYBE_FileIO DISABLED_FileIO
820 #define MAYBE_FileIO_Private DISABLED_FileIO_Private
822 #define MAYBE_FileIO FileIO
823 #define MAYBE_FileIO_Private FileIO_Private
827 IN_PROC_BROWSER_TEST_F(PPAPITest
, MAYBE_FileIO
) {
829 LIST_TEST(FileIO_Open
)
830 LIST_TEST(FileIO_OpenDirectory
)
831 LIST_TEST(FileIO_AbortCalls
)
832 LIST_TEST(FileIO_ParallelReads
)
833 LIST_TEST(FileIO_ParallelWrites
)
834 LIST_TEST(FileIO_NotAllowMixedReadWrite
)
835 LIST_TEST(FileIO_ReadWriteSetLength
)
836 LIST_TEST(FileIO_ReadToArrayWriteSetLength
)
837 LIST_TEST(FileIO_TouchQuery
)
840 IN_PROC_BROWSER_TEST_F(PPAPIPrivateTest
, MAYBE_FileIO_Private
) {
842 LIST_TEST(FileIO_RequestOSFileHandle
)
843 LIST_TEST(FileIO_RequestOSFileHandleWithOpenExclusive
)
844 LIST_TEST(FileIO_Mmap
)
847 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, MAYBE_FileIO
) {
849 LIST_TEST(FileIO_Open
)
850 LIST_TEST(FileIO_AbortCalls
)
851 LIST_TEST(FileIO_ParallelReads
)
852 LIST_TEST(FileIO_ParallelWrites
)
853 LIST_TEST(FileIO_NotAllowMixedReadWrite
)
854 LIST_TEST(FileIO_ReadWriteSetLength
)
855 LIST_TEST(FileIO_ReadToArrayWriteSetLength
)
856 LIST_TEST(FileIO_TouchQuery
)
859 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPIPrivateTest
, MAYBE_FileIO_Private
) {
861 LIST_TEST(FileIO_RequestOSFileHandle
)
862 LIST_TEST(FileIO_RequestOSFileHandleWithOpenExclusive
)
863 LIST_TEST(FileIO_Mmap
)
866 // Flaky on XP; times out, http://crbug.com/313401
868 #define MAYBE_Nacl_Newlib_FileIO DISABLED_FileIO
869 #define MAYBE_Nacl_Newlib_FileIO_Private DISABLED_FileIO_Private
871 #define MAYBE_Nacl_Newlib_FileIO FileIO
872 #define MAYBE_Nacl_Newlib_FileIO_Private FileIO_Private
874 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, MAYBE_Nacl_Newlib_FileIO
) {
876 LIST_TEST(FileIO_Open
)
877 LIST_TEST(FileIO_AbortCalls
)
878 LIST_TEST(FileIO_ParallelReads
)
879 LIST_TEST(FileIO_ParallelWrites
)
880 LIST_TEST(FileIO_NotAllowMixedReadWrite
)
881 LIST_TEST(FileIO_ReadWriteSetLength
)
882 LIST_TEST(FileIO_ReadToArrayWriteSetLength
)
883 LIST_TEST(FileIO_TouchQuery
)
886 IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClNewlibTest
,
887 MAYBE_Nacl_Newlib_FileIO_Private
) {
889 LIST_TEST(FileIO_RequestOSFileHandle
)
890 LIST_TEST(FileIO_RequestOSFileHandleWithOpenExclusive
)
891 LIST_TEST(FileIO_Mmap
)
894 // Flaky on 32-bit linux bot; http://crbug.com/308905
895 // Flaky on Windows too; http://crbug.com/321300
896 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, DISABLED_NaCl_Glibc_FileIO
) {
898 LIST_TEST(FileIO_Open
)
899 LIST_TEST(FileIO_AbortCalls
)
900 LIST_TEST(FileIO_ParallelReads
)
901 LIST_TEST(FileIO_ParallelWrites
)
902 LIST_TEST(FileIO_NotAllowMixedReadWrite
)
903 LIST_TEST(FileIO_ReadWriteSetLength
)
904 LIST_TEST(FileIO_ReadToArrayWriteSetLength
)
905 LIST_TEST(FileIO_TouchQuery
)
908 IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClGLibcTest
,
909 DISABLED_NaCl_Glibc_FileIO_Private
) {
911 LIST_TEST(FileIO_RequestOSFileHandle
)
912 LIST_TEST(FileIO_RequestOSFileHandleWithOpenExclusive
)
913 LIST_TEST(FileIO_Mmap
)
916 // Flaky on XP; times out, http://crbug.com/313205
918 #define MAYBE_PNaCl_FileIO DISABLED_FileIO
919 #define MAYBE_PNaCl_FileIO_Private DISABLED_FileIO_Private
921 #define MAYBE_PNaCl_FileIO FileIO
922 #define MAYBE_PNaCl_FileIO_Private FileIO_Private
924 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, MAYBE_PNaCl_FileIO
) {
926 LIST_TEST(FileIO_Open
)
927 LIST_TEST(FileIO_AbortCalls
)
928 LIST_TEST(FileIO_ParallelReads
)
929 LIST_TEST(FileIO_ParallelWrites
)
930 LIST_TEST(FileIO_NotAllowMixedReadWrite
)
931 LIST_TEST(FileIO_ReadWriteSetLength
)
932 LIST_TEST(FileIO_ReadToArrayWriteSetLength
)
933 LIST_TEST(FileIO_TouchQuery
)
936 IN_PROC_BROWSER_TEST_F(PPAPIPrivateNaClPNaClTest
, MAYBE_PNaCl_FileIO_Private
) {
938 LIST_TEST(FileIO_RequestOSFileHandle
)
939 LIST_TEST(FileIO_RequestOSFileHandleWithOpenExclusive
)
940 LIST_TEST(FileIO_Mmap
)
944 IN_PROC_BROWSER_TEST_F(PPAPITest
, FileRef
) {
946 LIST_TEST(FileRef_Create
)
947 LIST_TEST(FileRef_GetFileSystemType
)
948 LIST_TEST(FileRef_GetName
)
949 LIST_TEST(FileRef_GetPath
)
950 LIST_TEST(FileRef_GetParent
)
951 LIST_TEST(FileRef_MakeDirectory
)
952 LIST_TEST(FileRef_QueryAndTouchFile
)
953 LIST_TEST(FileRef_DeleteFileAndDirectory
)
954 LIST_TEST(FileRef_RenameFileAndDirectory
)
955 LIST_TEST(FileRef_Query
)
956 LIST_TEST(FileRef_FileNameEscaping
)
957 LIST_TEST(FileRef_ReadDirectoryEntries
)
960 // OutOfProcessPPAPITest.FileRef times out fairly often.
961 // http://crbug.com/241646
962 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, FileRef
) {
964 LIST_TEST(FileRef_Create
)
965 LIST_TEST(FileRef_GetFileSystemType
)
966 LIST_TEST(FileRef_GetName
)
967 LIST_TEST(FileRef_GetPath
)
968 LIST_TEST(FileRef_GetParent
)
969 LIST_TEST(FileRef_MakeDirectory
)
970 LIST_TEST(FileRef_QueryAndTouchFile
)
971 LIST_TEST(FileRef_DeleteFileAndDirectory
)
972 LIST_TEST(FileRef_RenameFileAndDirectory
)
973 LIST_TEST(FileRef_Query
)
974 LIST_TEST(FileRef_FileNameEscaping
)
975 LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries
)
978 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, FileRef
) {
980 LIST_TEST(FileRef_Create
)
981 LIST_TEST(FileRef_GetFileSystemType
)
982 LIST_TEST(FileRef_GetName
)
983 LIST_TEST(FileRef_GetPath
)
984 LIST_TEST(FileRef_GetParent
)
985 LIST_TEST(FileRef_MakeDirectory
)
986 LIST_TEST(FileRef_QueryAndTouchFile
)
987 LIST_TEST(FileRef_DeleteFileAndDirectory
)
988 LIST_TEST(FileRef_RenameFileAndDirectory
)
989 LIST_TEST(FileRef_Query
)
990 LIST_TEST(FileRef_FileNameEscaping
)
991 LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries
)
994 // Flaky on 32-bit linux bot; http://crbug.com/308908
995 #if defined(OS_LINUX) && defined(ARCH_CPU_X86)
996 #define MAYBE_NaCl_Glibc_FileRef DISABLED_FileRef
998 #define MAYBE_NaCl_Glibc_FileRef FileRef
1000 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_NaCl_Glibc_FileRef
) {
1002 LIST_TEST(FileRef_Create
)
1003 LIST_TEST(FileRef_GetFileSystemType
)
1004 LIST_TEST(FileRef_GetName
)
1005 LIST_TEST(FileRef_GetPath
)
1006 LIST_TEST(FileRef_GetParent
)
1007 LIST_TEST(FileRef_MakeDirectory
)
1008 LIST_TEST(FileRef_QueryAndTouchFile
)
1009 LIST_TEST(FileRef_DeleteFileAndDirectory
)
1010 LIST_TEST(FileRef_RenameFileAndDirectory
)
1011 LIST_TEST(FileRef_Query
)
1012 LIST_TEST(FileRef_FileNameEscaping
)
1013 LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries
)
1016 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, FileRef
) {
1018 LIST_TEST(FileRef_Create
)
1019 LIST_TEST(FileRef_GetFileSystemType
)
1020 LIST_TEST(FileRef_GetName
)
1021 LIST_TEST(FileRef_GetPath
)
1022 LIST_TEST(FileRef_GetParent
)
1023 LIST_TEST(FileRef_MakeDirectory
)
1024 LIST_TEST(FileRef_QueryAndTouchFile
)
1025 LIST_TEST(FileRef_DeleteFileAndDirectory
)
1026 LIST_TEST(FileRef_RenameFileAndDirectory
)
1027 LIST_TEST(FileRef_Query
)
1028 LIST_TEST(FileRef_FileNameEscaping
)
1029 LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries
)
1033 TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileSystem
)
1034 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileSystem
)
1036 // PPAPINaClTest.FileSystem times out consistently on Windows and Mac.
1037 // http://crbug.com/130372
1038 #if defined(OS_MACOSX) || defined(OS_WIN)
1039 #define MAYBE_FileSystem DISABLED_FileSystem
1041 #define MAYBE_FileSystem FileSystem
1044 TEST_PPAPI_NACL(MAYBE_FileSystem
)
1046 #if defined(OS_MACOSX)
1047 // http://crbug.com/103912
1048 #define MAYBE_Fullscreen DISABLED_Fullscreen
1049 #elif defined(OS_LINUX)
1050 // http://crbug.com/146008
1051 #define MAYBE_Fullscreen DISABLED_Fullscreen
1053 #define MAYBE_Fullscreen Fullscreen
1056 TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_Fullscreen
)
1057 TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_Fullscreen
)
1058 TEST_PPAPI_NACL(MAYBE_Fullscreen
)
1060 TEST_PPAPI_OUT_OF_PROCESS(X509CertificatePrivate
)
1062 // There is no proxy. This is used for PDF metrics reporting, and PDF only
1063 // runs in process, so there's currently no need for a proxy.
1064 TEST_PPAPI_IN_PROCESS(UMA
)
1067 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, NetAddress
) {
1069 LIST_TEST(NetAddress_IPv4Address
)
1070 LIST_TEST(NetAddress_IPv6Address
)
1071 LIST_TEST(NetAddress_DescribeAsString
)
1074 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, NetAddress
) {
1076 LIST_TEST(NetAddress_IPv4Address
)
1077 LIST_TEST(NetAddress_IPv6Address
)
1078 LIST_TEST(NetAddress_DescribeAsString
)
1081 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(NetAddress
)) {
1083 LIST_TEST(NetAddress_IPv4Address
)
1084 LIST_TEST(NetAddress_IPv6Address
)
1085 LIST_TEST(NetAddress_DescribeAsString
)
1088 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, NetAddress
) {
1090 LIST_TEST(NetAddress_IPv4Address
)
1091 LIST_TEST(NetAddress_IPv6Address
)
1092 LIST_TEST(NetAddress_DescribeAsString
)
1096 IN_PROC_BROWSER_TEST_F(PPAPITest
, NetAddressPrivate
) {
1098 LIST_TEST(NetAddressPrivate_AreEqual
)
1099 LIST_TEST(NetAddressPrivate_AreHostsEqual
)
1100 LIST_TEST(NetAddressPrivate_Describe
)
1101 LIST_TEST(NetAddressPrivate_ReplacePort
)
1102 LIST_TEST(NetAddressPrivate_GetAnyAddress
)
1103 LIST_TEST(NetAddressPrivate_DescribeIPv6
)
1104 LIST_TEST(NetAddressPrivate_GetFamily
)
1105 LIST_TEST(NetAddressPrivate_GetPort
)
1106 LIST_TEST(NetAddressPrivate_GetAddress
)
1107 LIST_TEST(NetAddressPrivate_GetScopeID
)
1110 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, NetAddressPrivate
) {
1112 LIST_TEST(NetAddressPrivate_AreEqual
)
1113 LIST_TEST(NetAddressPrivate_AreHostsEqual
)
1114 LIST_TEST(NetAddressPrivate_Describe
)
1115 LIST_TEST(NetAddressPrivate_ReplacePort
)
1116 LIST_TEST(NetAddressPrivate_GetAnyAddress
)
1117 LIST_TEST(NetAddressPrivate_DescribeIPv6
)
1118 LIST_TEST(NetAddressPrivate_GetFamily
)
1119 LIST_TEST(NetAddressPrivate_GetPort
)
1120 LIST_TEST(NetAddressPrivate_GetAddress
)
1121 LIST_TEST(NetAddressPrivate_GetScopeID
)
1124 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, NetAddressPrivate
) {
1126 LIST_TEST(NetAddressPrivateUntrusted_AreEqual
)
1127 LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual
)
1128 LIST_TEST(NetAddressPrivateUntrusted_Describe
)
1129 LIST_TEST(NetAddressPrivateUntrusted_ReplacePort
)
1130 LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress
)
1131 LIST_TEST(NetAddressPrivateUntrusted_GetFamily
)
1132 LIST_TEST(NetAddressPrivateUntrusted_GetPort
)
1133 LIST_TEST(NetAddressPrivateUntrusted_GetAddress
)
1136 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(NetAddressPrivate
)) {
1138 LIST_TEST(NetAddressPrivateUntrusted_AreEqual
)
1139 LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual
)
1140 LIST_TEST(NetAddressPrivateUntrusted_Describe
)
1141 LIST_TEST(NetAddressPrivateUntrusted_ReplacePort
)
1142 LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress
)
1143 LIST_TEST(NetAddressPrivateUntrusted_GetFamily
)
1144 LIST_TEST(NetAddressPrivateUntrusted_GetPort
)
1145 LIST_TEST(NetAddressPrivateUntrusted_GetAddress
)
1148 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, NetAddressPrivate
) {
1150 LIST_TEST(NetAddressPrivateUntrusted_AreEqual
)
1151 LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual
)
1152 LIST_TEST(NetAddressPrivateUntrusted_Describe
)
1153 LIST_TEST(NetAddressPrivateUntrusted_ReplacePort
)
1154 LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress
)
1155 LIST_TEST(NetAddressPrivateUntrusted_GetFamily
)
1156 LIST_TEST(NetAddressPrivateUntrusted_GetPort
)
1157 LIST_TEST(NetAddressPrivateUntrusted_GetAddress
)
1161 // NetworkMonitor tests.
1162 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, NetworkMonitor
) {
1164 LIST_TEST(NetworkMonitor_Basic
)
1165 LIST_TEST(NetworkMonitor_2Monitors
)
1166 LIST_TEST(NetworkMonitor_DeleteInCallback
)
1169 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, NetworkMonitor
) {
1171 LIST_TEST(NetworkMonitor_Basic
)
1172 LIST_TEST(NetworkMonitor_2Monitors
)
1173 LIST_TEST(NetworkMonitor_DeleteInCallback
)
1176 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(NetworkMonitor
)) {
1178 LIST_TEST(NetworkMonitor_Basic
)
1179 LIST_TEST(NetworkMonitor_2Monitors
)
1180 LIST_TEST(NetworkMonitor_DeleteInCallback
)
1183 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, NetworkMonitor
) {
1185 LIST_TEST(NetworkMonitor_Basic
)
1186 LIST_TEST(NetworkMonitor_2Monitors
)
1187 LIST_TEST(NetworkMonitor_DeleteInCallback
)
1192 IN_PROC_BROWSER_TEST_F(PPAPITest
, Flash
) {
1194 LIST_TEST(Flash_SetInstanceAlwaysOnTop
)
1195 LIST_TEST(Flash_GetCommandLineArgs
)
1198 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, Flash
) {
1200 LIST_TEST(Flash_SetInstanceAlwaysOnTop
)
1201 LIST_TEST(Flash_GetCommandLineArgs
)
1205 // In-process WebSocket tests
1206 IN_PROC_BROWSER_TEST_F(PPAPITest
, WebSocket
) {
1207 RunTestWithWebSocketServer(
1208 LIST_TEST(WebSocket_IsWebSocket
)
1209 LIST_TEST(WebSocket_UninitializedPropertiesAccess
)
1210 LIST_TEST(WebSocket_InvalidConnect
)
1211 LIST_TEST(WebSocket_Protocols
)
1212 LIST_TEST(WebSocket_GetURL
)
1213 LIST_TEST(WebSocket_ValidConnect
)
1214 LIST_TEST(WebSocket_InvalidClose
)
1215 LIST_TEST(WebSocket_ValidClose
)
1216 LIST_TEST(WebSocket_GetProtocol
)
1217 LIST_TEST(WebSocket_TextSendReceive
)
1218 LIST_TEST(WebSocket_BinarySendReceive
)
1219 LIST_TEST(WebSocket_StressedSendReceive
)
1220 LIST_TEST(WebSocket_BufferedAmount
)
1221 LIST_TEST(WebSocket_AbortCallsWithCallback
)
1222 LIST_TEST(WebSocket_AbortSendMessageCall
)
1223 LIST_TEST(WebSocket_AbortCloseCall
)
1224 LIST_TEST(WebSocket_AbortReceiveMessageCall
)
1225 LIST_TEST(WebSocket_CcInterfaces
)
1226 LIST_TEST(WebSocket_UtilityInvalidConnect
)
1227 LIST_TEST(WebSocket_UtilityProtocols
)
1228 LIST_TEST(WebSocket_UtilityGetURL
)
1229 LIST_TEST(WebSocket_UtilityValidConnect
)
1230 LIST_TEST(WebSocket_UtilityInvalidClose
)
1231 LIST_TEST(WebSocket_UtilityValidClose
)
1232 LIST_TEST(WebSocket_UtilityGetProtocol
)
1233 LIST_TEST(WebSocket_UtilityTextSendReceive
)
1234 LIST_TEST(WebSocket_UtilityBinarySendReceive
)
1235 LIST_TEST(WebSocket_UtilityBufferedAmount
));
1238 // Out-of-process WebSocket tests
1239 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, WebSocket
) {
1240 RunTestWithWebSocketServer(
1241 LIST_TEST(WebSocket_IsWebSocket
)
1242 LIST_TEST(WebSocket_UninitializedPropertiesAccess
)
1243 LIST_TEST(WebSocket_InvalidConnect
)
1244 LIST_TEST(WebSocket_Protocols
)
1245 LIST_TEST(WebSocket_GetURL
)
1246 LIST_TEST(WebSocket_ValidConnect
)
1247 LIST_TEST(WebSocket_InvalidClose
)
1248 LIST_TEST(WebSocket_ValidClose
)
1249 LIST_TEST(WebSocket_GetProtocol
)
1250 LIST_TEST(WebSocket_TextSendReceive
)
1251 LIST_TEST(WebSocket_BinarySendReceive
)
1252 LIST_TEST(WebSocket_StressedSendReceive
)
1253 LIST_TEST(WebSocket_BufferedAmount
)
1254 LIST_TEST(WebSocket_AbortCallsWithCallback
)
1255 LIST_TEST(WebSocket_AbortSendMessageCall
)
1256 LIST_TEST(WebSocket_AbortCloseCall
)
1257 LIST_TEST(WebSocket_AbortReceiveMessageCall
)
1258 LIST_TEST(WebSocket_CcInterfaces
)
1259 LIST_TEST(WebSocket_UtilityInvalidConnect
)
1260 LIST_TEST(WebSocket_UtilityProtocols
)
1261 LIST_TEST(WebSocket_UtilityGetURL
)
1262 LIST_TEST(WebSocket_UtilityValidConnect
)
1263 LIST_TEST(WebSocket_UtilityInvalidClose
)
1264 LIST_TEST(WebSocket_UtilityValidClose
)
1265 LIST_TEST(WebSocket_UtilityGetProtocol
)
1266 LIST_TEST(WebSocket_UtilityTextSendReceive
)
1267 LIST_TEST(WebSocket_UtilityBinarySendReceive
)
1268 LIST_TEST(WebSocket_UtilityBufferedAmount
));
1271 // NaClNewlib WebSocket tests
1272 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, WebSocket
) {
1273 RunTestWithWebSocketServer(
1274 LIST_TEST(WebSocket_IsWebSocket
)
1275 LIST_TEST(WebSocket_UninitializedPropertiesAccess
)
1276 LIST_TEST(WebSocket_InvalidConnect
)
1277 LIST_TEST(WebSocket_Protocols
)
1278 LIST_TEST(WebSocket_GetURL
)
1279 LIST_TEST(WebSocket_ValidConnect
)
1280 LIST_TEST(WebSocket_InvalidClose
)
1281 LIST_TEST(WebSocket_ValidClose
)
1282 LIST_TEST(WebSocket_GetProtocol
)
1283 LIST_TEST(WebSocket_TextSendReceive
)
1284 LIST_TEST(WebSocket_BinarySendReceive
)
1285 LIST_TEST(WebSocket_StressedSendReceive
)
1286 LIST_TEST(WebSocket_BufferedAmount
)
1287 LIST_TEST(WebSocket_AbortCallsWithCallback
)
1288 LIST_TEST(WebSocket_AbortSendMessageCall
)
1289 LIST_TEST(WebSocket_AbortCloseCall
)
1290 LIST_TEST(WebSocket_AbortReceiveMessageCall
)
1291 LIST_TEST(WebSocket_CcInterfaces
)
1292 LIST_TEST(WebSocket_UtilityInvalidConnect
)
1293 LIST_TEST(WebSocket_UtilityProtocols
)
1294 LIST_TEST(WebSocket_UtilityGetURL
)
1295 LIST_TEST(WebSocket_UtilityValidConnect
)
1296 LIST_TEST(WebSocket_UtilityInvalidClose
)
1297 LIST_TEST(WebSocket_UtilityValidClose
)
1298 LIST_TEST(WebSocket_UtilityGetProtocol
)
1299 LIST_TEST(WebSocket_UtilityTextSendReceive
)
1300 LIST_TEST(WebSocket_UtilityBinarySendReceive
)
1301 LIST_TEST(WebSocket_UtilityBufferedAmount
));
1304 // NaClGLibc WebSocket tests
1305 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(WebSocket
)) {
1306 RunTestWithWebSocketServer(
1307 LIST_TEST(WebSocket_IsWebSocket
)
1308 LIST_TEST(WebSocket_UninitializedPropertiesAccess
)
1309 LIST_TEST(WebSocket_InvalidConnect
)
1310 LIST_TEST(WebSocket_Protocols
)
1311 LIST_TEST(WebSocket_GetURL
)
1312 LIST_TEST(WebSocket_ValidConnect
)
1313 LIST_TEST(WebSocket_InvalidClose
)
1314 LIST_TEST(WebSocket_ValidClose
)
1315 LIST_TEST(WebSocket_GetProtocol
)
1316 LIST_TEST(WebSocket_TextSendReceive
)
1317 LIST_TEST(WebSocket_BinarySendReceive
)
1318 LIST_TEST(WebSocket_StressedSendReceive
)
1319 LIST_TEST(WebSocket_BufferedAmount
)
1320 LIST_TEST(WebSocket_AbortCallsWithCallback
)
1321 LIST_TEST(WebSocket_AbortSendMessageCall
)
1322 LIST_TEST(WebSocket_AbortCloseCall
)
1323 LIST_TEST(WebSocket_AbortReceiveMessageCall
)
1324 LIST_TEST(WebSocket_CcInterfaces
)
1325 LIST_TEST(WebSocket_UtilityInvalidConnect
)
1326 LIST_TEST(WebSocket_UtilityProtocols
)
1327 LIST_TEST(WebSocket_UtilityGetURL
)
1328 LIST_TEST(WebSocket_UtilityValidConnect
)
1329 LIST_TEST(WebSocket_UtilityInvalidClose
)
1330 LIST_TEST(WebSocket_UtilityValidClose
)
1331 LIST_TEST(WebSocket_UtilityGetProtocol
)
1332 LIST_TEST(WebSocket_UtilityTextSendReceive
)
1333 LIST_TEST(WebSocket_UtilityBinarySendReceive
)
1334 LIST_TEST(WebSocket_UtilityBufferedAmount
));
1337 // PNaCl WebSocket tests
1338 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, WebSocket
) {
1339 RunTestWithWebSocketServer(
1340 LIST_TEST(WebSocket_IsWebSocket
)
1341 LIST_TEST(WebSocket_UninitializedPropertiesAccess
)
1342 LIST_TEST(WebSocket_InvalidConnect
)
1343 LIST_TEST(WebSocket_Protocols
)
1344 LIST_TEST(WebSocket_GetURL
)
1345 LIST_TEST(WebSocket_ValidConnect
)
1346 LIST_TEST(WebSocket_InvalidClose
)
1347 LIST_TEST(WebSocket_ValidClose
)
1348 LIST_TEST(WebSocket_GetProtocol
)
1349 LIST_TEST(WebSocket_TextSendReceive
)
1350 LIST_TEST(WebSocket_BinarySendReceive
)
1351 LIST_TEST(WebSocket_StressedSendReceive
)
1352 LIST_TEST(WebSocket_BufferedAmount
)
1353 LIST_TEST(WebSocket_AbortCallsWithCallback
)
1354 LIST_TEST(WebSocket_AbortSendMessageCall
)
1355 LIST_TEST(WebSocket_AbortCloseCall
)
1356 LIST_TEST(WebSocket_AbortReceiveMessageCall
)
1357 LIST_TEST(WebSocket_CcInterfaces
)
1358 LIST_TEST(WebSocket_UtilityInvalidConnect
)
1359 LIST_TEST(WebSocket_UtilityProtocols
)
1360 LIST_TEST(WebSocket_UtilityGetURL
)
1361 LIST_TEST(WebSocket_UtilityValidConnect
)
1362 LIST_TEST(WebSocket_UtilityInvalidClose
)
1363 LIST_TEST(WebSocket_UtilityValidClose
)
1364 LIST_TEST(WebSocket_UtilityGetProtocol
)
1365 LIST_TEST(WebSocket_UtilityTextSendReceive
)
1366 LIST_TEST(WebSocket_UtilityBinarySendReceive
)
1367 LIST_TEST(WebSocket_UtilityBufferedAmount
));
1371 // In-process AudioConfig tests
1372 IN_PROC_BROWSER_TEST_F(PPAPITest
, AudioConfig
) {
1374 LIST_TEST(AudioConfig_RecommendSampleRate
)
1375 LIST_TEST(AudioConfig_ValidConfigs
)
1376 LIST_TEST(AudioConfig_InvalidConfigs
));
1379 // Out-of-process AudioConfig tests
1380 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, AudioConfig
) {
1382 LIST_TEST(AudioConfig_RecommendSampleRate
)
1383 LIST_TEST(AudioConfig_ValidConfigs
)
1384 LIST_TEST(AudioConfig_InvalidConfigs
));
1387 // NaClNewlib AudioConfig tests
1388 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, AudioConfig
) {
1390 LIST_TEST(AudioConfig_RecommendSampleRate
)
1391 LIST_TEST(AudioConfig_ValidConfigs
)
1392 LIST_TEST(AudioConfig_InvalidConfigs
));
1395 // NaClGLibc AudioConfig tests
1396 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(AudioConfig
)) {
1398 LIST_TEST(AudioConfig_RecommendSampleRate
)
1399 LIST_TEST(AudioConfig_ValidConfigs
)
1400 LIST_TEST(AudioConfig_InvalidConfigs
));
1403 // PNaCl AudioConfig tests
1404 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, AudioConfig
) {
1406 LIST_TEST(AudioConfig_RecommendSampleRate
)
1407 LIST_TEST(AudioConfig_ValidConfigs
)
1408 LIST_TEST(AudioConfig_InvalidConfigs
));
1411 // Flaky on ChromeOS dbg, http://crbug.com/277564.
1412 #if defined(OS_CHROMEOS) && !defined(NDEBUG)
1413 #define MAYBE_Audio DISABLED_Audio
1415 #define MAYBE_Audio Audio
1417 IN_PROC_BROWSER_TEST_F(PPAPITest
, MAYBE_Audio
) {
1418 RunTest(LIST_TEST(Audio_Creation
)
1419 LIST_TEST(Audio_DestroyNoStop
)
1420 LIST_TEST(Audio_Failures
)
1421 LIST_TEST(Audio_AudioCallback1
)
1422 LIST_TEST(Audio_AudioCallback2
)
1423 LIST_TEST(Audio_AudioCallback3
)
1424 LIST_TEST(Audio_AudioCallback4
));
1426 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, Audio
) {
1427 RunTest(LIST_TEST(Audio_Creation
)
1428 LIST_TEST(Audio_DestroyNoStop
)
1429 LIST_TEST(Audio_Failures
)
1430 LIST_TEST(Audio_AudioCallback1
)
1431 LIST_TEST(Audio_AudioCallback2
)
1432 LIST_TEST(Audio_AudioCallback3
)
1433 LIST_TEST(Audio_AudioCallback4
));
1435 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, Audio
) {
1436 RunTestViaHTTP(LIST_TEST(Audio_Creation
)
1437 LIST_TEST(Audio_DestroyNoStop
)
1438 LIST_TEST(Audio_Failures
)
1439 LIST_TEST(Audio_AudioCallback1
)
1440 LIST_TEST(Audio_AudioCallback2
)
1441 LIST_TEST(Audio_AudioCallback3
)
1442 LIST_TEST(Audio_AudioCallback4
));
1444 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(Audio
)) {
1445 RunTestViaHTTP(LIST_TEST(Audio_Creation
)
1446 LIST_TEST(Audio_DestroyNoStop
)
1447 LIST_TEST(Audio_Failures
)
1448 LIST_TEST(Audio_AudioCallback1
)
1449 LIST_TEST(Audio_AudioCallback2
)
1450 LIST_TEST(Audio_AudioCallback3
)
1451 LIST_TEST(Audio_AudioCallback4
));
1453 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, Audio
) {
1454 RunTestViaHTTP(LIST_TEST(Audio_Creation
)
1455 LIST_TEST(Audio_DestroyNoStop
)
1456 LIST_TEST(Audio_Failures
)
1457 LIST_TEST(Audio_AudioCallback1
)
1458 LIST_TEST(Audio_AudioCallback2
)
1459 LIST_TEST(Audio_AudioCallback3
)
1460 LIST_TEST(Audio_AudioCallback4
));
1463 TEST_PPAPI_IN_PROCESS(View_CreatedVisible
);
1464 TEST_PPAPI_OUT_OF_PROCESS(View_CreatedVisible
);
1465 TEST_PPAPI_NACL(View_CreatedVisible
);
1466 // This test ensures that plugins created in a background tab have their
1467 // initial visibility set to false. We don't bother testing in-process for this
1468 // custom test since the out of process code also exercises in-process.
1470 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, View_CreateInvisible
) {
1471 // Make a second tab in the foreground.
1472 GURL url
= GetTestFileUrl("View_CreatedInvisible");
1473 chrome::NavigateParams
params(browser(), url
, content::PAGE_TRANSITION_LINK
);
1474 params
.disposition
= NEW_BACKGROUND_TAB
;
1475 ui_test_utils::NavigateToURL(¶ms
);
1478 // This test messes with tab visibility so is custom.
1479 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, View_PageHideShow
) {
1480 // The plugin will be loaded in the foreground tab and will send us a message.
1481 PPAPITestMessageHandler handler
;
1482 JavascriptTestObserver
observer(
1483 browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost(),
1486 GURL url
= GetTestFileUrl("View_PageHideShow");
1487 ui_test_utils::NavigateToURL(browser(), url
);
1489 ASSERT_TRUE(observer
.Run()) << handler
.error_message();
1490 EXPECT_STREQ("TestPageHideShow:Created", handler
.message().c_str());
1493 // Make a new tab to cause the original one to hide, this should trigger the
1494 // next phase of the test.
1495 chrome::NavigateParams
params(browser(), GURL(content::kAboutBlankURL
),
1496 content::PAGE_TRANSITION_LINK
);
1497 params
.disposition
= NEW_FOREGROUND_TAB
;
1498 ui_test_utils::NavigateToURL(¶ms
);
1500 // Wait until the test acks that it got hidden.
1501 ASSERT_TRUE(observer
.Run()) << handler
.error_message();
1502 EXPECT_STREQ("TestPageHideShow:Hidden", handler
.message().c_str());
1505 // Switch back to the test tab.
1506 browser()->tab_strip_model()->ActivateTabAt(0, true);
1508 ASSERT_TRUE(observer
.Run()) << handler
.error_message();
1509 EXPECT_STREQ("PASS", handler
.message().c_str());
1512 // Tests that if a plugin accepts touch events, the browser knows to send touch
1513 // events to the renderer.
1514 IN_PROC_BROWSER_TEST_F(PPAPITest
, InputEvent_AcceptTouchEvent
) {
1515 std::string positive_tests
[] = { "InputEvent_AcceptTouchEvent_1",
1516 "InputEvent_AcceptTouchEvent_2",
1517 "InputEvent_AcceptTouchEvent_3",
1518 "InputEvent_AcceptTouchEvent_4"
1521 for (size_t i
= 0; i
< arraysize(positive_tests
); ++i
) {
1522 RenderViewHost
* host
= browser()->tab_strip_model()->
1523 GetActiveWebContents()->GetRenderViewHost();
1524 RunTest(positive_tests
[i
]);
1525 EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host
));
1529 IN_PROC_BROWSER_TEST_F(PPAPITest
, View
) {
1530 RunTest(LIST_TEST(View_SizeChange
)
1531 LIST_TEST(View_ClipChange
));
1533 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, View
) {
1534 RunTest(LIST_TEST(View_SizeChange
)
1535 LIST_TEST(View_ClipChange
));
1537 IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest
, View
) {
1538 RunTestViaHTTP(LIST_TEST(View_SizeChange
)
1539 LIST_TEST(View_ClipChange
));
1541 IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest
, MAYBE_GLIBC(View
)) {
1542 RunTestViaHTTP(LIST_TEST(View_SizeChange
)
1543 LIST_TEST(View_ClipChange
));
1545 IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest
, View
) {
1546 RunTestViaHTTP(LIST_TEST(View_SizeChange
)
1547 LIST_TEST(View_ClipChange
));
1550 IN_PROC_BROWSER_TEST_F(PPAPITest
, FlashMessageLoop
) {
1551 RunTest(LIST_TEST(FlashMessageLoop_Basics
)
1552 LIST_TEST(FlashMessageLoop_RunWithoutQuit
));
1554 #if defined(OS_LINUX) // Disabled due to flakiness http://crbug.com/316925
1555 #define MAYBE_FlashMessageLoop DISABLED_FlashMessageLoop
1557 #define MAYBE_FlashMessageLoop FlashMessageLoop
1559 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, MAYBE_FlashMessageLoop
) {
1560 RunTest(LIST_TEST(FlashMessageLoop_Basics
)
1561 LIST_TEST(FlashMessageLoop_RunWithoutQuit
));
1564 TEST_PPAPI_IN_PROCESS(MouseCursor
)
1565 TEST_PPAPI_OUT_OF_PROCESS(MouseCursor
)
1566 TEST_PPAPI_NACL(MouseCursor
)
1568 // PPB_NetworkProxy is not supported in-process.
1569 TEST_PPAPI_OUT_OF_PROCESS(NetworkProxy
)
1570 TEST_PPAPI_NACL(NetworkProxy
)
1572 TEST_PPAPI_OUT_OF_PROCESS(TrueTypeFont
)
1573 TEST_PPAPI_NACL(TrueTypeFont
)
1575 TEST_PPAPI_OUT_OF_PROCESS(VideoDestination
)
1576 TEST_PPAPI_NACL(VideoDestination
)
1578 TEST_PPAPI_OUT_OF_PROCESS(VideoSource
)
1579 TEST_PPAPI_NACL(VideoSource
)
1581 // PPB_Printing only implemented for out of process.
1582 TEST_PPAPI_OUT_OF_PROCESS(Printing
)
1584 // PPB_MessageLoop is only supported out-of-process.
1585 // TODO(dmichael): Enable for NaCl with the IPC proxy. crbug.com/116317
1586 TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Basics
)
1587 // MessageLoop_Post starts a thread so only run it if pepper threads are
1589 #ifdef ENABLE_PEPPER_THREADING
1590 TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Post
)
1593 // Going forward, Flash APIs will only work out-of-process.
1594 TEST_PPAPI_OUT_OF_PROCESS(Flash_GetLocalTimeZoneOffset
)
1595 TEST_PPAPI_OUT_OF_PROCESS(Flash_GetProxyForURL
)
1596 TEST_PPAPI_OUT_OF_PROCESS(Flash_GetSetting
)
1597 TEST_PPAPI_OUT_OF_PROCESS(Flash_SetCrashData
)
1598 // http://crbug.com/176822
1599 #if !defined(OS_WIN)
1600 TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard
)
1602 TEST_PPAPI_OUT_OF_PROCESS(FlashFile
)
1603 // Mac/Aura reach NOTIMPLEMENTED/time out.
1604 // mac: http://crbug.com/96767
1605 // aura: http://crbug.com/104384
1606 #if defined(OS_MACOSX)
1607 #define MAYBE_FlashFullscreen DISABLED_FlashFullscreen
1609 #define MAYBE_FlashFullscreen FlashFullscreen
1611 TEST_PPAPI_OUT_OF_PROCESS(MAYBE_FlashFullscreen
)
1613 TEST_PPAPI_OUT_OF_PROCESS(PDF
)
1615 // TODO(dalecurtis): Renable once the platform verification infobar has been
1616 // implemented; see http://crbug.com/270908
1617 // #if defined(OS_CHROMEOS)
1618 // TEST_PPAPI_OUT_OF_PROCESS(PlatformVerificationPrivate)
1621 IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest
, FlashDRM
) {
1623 #if (defined(OS_WIN) && defined(ENABLE_RLZ)) || defined(OS_CHROMEOS)
1624 // Only implemented on Windows and ChromeOS currently.
1625 LIST_TEST(FlashDRM_GetDeviceID
)
1627 LIST_TEST(FlashDRM_GetHmonitor
)
1628 LIST_TEST(FlashDRM_GetVoucherFile
));
1631 TEST_PPAPI_IN_PROCESS(TalkPrivate
)
1632 TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate
)
1634 #if defined(OS_CHROMEOS)
1635 TEST_PPAPI_OUT_OF_PROCESS(OutputProtectionPrivate
)