ppapi_browsertest.cc revision b2df76ea8fec9e32f6f3718986dba0d95315b29c
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/test/ppapi/ppapi_test.h"
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/test/test_timeouts.h"
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "build/build_config.h"
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/content_settings/host_content_settings_map.h"
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/profiles/profile.h"
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/ui/browser.h"
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/ui/browser_navigator.h"
132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#include "chrome/browser/ui/tabs/tab_strip_model.h"
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/test/base/javascript_test_observer.h"
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/test/base/ui_test_utils.h"
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/browser/web_contents.h"
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/common/url_constants.h"
185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "content/public/test/test_renderer_host.h"
195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)using content::RenderViewHost;
215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This macro finesses macro expansion to do what we want.
235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define STRIP_PREFIXES(test_name) StripPrefixes(#test_name)
242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Turn the given token into a string. This allows us to use precompiler stuff
252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// to turn names into DISABLED_Foo, but still pass a string to RunTest.
262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define STRINGIFY(test_name) #test_name
272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define LIST_TEST(test_name) STRINGIFY(test_name) ","
285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use these macros to run the tests for a specific interface.
305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Most interfaces should be tested with both macros.
315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_IN_PROCESS(test_name) \
325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTest(STRIP_PREFIXES(test_name)); \
345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_OUT_OF_PROCESS(test_name) \
365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTest(STRIP_PREFIXES(test_name)); \
385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Similar macros that test over HTTP.
415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_IN_PROCESS_VIA_HTTP(test_name) \
425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(test_name) \
465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Similar macros that test with an SSL server.
515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(test_name) \
525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \
535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(test_name) \
565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \
575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(DISABLE_NACL)
612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL(test_name)
622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name)
632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name)
642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#elif defined(ARCH_CPU_ARM_FAMILY)
662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaCl glibc tests are not included in ARM as there is no glibc support
672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// on ARM today.
682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL(test_name) \
692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    } \
722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name) \
772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \
782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \
822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    } \
852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NaCl based PPAPI tests
922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL(test_name) \
935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    } \
965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \
975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    } \
992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
1002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
1015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
1025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NaCl based PPAPI tests with disallowed socket API
1042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define TEST_PPAPI_NACL_DISALLOWED_SOCKETS(test_name) \
1055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \
1065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestViaHTTP(STRIP_PREFIXES(test_name)); \
1075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
1085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// NaCl based PPAPI tests with SSL server
1105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \
1115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, test_name) { \
1125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
1135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    } \
1145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, test_name) { \
1155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
1165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    } \
1172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, test_name) { \
1182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \
1195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    }
1205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif
1222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaCl glibc tests are not included in ARM as there is no glibc support
1252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// on ARM today.
1262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(ARCH_CPU_ARM_FAMILY)
1272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define MAYBE_GLIBC(test_name) DISABLED_##test_name
1282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#else
1292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define MAYBE_GLIBC(test_name) test_name
1305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
1315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
1345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Interface tests.
1355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//
1365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disable tests under ASAN.  http://crbug.com/104832.
1385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This is a bit heavy handed, but the majority of these tests fail under ASAN.
1395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// See bug for history.
1405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if !defined(ADDRESS_SANITIZER)
1415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Broker)
1435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Flaky, http://crbug.com/111355
1445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Broker)
1455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Accept) {
1475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Accepting the infobar should grant permission to access the PPAPI broker.
1485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  InfoBarObserver observer;
1495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  observer.ExpectInfoBarAndAccept(true);
1505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // PPB_Broker_Trusted::IsAllowed should return false before the infobar is
1522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // popped and true after the infobar is popped.
1532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionDenied");
1542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_ConnectPermissionGranted");
1552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionGranted");
1565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // It should also set a content settings exception for the site.
1582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  GURL url = GetTestFileUrl("Broker_ConnectPermissionGranted");
1595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  HostContentSettingsMap* content_settings =
1605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      browser()->profile()->GetHostContentSettingsMap();
1615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  EXPECT_EQ(CONTENT_SETTING_ALLOW,
1625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)            content_settings->GetContentSetting(
1635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                url, url, CONTENT_SETTINGS_TYPE_PPAPI_BROKER, std::string()));
1645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
1655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Deny) {
1675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Canceling the infobar should deny permission to access the PPAPI broker.
1685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  InfoBarObserver observer;
1695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  observer.ExpectInfoBarAndAccept(false);
1705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // PPB_Broker_Trusted::IsAllowed should return false before and after the
1722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  // infobar is popped.
1732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionDenied");
1742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_ConnectPermissionDenied");
1752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionDenied");
1765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // It should also set a content settings exception for the site.
1782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  GURL url = GetTestFileUrl("Broker_ConnectPermissionDenied");
1795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  HostContentSettingsMap* content_settings =
1805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      browser()->profile()->GetHostContentSettingsMap();
1815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  EXPECT_EQ(CONTENT_SETTING_BLOCK,
1825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)            content_settings->GetContentSetting(
1835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                url, url, CONTENT_SETTINGS_TYPE_PPAPI_BROKER, std::string()));
1845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
1855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1865821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Blocked) {
1875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Block access to the PPAPI broker.
1885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
1895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_BLOCK);
1905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // We shouldn't see an infobar.
1925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  InfoBarObserver observer;
1935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  RunTest("Broker_ConnectPermissionDenied");
1952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionDenied");
1965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
1975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Allowed) {
1995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Always allow access to the PPAPI broker.
2005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
2015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW);
2025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // We shouldn't see an infobar.
2045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  InfoBarObserver observer;
2055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  RunTest("Broker_ConnectPermissionGranted");
2072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest("Broker_IsAllowedPermissionGranted");
2085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
2095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_IN_PROCESS(Console)
2112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Console)
2122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Console)
2132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Core)
2155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Core)
2162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Core)
2175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_CHROMEOS)
2195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_InputEvent InputEvent
2205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#elif defined(OS_LINUX)
2215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Times out on Linux. http://crbug.com/108859
2225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_InputEvent DISABLED_InputEvent
2235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#elif defined(OS_MACOSX)
2245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Flaky on Mac. http://crbug.com/109258
2255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_InputEvent DISABLED_InputEvent
2265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
2275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_InputEvent InputEvent
2285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
2295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Flaky on Linux and Windows. http://crbug.com/135403
2315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_LINUX) || defined(OS_WIN)
2325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_ImeInputEvent DISABLED_ImeInputEvent
2335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
2345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_ImeInputEvent ImeInputEvent
2355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
2365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(MAYBE_InputEvent)
2385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MAYBE_InputEvent)
2395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(bbudge) Enable when input events are proxied correctly for NaCl.
2402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(DISABLED_InputEvent)
2415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(MAYBE_ImeInputEvent)
2435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MAYBE_ImeInputEvent)
2445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(kinaba) Enable when IME events are proxied correctly for NaCl.
2452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(DISABLED_ImeInputEvent)
2465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Instance_ExecuteScript);
2485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Instance_ExecuteScript)
2495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// ExecuteScript isn't supported by NaCl.
2505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// We run and reload the RecursiveObjects test to ensure that the InstanceObject
2525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// (and others) are properly cleaned up after the first run.
2535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, Instance_RecursiveObjects) {
2545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  RunTestAndReload("Instance_RecursiveObjects");
2555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
2565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(dmichael): Make it work out-of-process (or at least see whether we
2575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//                 care).
2585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest,
2595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                       DISABLED_Instance_RecursiveObjects) {
2605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  RunTestAndReload("Instance_RecursiveObjects");
2615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
2625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Instance_LeakedObjectDestructors);
2635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Instance_LeakedObjectDestructors);
2645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// ScriptableObjects aren't supported in NaCl, so Instance_RecursiveObjects and
2655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Instance_TestLeakedObjectDestructors don't make sense for NaCl.
2665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Graphics2D)
2685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Graphics2D)
2695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Graphics2D_Dev isn't supported in NaCl, only test the other interfaces
2705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(jhorwich) Enable when Graphics2D_Dev interfaces are proxied in NaCl.
2712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_InvalidResource)
2722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_InvalidSize)
2732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Humongous)
2742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_InitToZero)
2752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Describe)
2762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Paint)
2772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Scroll)
2782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Replace)
2792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_Flush)
2802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_FlushOffscreenUpdate)
2812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics2D_BindNull)
2822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
2832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_WIN) && !defined(USE_AURA)
2842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// These tests fail with the test compositor which is what's used by default for
2852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// browser tests on Windows Aura. Renable when the software compositor is
2862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// available.
2875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Graphics3D)
2885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Graphics3D)
2892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Graphics3D)
2902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif
2915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(ImageData)
2935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(ImageData)
2942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(ImageData)
2955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2965821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(BrowserFont)
2975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(BrowserFont)
2985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
2995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Buffer)
3005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Buffer)
3015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(TCPSocketPrivate)
3032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(TCPSocketPrivate)
3042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL_WITH_SSL_SERVER(TCPSocketPrivate)
3055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(TCPSocketPrivateTrusted)
3075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(TCPSocketPrivateTrusted)
3085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// UDPSocketPrivate tests.
3105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// UDPSocketPrivate_Broadcast is disabled for OSX because it requires
3115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// root permissions on OSX 10.7+.
3125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Connect)
3135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_ConnectFailure)
3145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if !defined(OS_MACOSX)
3155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_Broadcast)
3165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // !defined(OS_MACOSX)
3175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivate_SetSocketFeatureErrors)
3182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(UDPSocketPrivate_Connect)
3192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(UDPSocketPrivate_ConnectFailure)
3205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if !defined(OS_MACOSX)
3212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(UDPSocketPrivate_Broadcast)
3225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif  // !defined(OS_MACOSX)
3232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(UDPSocketPrivate_SetSocketFeatureErrors)
3245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL_DISALLOWED_SOCKETS(HostResolverPrivateDisallowed)
3262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL_DISALLOWED_SOCKETS(TCPServerSocketPrivateDisallowed)
3272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL_DISALLOWED_SOCKETS(TCPSocketPrivateDisallowed)
3282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL_DISALLOWED_SOCKETS(UDPSocketPrivateDisallowed)
3295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(TCPServerSocketPrivate)
3315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(TCPServerSocketPrivate)
3322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(TCPServerSocketPrivate)
3335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_Resolve)
3355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_ResolveIPv4)
3362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(HostResolverPrivate_Resolve)
3372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(HostResolverPrivate_ResolveIPv4)
3385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
3395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// URLLoader tests.
3402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, URLLoader) {
3412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
3422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicGET)
3432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicPOST)
3442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFilePOST)
3452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFileRangePOST)
3462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CompoundBodyPOST)
3472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_EmptyDataPOST)
3482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BinaryDataPOST)
3492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CustomRequestHeader)
3502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FailsBogusContentLength)
3512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_StreamToFile)
3522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedSameOriginRestriction)
3532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedSameOriginRestriction)
3542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedCrossOriginRequest)
3552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedCrossOriginRequest)
3562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction)
3572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // TODO(bbudge) Fix Javascript URLs for trusted loaders.
3582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // http://crbug.com/103062
3592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction)
3602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedHttpRequests)
3612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedHttpRequests)
3622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FollowURLRedirect)
3632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AuditURLRedirect)
3642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AbortCalls)
3652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntendedLoad)
3662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_PrefetchBufferThreshold)
3672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
3682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
3692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, URLLoader) {
3702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
3712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicGET)
3722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicPOST)
3732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFilePOST)
3742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFileRangePOST)
3752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CompoundBodyPOST)
3762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_EmptyDataPOST)
3772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BinaryDataPOST)
3782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CustomRequestHeader)
3792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FailsBogusContentLength)
3802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_StreamToFile)
3812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedSameOriginRestriction)
3822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedSameOriginRestriction)
3832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedCrossOriginRequest)
3842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedCrossOriginRequest)
3852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction)
3862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // TODO(bbudge) Fix Javascript URLs for trusted loaders.
3872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // http://crbug.com/103062
3882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction)
3892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedHttpRequests)
3902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_TrustedHttpRequests)
3912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FollowURLRedirect)
3922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AuditURLRedirect)
3932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AbortCalls)
3942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntendedLoad)
3952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_PrefetchBufferThreshold)
3962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
3972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
3982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, URLLoader) {
3992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
4002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicGET)
4012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicPOST)
4022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFilePOST)
4032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFileRangePOST)
4042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CompoundBodyPOST)
4052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_EmptyDataPOST)
4062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BinaryDataPOST)
4072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CustomRequestHeader)
4082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FailsBogusContentLength)
4092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_StreamToFile)
4102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedSameOriginRestriction)
4112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // We don't support Trusted APIs in NaCl.
4122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction)
4132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedCrossOriginRequest)
4142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest)
4152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction)
4162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // TODO(bbudge) Fix Javascript URLs for trusted loaders.
4172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // http://crbug.com/103062
4182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction)
4192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedHttpRequests)
4202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests)
4212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FollowURLRedirect)
4222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AuditURLRedirect)
4232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AbortCalls)
4242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntendedLoad)
4252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_PrefetchBufferThreshold)
4262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
4272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
428c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(URLLoader)) {
4292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
4302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicGET)
4312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicPOST)
4322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFilePOST)
4332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFileRangePOST)
4342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CompoundBodyPOST)
4352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_EmptyDataPOST)
4362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BinaryDataPOST)
4372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CustomRequestHeader)
4382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FailsBogusContentLength)
4392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_StreamToFile)
4402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedSameOriginRestriction)
4412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // We don't support Trusted APIs in NaCl.
4422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction)
4432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedCrossOriginRequest)
4442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest)
4452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction)
4462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // TODO(bbudge) Fix Javascript URLs for trusted loaders.
4472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // http://crbug.com/103062
4482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction)
4492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedHttpRequests)
4502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests)
4512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FollowURLRedirect)
4522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AuditURLRedirect)
4532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AbortCalls)
4542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntendedLoad)
4552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_PrefetchBufferThreshold)
4562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
4572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
4582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, URLLoader) {
4592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
4602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicGET)
4612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicPOST)
4622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFilePOST)
4632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BasicFileRangePOST)
4642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CompoundBodyPOST)
4652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_EmptyDataPOST)
4662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_BinaryDataPOST)
4672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_CustomRequestHeader)
4682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FailsBogusContentLength)
4692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_StreamToFile)
4702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedSameOriginRestriction)
4712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // We don't support Trusted APIs in NaCl.
4722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedSameOriginRestriction)
4732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedCrossOriginRequest)
4742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedCrossOriginRequest)
4752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedJavascriptURLRestriction)
4762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // TODO(bbudge) Fix Javascript URLs for trusted loaders.
4772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // http://crbug.com/103062
4782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedJavascriptURLRestriction)
4792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntrustedHttpRequests)
4802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_URLLoader_TrustedHttpRequests)
4812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_FollowURLRedirect)
4822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AuditURLRedirect)
4832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_AbortCalls)
4842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_UntendedLoad)
4852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(URLLoader_PrefetchBufferThreshold)
4862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
4872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
4885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// URLRequestInfo tests.
4905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo)
4915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo)
4925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
4935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Timing out on Windows. http://crbug.com/129571
4945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_WIN)
4955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_URLRequest_CreateAndIsURLRequestInfo \
4962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  DISABLED_URLRequest_CreateAndIsURLRequestInfo
4975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
4985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_URLRequest_CreateAndIsURLRequestInfo \
4995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    URLRequest_CreateAndIsURLRequestInfo
5005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
5012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(MAYBE_URLRequest_CreateAndIsURLRequestInfo)
5025821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5035821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_SetProperty)
5045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_SetProperty)
5052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// http://crbug.com/167150
5062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(DISABLED_URLRequest_SetProperty)
5075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody)
5085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody)
5092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(URLRequest_AppendDataToBody)
5105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress)
5115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress)
5122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(URLRequest_Stress)
5135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(PaintAggregator)
5155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator)
5162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(PaintAggregator)
5175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(danakj): http://crbug.com/115286
5195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(DISABLED_Scrollbar)
5205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// http://crbug.com/89961
5215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, DISABLED_Scrollbar) {
5225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  RunTest("Scrollbar");
5235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
5245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(danakj): http://crbug.com/115286
5252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(DISABLED_Scrollbar)
5265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(URLUtil)
5285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(URLUtil)
5295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(CharSet)
5315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(CharSet)
5325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Crypto)
5345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Crypto)
5355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Var)
5375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Var)
5382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Var)
5395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Flaky on mac, http://crbug.com/121107
5415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_MACOSX)
5425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_VarDeprecated DISABLED_VarDeprecated
5435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
5445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_VarDeprecated VarDeprecated
5455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
5465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(VarDeprecated)
5485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MAYBE_VarDeprecated)
5495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
5505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Windows defines 'PostMessage', so we have to undef it.
5515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef PostMessage
5525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#undef PostMessage
5535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
5542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// PostMessage tests.
5552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, PostMessage) {
5562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
5572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendInInit)
5582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingData)
5592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingArrayBuffer)
5602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_MessageEvent)
5612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NoHandler)
5622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_ExtraParam)
5632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
5642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
5652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, PostMessage) {
5662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
5672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendInInit)
5682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingData)
5692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingArrayBuffer)
5702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_MessageEvent)
5712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NoHandler)
5722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_ExtraParam)
5732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NonMainThread)
5742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
5752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
5762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, PostMessage) {
5772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
5782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendInInit)
5792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingData)
5802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingArrayBuffer)
5812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_MessageEvent)
5822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NoHandler)
5832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_ExtraParam)
5842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NonMainThread)
5852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
5862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
5872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(PostMessage)) {
5882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
5892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendInInit)
5902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingData)
5912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingArrayBuffer)
5922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_MessageEvent)
5932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NoHandler)
5942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_ExtraParam)
5952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NonMainThread)
5962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
5972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
5982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, PostMessage) {
5992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendInInit)
6012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingData)
6022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_SendingArrayBuffer)
6032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_MessageEvent)
6042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NoHandler)
6052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_ExtraParam)
6062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(PostMessage_NonMainThread)
6072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6095821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
6105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(Memory)
6115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Memory)
6122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(Memory)
6135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
6145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(VideoDecoder)
6155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder)
6165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
6172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// FileIO tests.
6182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, FileIO) {
6192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_Open)
6212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_OpenDirectory)
6222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_AbortCalls)
6232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelReads)
6242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelWrites)
6252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_NotAllowMixedReadWrite)
6262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadWriteSetLength)
6272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadToArrayWriteSetLength)
6282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_TouchQuery)
6292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_WillWriteWillSetLength)
630c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      LIST_TEST(FileIO_RequestOSFileHandle)
6312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, FileIO) {
6342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_Open)
6362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_AbortCalls)
6372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelReads)
6382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelWrites)
6392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_NotAllowMixedReadWrite)
6402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadWriteSetLength)
6412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadToArrayWriteSetLength)
6422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_TouchQuery)
6432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_WillWriteWillSetLength)
644c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      LIST_TEST(FileIO_RequestOSFileHandle)
6452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, FileIO) {
6482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_Open)
6502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_AbortCalls)
6512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelReads)
6522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelWrites)
6532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_NotAllowMixedReadWrite)
6542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadWriteSetLength)
6552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadToArrayWriteSetLength)
6562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_TouchQuery)
6572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // The following test requires PPB_FileIO_Trusted, not available in NaCl.
6582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_FileIO_WillWriteWillSetLength)
659c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      LIST_TEST(FileIO_RequestOSFileHandle)
6602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(FileIO)) {
6632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_Open)
6652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_AbortCalls)
6662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelReads)
6672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelWrites)
6682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_NotAllowMixedReadWrite)
6692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadWriteSetLength)
6702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadToArrayWriteSetLength)
6712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_TouchQuery)
6722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // The following test requires PPB_FileIO_Trusted, not available in NaCl.
6732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_FileIO_WillWriteWillSetLength)
674c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      LIST_TEST(FileIO_RequestOSFileHandle)
6752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, FileIO) {
6782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
6792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_Open)
6802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_AbortCalls)
6812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelReads)
6822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ParallelWrites)
6832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_NotAllowMixedReadWrite)
6842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadWriteSetLength)
6852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_ReadToArrayWriteSetLength)
6862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(FileIO_TouchQuery)
6872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      // The following test requires PPB_FileIO_Trusted, not available in NaCl.
6882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(DISABLED_FileIO_WillWriteWillSetLength)
689c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)      LIST_TEST(FileIO_RequestOSFileHandle)
6902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
6912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
6925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
6935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileRef)
6945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileRef)
695b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, FileRef) {
696b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  RunTestViaHTTP(
697b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Create)
698b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetFileSystemType)
699b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetName)
700b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetPath)
701b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetParent)
702b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_MakeDirectory)
703b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_QueryAndTouchFile)
704b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_DeleteFileAndDirectory)
705b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_RenameFileAndDirectory)
706b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Query)
707b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_FileNameEscaping)
708b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries)
709b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  );
710b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)}
711b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, FileRef) {
712b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  RunTestViaHTTP(
713b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Create)
714b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetFileSystemType)
715b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetName)
716b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetPath)
717b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetParent)
718b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_MakeDirectory)
719b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_QueryAndTouchFile)
720b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_DeleteFileAndDirectory)
721b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_RenameFileAndDirectory)
722b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Query)
723b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_FileNameEscaping)
724b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries)
725b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  );
726b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)}
727b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, FileRef) {
728b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  RunTestViaHTTP(
729b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Create)
730b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetFileSystemType)
731b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetName)
732b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetPath)
733b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_GetParent)
734b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_MakeDirectory)
735b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_QueryAndTouchFile)
736b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_DeleteFileAndDirectory)
737b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_RenameFileAndDirectory)
738b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_Query)
739b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(FileRef_FileNameEscaping)
740b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)      LIST_TEST(DISABLED_FileRef_ReadDirectoryEntries)
741b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  );
742b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)}
7435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileSystem)
7455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileSystem)
7465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// PPAPINaClTest.FileSystem times out consistently on Windows and Mac.
7485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// http://crbug.com/130372
7495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_MACOSX) || defined(OS_WIN)
7505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_FileSystem DISABLED_FileSystem
7515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
7525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_FileSystem FileSystem
7535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
7545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(MAYBE_FileSystem)
7565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#if defined(OS_MACOSX)
7585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// http://crbug.com/103912
7595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_Fullscreen DISABLED_Fullscreen
7605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#elif defined(OS_LINUX)
7615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// http://crbug.com/146008
7625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_Fullscreen DISABLED_Fullscreen
7635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#else
7645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define MAYBE_Fullscreen Fullscreen
7655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
7665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_Fullscreen)
7685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_Fullscreen)
7692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(MAYBE_Fullscreen)
7705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(X509CertificatePrivate)
7725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(X509CertificatePrivate)
7735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// There is no proxy. This is used for PDF metrics reporting, and PDF only
7755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// runs in process, so there's currently no need for a proxy.
7765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(UMA)
7775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
7782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NetAddress tests
7792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, NetAddress) {
7802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
7812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_AreEqual)
7822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_AreHostsEqual)
7832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_Describe)
7842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_ReplacePort)
7852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetAnyAddress)
7862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_DescribeIPv6)
7872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetFamily)
7882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetPort)
7892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetAddress)
7902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetScopeID)
7912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
7922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
7932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, NetAddress) {
7942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
7952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_AreEqual)
7962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_AreHostsEqual)
7972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_Describe)
7982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_ReplacePort)
7992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetAnyAddress)
8002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_DescribeIPv6)
8012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetFamily)
8022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetPort)
8032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetAddress)
8042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivate_GetScopeID)
8052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, NetAddress) {
8082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreEqual)
8102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual)
8112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_Describe)
8122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_ReplacePort)
8132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress)
8142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetFamily)
8152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetPort)
8162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAddress)
8172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(NetAddress)) {
8202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreEqual)
8222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual)
8232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_Describe)
8242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_ReplacePort)
8252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress)
8262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetFamily)
8272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetPort)
8282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAddress)
8292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, NetAddress) {
8322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreEqual)
8342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_AreHostsEqual)
8352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_Describe)
8362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_ReplacePort)
8372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAnyAddress)
8382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetFamily)
8392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetPort)
8402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetAddressPrivateUntrusted_GetAddress)
8412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
8442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NetworkMonitor tests.
8452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, NetworkMonitor) {
8462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_Basic)
8482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_2Monitors)
8492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_DeleteInCallback)
8502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_ListObserver)
8512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, NetworkMonitor) {
8542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_Basic)
8562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_2Monitors)
8572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_DeleteInCallback)
8582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_ListObserver)
8592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, NetworkMonitor) {
8622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_Basic)
8642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_2Monitors)
8652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_DeleteInCallback)
8662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_ListObserver)
8672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(NetworkMonitor)) {
8702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_Basic)
8722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_2Monitors)
8732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_DeleteInCallback)
8742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_ListObserver)
8752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, NetworkMonitor) {
8782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_Basic)
8802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_2Monitors)
8812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_DeleteInCallback)
8822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(NetworkMonitorPrivate_ListObserver)
8832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
8862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Flash tests.
8872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, Flash) {
8882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(Flash_SetInstanceAlwaysOnTop)
8902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(Flash_GetCommandLineArgs)
8912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, Flash) {
8942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
8952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(Flash_SetInstanceAlwaysOnTop)
8962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(Flash_GetCommandLineArgs)
8972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  );
8982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
8992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
9002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// In-process WebSocket tests
9012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, WebSocket) {
9022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestWithWebSocketServer(
9032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_IsWebSocket)
9042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UninitializedPropertiesAccess)
9052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidConnect)
9062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_Protocols)
9072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetURL)
9082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidConnect)
9092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidClose)
9102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidClose)
9112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetProtocol)
9122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_TextSendReceive)
9132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BinarySendReceive)
9142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_StressedSendReceive)
9152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BufferedAmount)
9162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCallsWithCallback)
9172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortSendMessageCall)
9182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCloseCall)
9192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortReceiveMessageCall)
9202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_CcInterfaces)
9212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidConnect)
9222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityProtocols)
9232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetURL)
9242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidConnect)
9252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidClose)
9262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidClose)
9272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetProtocol)
9282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityTextSendReceive)
9292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBinarySendReceive)
9302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBufferedAmount));
9312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
9322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
9332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Out-of-process WebSocket tests
9342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, WebSocket) {
9352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestWithWebSocketServer(
9362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_IsWebSocket)
9372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UninitializedPropertiesAccess)
9382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidConnect)
9392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_Protocols)
9402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetURL)
9412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidConnect)
9422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidClose)
9432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidClose)
9442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetProtocol)
9452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_TextSendReceive)
9462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BinarySendReceive)
9472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_StressedSendReceive)
9482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BufferedAmount)
9492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCallsWithCallback)
9502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortSendMessageCall)
9512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCloseCall)
9522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortReceiveMessageCall)
9532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_CcInterfaces)
9542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidConnect)
9552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityProtocols)
9562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetURL)
9572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidConnect)
9582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidClose)
9592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidClose)
9602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetProtocol)
9612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityTextSendReceive)
9622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBinarySendReceive)
9632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBufferedAmount));
9642a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
9652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
9662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaClNewlib WebSocket tests
9672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, WebSocket) {
9682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestWithWebSocketServer(
9692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_IsWebSocket)
9702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UninitializedPropertiesAccess)
9712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidConnect)
9722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_Protocols)
9732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetURL)
9742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidConnect)
9752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidClose)
9762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidClose)
9772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetProtocol)
9782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_TextSendReceive)
9792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BinarySendReceive)
9802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_StressedSendReceive)
9812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BufferedAmount)
9822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCallsWithCallback)
9832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortSendMessageCall)
9842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCloseCall)
9852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortReceiveMessageCall)
9862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_CcInterfaces)
9872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidConnect)
9882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityProtocols)
9892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetURL)
9902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidConnect)
9912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidClose)
9922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidClose)
9932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetProtocol)
9942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityTextSendReceive)
9952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBinarySendReceive)
9962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBufferedAmount));
9972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
9982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
9992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaClGLibc WebSocket tests
10002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(WebSocket)) {
10012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestWithWebSocketServer(
10022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_IsWebSocket)
10032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UninitializedPropertiesAccess)
10042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidConnect)
10052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_Protocols)
10062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetURL)
10072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidConnect)
10082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidClose)
10092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidClose)
10102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetProtocol)
10112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_TextSendReceive)
10122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BinarySendReceive)
10132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_StressedSendReceive)
10142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BufferedAmount)
10152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCallsWithCallback)
10162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortSendMessageCall)
10172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCloseCall)
10182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortReceiveMessageCall)
10192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_CcInterfaces)
10202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidConnect)
10212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityProtocols)
10222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetURL)
10232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidConnect)
10242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidClose)
10252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidClose)
10262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetProtocol)
10272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityTextSendReceive)
10282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBinarySendReceive)
10292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBufferedAmount));
10302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// PNaCl WebSocket tests
10332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, WebSocket) {
10342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestWithWebSocketServer(
10352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_IsWebSocket)
10362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UninitializedPropertiesAccess)
10372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidConnect)
10382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_Protocols)
10392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetURL)
10402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidConnect)
10412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_InvalidClose)
10422a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_ValidClose)
10432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_GetProtocol)
10442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_TextSendReceive)
10452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BinarySendReceive)
10462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_StressedSendReceive)
10472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_BufferedAmount)
10482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCallsWithCallback)
10492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortSendMessageCall)
10502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortCloseCall)
10512a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_AbortReceiveMessageCall)
10522a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_CcInterfaces)
10532a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidConnect)
10542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityProtocols)
10552a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetURL)
10562a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidConnect)
10572a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityInvalidClose)
10582a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityValidClose)
10592a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityGetProtocol)
10602a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityTextSendReceive)
10612a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBinarySendReceive)
10622a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(WebSocket_UtilityBufferedAmount));
10632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
10652a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10662a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// In-process AudioConfig tests
10672a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, AudioConfig) {
10682a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(
10692a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_RecommendSampleRate)
10702a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_ValidConfigs)
10712a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_InvalidConfigs));
10722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Out-of-process AudioConfig tests
10752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, AudioConfig) {
10762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(
10772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_RecommendSampleRate)
10782a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_ValidConfigs)
10792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_InvalidConfigs));
10802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaClNewlib AudioConfig tests
10832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, AudioConfig) {
10842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
10852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_RecommendSampleRate)
10862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_ValidConfigs)
10872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_InvalidConfigs));
10882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// NaClGLibc AudioConfig tests
10912a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(AudioConfig)) {
10922a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
10932a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_RecommendSampleRate)
10942a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_ValidConfigs)
10952a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_InvalidConfigs));
10962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
10972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
10982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// PNaCl AudioConfig tests
10992a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, AudioConfig) {
11002a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(
11012a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_RecommendSampleRate)
11022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_ValidConfigs)
11032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      LIST_TEST(AudioConfig_InvalidConfigs));
11042a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11052a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
11062a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
11072a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, Audio) {
11082a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(Audio_Creation)
11092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_DestroyNoStop)
11102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_Failures)
11112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_AudioCallback1)
11122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_AudioCallback2));
11132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, Audio) {
11152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(Audio_Creation)
11162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_DestroyNoStop)
11172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_Failures)
11182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_AudioCallback1)
11192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(Audio_AudioCallback2));
11202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11212a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, Audio) {
11222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(Audio_Creation)
11232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_DestroyNoStop)
11242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_Failures)
11252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback1)
11262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback2));
11272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(Audio)) {
11292a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(Audio_Creation)
11302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_DestroyNoStop)
11312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_Failures)
11322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback1)
11332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback2));
11342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, Audio) {
11362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(Audio_Creation)
11372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_DestroyNoStop)
11382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_Failures)
11392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback1)
11402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(Audio_AudioCallback2));
11412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
11425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(View_CreatedVisible);
11445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(View_CreatedVisible);
11452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(View_CreatedVisible);
11465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This test ensures that plugins created in a background tab have their
11475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// initial visibility set to false. We don't bother testing in-process for this
11485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// custom test since the out of process code also exercises in-process.
11495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) {
11515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Make a second tab in the foreground.
11525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  GURL url = GetTestFileUrl("View_CreatedInvisible");
11535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK);
11545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  params.disposition = NEW_BACKGROUND_TAB;
11555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ui_test_utils::NavigateToURL(&params);
11565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
11575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This test messes with tab visibility so is custom.
11595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_PageHideShow) {
11605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // The plugin will be loaded in the foreground tab and will send us a message.
11615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  PPAPITestMessageHandler handler;
11625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  JavascriptTestObserver observer(
11632a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)      browser()->tab_strip_model()->GetActiveWebContents()->GetRenderViewHost(),
11645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)      &handler);
11655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  GURL url = GetTestFileUrl("View_PageHideShow");
11675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ui_test_utils::NavigateToURL(browser(), url);
11685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ASSERT_TRUE(observer.Run()) << handler.error_message();
11705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  EXPECT_STREQ("TestPageHideShow:Created", handler.message().c_str());
11715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  observer.Reset();
11725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Make a new tab to cause the original one to hide, this should trigger the
11745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // next phase of the test.
11755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  chrome::NavigateParams params(browser(), GURL(chrome::kAboutBlankURL),
11765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                content::PAGE_TRANSITION_LINK);
11775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  params.disposition = NEW_FOREGROUND_TAB;
11785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ui_test_utils::NavigateToURL(&params);
11795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Wait until the test acks that it got hidden.
11815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ASSERT_TRUE(observer.Run()) << handler.error_message();
11825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  EXPECT_STREQ("TestPageHideShow:Hidden", handler.message().c_str());
11835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  observer.Reset();
11845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  // Switch back to the test tab.
11862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  browser()->tab_strip_model()->ActivateTabAt(0, true);
11875821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11885821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  ASSERT_TRUE(observer.Run()) << handler.error_message();
11895821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  EXPECT_STREQ("PASS", handler.message().c_str());
11905821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
11915821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
11925821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Tests that if a plugin accepts touch events, the browser knows to send touch
11935821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// events to the renderer.
11945821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, InputEvent_AcceptTouchEvent) {
11955821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  std::string positive_tests[] = { "InputEvent_AcceptTouchEvent_1",
11962a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                                   "InputEvent_AcceptTouchEvent_2",
11975821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                   "InputEvent_AcceptTouchEvent_3",
11985821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                   "InputEvent_AcceptTouchEvent_4"
11995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                                 };
12005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12015821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  for (size_t i = 0; i < arraysize(positive_tests); ++i) {
12022a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)    RenderViewHost* host = browser()->tab_strip_model()->
12032a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)        GetActiveWebContents()->GetRenderViewHost();
12045821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    RunTest(positive_tests[i]);
12055821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)    EXPECT_TRUE(content::RenderViewHostTester::HasTouchEventHandler(host));
12065821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  }
12075821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
12085821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12092a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, View) {
12102a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(View_SizeChange)
12112a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(View_ClipChange));
12122a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12132a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View) {
12142a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(View_SizeChange)
12152a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(View_ClipChange));
12162a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12172a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClNewlibTest, View) {
12182a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(View_SizeChange)
12192a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(View_ClipChange));
12202a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
1221c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClGLibcTest, MAYBE_GLIBC(View)) {
12222a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(View_SizeChange)
12232a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(View_ClipChange));
12242a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12252a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPINaClPNaClTest, View) {
12262a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTestViaHTTP(LIST_TEST(View_SizeChange)
12272a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)                 LIST_TEST(View_ClipChange));
12282a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12302a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, ResourceArray) {
12312a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(ResourceArray_Basics)
12322a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_OutOfRangeAccess)
12332a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_EmptyArray)
12342a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_InvalidElement));
12352a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12362a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, ResourceArray) {
12372a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(ResourceArray_Basics)
12382a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_OutOfRangeAccess)
12392a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_EmptyArray)
12402a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(ResourceArray_InvalidElement));
12412a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12432a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(PPAPITest, FlashMessageLoop) {
12442a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(FlashMessageLoop_Basics)
12452a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(FlashMessageLoop_RunWithoutQuit));
12462a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12472a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, FlashMessageLoop) {
12482a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)  RunTest(LIST_TEST(FlashMessageLoop_Basics)
12492a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)          LIST_TEST(FlashMessageLoop_RunWithoutQuit));
12502a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)}
12515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_IN_PROCESS(MouseCursor)
12535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MouseCursor)
12542a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_NACL(MouseCursor)
12555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
1256c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(TrueTypeFont)
1257c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)TEST_PPAPI_NACL(TrueTypeFont)
1258c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
12595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// PPB_Printing only implemented for out of process.
12605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Printing)
12615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// PPB_MessageLoop is only supported out-of-process.
12635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(dmichael): Enable for NaCl with the IPC proxy. crbug.com/116317
12645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Basics)
12655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// MessageLoop_Post starts a thread so only run it if pepper threads are
12665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// enabled.
12675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifdef ENABLE_PEPPER_THREADING
12685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MessageLoop_Post)
12695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif
12705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
12715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Going forward, Flash APIs will only work out-of-process.
12722a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Flash_GetLocalTimeZoneOffset)
12732a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Flash_GetProxyForURL)
12742a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Flash_GetSetting)
12752a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(Flash_SetCrashData)
12762a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// http://crbug.com/176822
12772a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if !defined(OS_WIN)
12785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard)
12792a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif
12802a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(FlashFile)
12812a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// Mac/Aura reach NOTIMPLEMENTED/time out.
12822a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// mac: http://crbug.com/96767
12832a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)// aura: http://crbug.com/104384
12842a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#if defined(OS_MACOSX)
12852a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define MAYBE_FlashFullscreen DISABLED_FlashFullscreen
12862a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#else
12872a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#define MAYBE_FlashFullscreen FlashFullscreen
12882a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)#endif
12892a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(MAYBE_FlashFullscreen)
12902a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)
1291c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(PDF)
1292c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)// Only implemented on Windows and ChromeOS currently.
1293c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#if (defined(OS_WIN) && defined(ENABLE_RLZ)) || defined(OS_CHROMEOS)
1294c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(FlashDeviceID)
1295c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)#endif
1296c2e0dbddbe15c98d52c4786dac06cb8952a8ae6dTorne (Richard Coles)
12972a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_IN_PROCESS(TalkPrivate)
12982a99a7e74a7f215066514fe81d2bfa6639d9edddTorne (Richard Coles)TEST_PPAPI_OUT_OF_PROCESS(TalkPrivate)
12995821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
13005821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // ADDRESS_SANITIZER
1301