[email protected] | 50a7f3a | 2012-01-05 14:30:50 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "base/file_util.h" |
| 6 | #include "base/path_service.h" |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 7 | #include "base/test/test_timeouts.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 8 | #include "build/build_config.h" |
[email protected] | c08950d2 | 2011-10-13 22:20:29 | [diff] [blame] | 9 | #include "content/public/common/content_switches.h" |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 10 | #include "content/common/pepper_plugin_registry.h" |
| 11 | #include "chrome/common/chrome_paths.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 12 | #include "chrome/common/chrome_switches.h" |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 13 | #include "chrome/test/automation/browser_proxy.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 14 | #include "chrome/test/automation/tab_proxy.h" |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 15 | #include "chrome/test/base/ui_test_utils.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 16 | #include "chrome/test/ui/ui_test.h" |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 17 | #include "content/public/common/url_constants.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 18 | #include "net/base/net_util.h" |
[email protected] | 3985ba8 | 2010-07-29 21:44:12 | [diff] [blame] | 19 | #include "net/test/test_server.h" |
[email protected] | 0bd75368 | 2010-12-16 18:15:52 | [diff] [blame] | 20 | #include "webkit/plugins/plugin_switches.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 21 | |
| 22 | namespace { |
| 23 | |
[email protected] | df4bdd0 | 2010-06-10 17:56:53 | [diff] [blame] | 24 | // Platform-specific filename relative to the chrome executable. |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 25 | #if defined(OS_WIN) |
| 26 | const wchar_t library_name[] = L"ppapi_tests.dll"; |
| 27 | #elif defined(OS_MACOSX) |
| 28 | const char library_name[] = "ppapi_tests.plugin"; |
| 29 | #elif defined(OS_POSIX) |
[email protected] | df4bdd0 | 2010-06-10 17:56:53 | [diff] [blame] | 30 | const char library_name[] = "libppapi_tests.so"; |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 31 | #endif |
| 32 | |
| 33 | } // namespace |
| 34 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 35 | class PPAPITestBase : public UITest { |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 36 | public: |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 37 | PPAPITestBase() { |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 38 | // The test sends us the result via a cookie. |
| 39 | launch_arguments_.AppendSwitch(switches::kEnableFileCookies); |
[email protected] | 6a2c9cb | 2010-06-11 20:47:50 | [diff] [blame] | 40 | |
| 41 | // Some stuff is hung off of the testing interface which is not enabled |
| 42 | // by default. |
| 43 | launch_arguments_.AppendSwitch(switches::kEnablePepperTesting); |
[email protected] | eff5e888 | 2010-10-20 00:24:46 | [diff] [blame] | 44 | |
[email protected] | 678e68a | 2011-09-01 15:23:56 | [diff] [blame] | 45 | // Smooth scrolling confuses the scrollbar test. |
| 46 | launch_arguments_.AppendSwitch(switches::kDisableSmoothScrolling); |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 47 | } |
| 48 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 49 | virtual std::string BuildQuery(const std::string& base, |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 50 | const std::string& test_case) = 0; |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 51 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 52 | // Returns the URL to load for file: tests. |
| 53 | GURL GetTestFileUrl(const std::string& test_case) { |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 54 | FilePath test_path; |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 55 | EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path)); |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 56 | test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); |
| 57 | test_path = test_path.Append(FILE_PATH_LITERAL("tests")); |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 58 | test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 59 | |
| 60 | // Sanity check the file name. |
| 61 | EXPECT_TRUE(file_util::PathExists(test_path)); |
| 62 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 63 | GURL test_url = net::FilePathToFileURL(test_path); |
| 64 | |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 65 | GURL::Replacements replacements; |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 66 | std::string query = BuildQuery("", test_case); |
[email protected] | ebc5c8be | 2011-05-20 22:52:59 | [diff] [blame] | 67 | replacements.SetQuery(query.c_str(), url_parse::Component(0, query.size())); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 68 | return test_url.ReplaceComponents(replacements); |
| 69 | } |
| 70 | |
| 71 | void RunTest(const std::string& test_case) { |
| 72 | scoped_refptr<TabProxy> tab = GetActiveTab(); |
| 73 | EXPECT_TRUE(tab.get()); |
| 74 | if (!tab.get()) |
| 75 | return; |
| 76 | GURL url = GetTestFileUrl(test_case); |
| 77 | EXPECT_TRUE(tab->NavigateToURLBlockUntilNavigationsComplete(url, 1)); |
| 78 | RunTestURL(tab, url); |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | void RunTestViaHTTP(const std::string& test_case) { |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 82 | // For HTTP tests, we use the output DIR to grab the generated files such |
| 83 | // as the NEXEs. |
| 84 | FilePath exe_dir = CommandLine::ForCurrentProcess()->GetProgram().DirName(); |
| 85 | FilePath src_dir; |
| 86 | ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)); |
| 87 | |
| 88 | // TestServer expects a path relative to source. So we must first |
| 89 | // generate absolute paths to SRC and EXE and from there generate |
| 90 | // a relative path. |
| 91 | if (!exe_dir.IsAbsolute()) file_util::AbsolutePath(&exe_dir); |
| 92 | if (!src_dir.IsAbsolute()) file_util::AbsolutePath(&src_dir); |
| 93 | ASSERT_TRUE(exe_dir.IsAbsolute()); |
| 94 | ASSERT_TRUE(src_dir.IsAbsolute()); |
| 95 | |
| 96 | size_t match, exe_size, src_size; |
| 97 | std::vector<FilePath::StringType> src_parts, exe_parts; |
| 98 | |
| 99 | // Determine point at which src and exe diverge, and create a relative path. |
| 100 | exe_dir.GetComponents(&exe_parts); |
| 101 | src_dir.GetComponents(&src_parts); |
| 102 | exe_size = exe_parts.size(); |
| 103 | src_size = src_parts.size(); |
| 104 | for (match = 0; match < exe_size && match < src_size; ++match) { |
| 105 | if (exe_parts[match] != src_parts[match]) |
| 106 | break; |
| 107 | } |
| 108 | FilePath web_dir; |
| 109 | for (size_t tmp_itr = match; tmp_itr < src_size; ++tmp_itr) { |
| 110 | web_dir = web_dir.Append(FILE_PATH_LITERAL("..")); |
| 111 | } |
| 112 | for (; match < exe_size; ++match) { |
| 113 | web_dir = web_dir.Append(exe_parts[match]); |
| 114 | } |
| 115 | |
| 116 | net::TestServer test_server(net::TestServer::TYPE_HTTP, web_dir); |
[email protected] | 95409e1 | 2010-08-17 20:07:11 | [diff] [blame] | 117 | ASSERT_TRUE(test_server.Start()); |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 118 | std::string query = BuildQuery("files/test_case.html?", test_case); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 119 | |
| 120 | scoped_refptr<TabProxy> tab = GetActiveTab(); |
| 121 | GURL url = test_server.GetURL(query); |
| 122 | EXPECT_TRUE(tab->NavigateToURLBlockUntilNavigationsComplete(url, 1)); |
| 123 | RunTestURL(tab, url); |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 124 | } |
| 125 | |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 126 | void RunTestWithWebSocketServer(const std::string& test_case) { |
| 127 | FilePath websocket_root_dir; |
| 128 | ASSERT_TRUE( |
| 129 | PathService::Get(chrome::DIR_LAYOUT_TESTS, &websocket_root_dir)); |
| 130 | |
| 131 | ui_test_utils::TestWebSocketServer server; |
| 132 | ASSERT_TRUE(server.Start(websocket_root_dir)); |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 133 | RunTestViaHTTP(test_case); |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 134 | } |
| 135 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 136 | std::string StripPrefixes(const std::string& test_name) { |
| 137 | const char* const prefixes[] = { "FAILS_", "FLAKY_", "DISABLED_" }; |
| 138 | for (size_t i = 0; i < sizeof(prefixes)/sizeof(prefixes[0]); ++i) |
| 139 | if (test_name.find(prefixes[i]) == 0) |
| 140 | return test_name.substr(strlen(prefixes[i])); |
| 141 | return test_name; |
| 142 | } |
| 143 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 144 | protected: |
| 145 | // Runs the test for a tab given the tab that's already navigated to the |
| 146 | // given URL. |
| 147 | void RunTestURL(scoped_refptr<TabProxy> tab, const GURL& test_url) { |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 148 | ASSERT_TRUE(tab.get()); |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 149 | |
[email protected] | 451b182 | 2011-12-21 13:00:48 | [diff] [blame] | 150 | // The large timeout was causing the cycle time for the whole test suite |
| 151 | // to be too long when a tiny bug caused all tests to timeout. |
| 152 | // http://crbug.com/108264 |
| 153 | int timeout_ms = 90000; |
| 154 | //int timeout_ms = TestTimeouts::large_test_timeout_ms()); |
| 155 | |
[email protected] | b46661f | 2011-08-25 01:42:53 | [diff] [blame] | 156 | // See comment above TestingInstance in ppapi/test/testing_instance.h. |
| 157 | // Basically it sets a series of numbered cookies. The value of "..." means |
| 158 | // it's still working and we should continue to wait, any other value |
| 159 | // indicates completion (in this case it will start with "PASS" or "FAIL"). |
| 160 | // This keeps us from timing out on cookie waits for long tests. |
| 161 | int progress_number = 0; |
| 162 | std::string progress; |
| 163 | while (true) { |
| 164 | std::string cookie_name = StringPrintf("PPAPI_PROGRESS_%d", |
| 165 | progress_number); |
| 166 | progress = WaitUntilCookieNonEmpty(tab.get(), test_url, |
[email protected] | 451b182 | 2011-12-21 13:00:48 | [diff] [blame] | 167 | cookie_name.c_str(), timeout_ms); |
[email protected] | b46661f | 2011-08-25 01:42:53 | [diff] [blame] | 168 | if (progress != "...") |
| 169 | break; |
| 170 | progress_number++; |
| 171 | } |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 172 | |
[email protected] | b46661f | 2011-08-25 01:42:53 | [diff] [blame] | 173 | if (progress_number == 0) { |
| 174 | // Failing the first time probably means the plugin wasn't loaded. |
| 175 | ASSERT_FALSE(progress.empty()) |
| 176 | << "Plugin couldn't be loaded. Make sure the PPAPI test plugin is " |
| 177 | << "built, in the right place, and doesn't have any missing symbols."; |
| 178 | } else { |
| 179 | ASSERT_FALSE(progress.empty()) << "Test timed out."; |
| 180 | } |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 181 | |
[email protected] | b46661f | 2011-08-25 01:42:53 | [diff] [blame] | 182 | EXPECT_STREQ("PASS", progress.c_str()); |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 183 | } |
| 184 | }; |
| 185 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 186 | // In-process plugin test runner. See OutOfProcessPPAPITest below for the |
| 187 | // out-of-process version. |
| 188 | class PPAPITest : public PPAPITestBase { |
| 189 | public: |
| 190 | PPAPITest() { |
| 191 | // Append the switch to register the pepper plugin. |
| 192 | // library name = <out dir>/<test_name>.<library_extension> |
| 193 | // MIME type = application/x-ppapi-<test_name> |
| 194 | FilePath plugin_dir; |
| 195 | EXPECT_TRUE(PathService::Get(base::DIR_EXE, &plugin_dir)); |
| 196 | |
| 197 | FilePath plugin_lib = plugin_dir.Append(library_name); |
| 198 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 199 | FilePath::StringType pepper_plugin = plugin_lib.value(); |
| 200 | pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests")); |
| 201 | launch_arguments_.AppendSwitchNative(switches::kRegisterPepperPlugins, |
| 202 | pepper_plugin); |
[email protected] | ef5e98e | 2011-12-06 09:49:18 | [diff] [blame] | 203 | launch_arguments_.AppendSwitchASCII(switches::kAllowNaClSocketAPI, |
| 204 | "127.0.0.1"); |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | std::string BuildQuery(const std::string& base, |
| 208 | const std::string& test_case){ |
| 209 | return StringPrintf("%stestcase=%s", base.c_str(), test_case.c_str()); |
| 210 | } |
| 211 | |
| 212 | }; |
| 213 | |
[email protected] | 3252338 | 2011-06-10 02:30:00 | [diff] [blame] | 214 | // Variant of PPAPITest that runs plugins out-of-process to test proxy |
| 215 | // codepaths. |
| 216 | class OutOfProcessPPAPITest : public PPAPITest { |
| 217 | public: |
| 218 | OutOfProcessPPAPITest() { |
| 219 | // Run PPAPI out-of-process to exercise proxy implementations. |
| 220 | launch_arguments_.AppendSwitch(switches::kPpapiOutOfProcess); |
| 221 | } |
| 222 | }; |
| 223 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 224 | // NaCl plugin test runner. |
| 225 | class PPAPINaClTest : public PPAPITestBase { |
| 226 | public: |
| 227 | PPAPINaClTest() { |
| 228 | FilePath plugin_lib; |
| 229 | EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 230 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 231 | |
| 232 | // Enable running NaCl outside of the store. |
| 233 | launch_arguments_.AppendSwitch(switches::kEnableNaCl); |
[email protected] | ef5e98e | 2011-12-06 09:49:18 | [diff] [blame] | 234 | launch_arguments_.AppendSwitchASCII(switches::kAllowNaClSocketAPI, |
| 235 | "127.0.0.1"); |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | // Append the correct mode and testcase string |
| 239 | std::string BuildQuery(const std::string& base, |
| 240 | const std::string& test_case) { |
| 241 | return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| 242 | test_case.c_str()); |
| 243 | } |
| 244 | }; |
| 245 | |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 246 | class PPAPINaClTestDisallowedSockets : public PPAPITestBase { |
| 247 | public: |
| 248 | PPAPINaClTestDisallowedSockets() { |
| 249 | FilePath plugin_lib; |
| 250 | EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 251 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 252 | |
| 253 | // Enable running NaCl outside of the store. |
| 254 | launch_arguments_.AppendSwitch(switches::kEnableNaCl); |
| 255 | } |
| 256 | |
| 257 | // Append the correct mode and testcase string |
| 258 | std::string BuildQuery(const std::string& base, |
| 259 | const std::string& test_case) { |
| 260 | return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| 261 | test_case.c_str()); |
| 262 | } |
| 263 | }; |
| 264 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 265 | // This macro finesses macro expansion to do what we want. |
| 266 | #define STRIP_PREFIXES(test_name) StripPrefixes(#test_name) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 267 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 268 | // Use these macros to run the tests for a specific interface. |
| 269 | // Most interfaces should be tested with both macros. |
| 270 | #define TEST_PPAPI_IN_PROCESS(test_name) \ |
| 271 | TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 272 | RunTest(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 273 | } |
| 274 | #define TEST_PPAPI_OUT_OF_PROCESS(test_name) \ |
| 275 | TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 276 | RunTest(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 277 | } |
[email protected] | 9815108e | 2011-05-27 21:50:28 | [diff] [blame] | 278 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 279 | // Similar macros that test over HTTP. |
| 280 | #define TEST_PPAPI_IN_PROCESS_VIA_HTTP(test_name) \ |
| 281 | TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 282 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 283 | } |
| 284 | #define TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(test_name) \ |
| 285 | TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 286 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 287 | } |
[email protected] | 97f706c | 2011-07-11 20:32:53 | [diff] [blame] | 288 | |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 289 | // Similar macros that test with WebSocket server |
| 290 | #define TEST_PPAPI_IN_PROCESS_WITH_WS(test_name) \ |
| 291 | TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 292 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 293 | } |
| 294 | #define TEST_PPAPI_OUT_OF_PROCESS_WITH_WS(test_name) \ |
| 295 | TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 296 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 297 | } |
| 298 | |
| 299 | |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 300 | #if defined(DISABLE_NACL) |
| 301 | #define TEST_PPAPI_NACL_VIA_HTTP(test_name) |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 302 | #define TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(test_name) |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 303 | #define TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(test_name) |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 304 | #else |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 305 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 306 | // NaCl based PPAPI tests |
| 307 | #define TEST_PPAPI_NACL_VIA_HTTP(test_name) \ |
| 308 | TEST_F(PPAPINaClTest, test_name) { \ |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 309 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| 310 | } |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 311 | |
| 312 | // NaCl based PPAPI tests with disallowed socket API |
| 313 | #define TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(test_name) \ |
| 314 | TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \ |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 315 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| 316 | } |
| 317 | |
| 318 | // NaCl based PPAPI tests with WebSocket server |
| 319 | #define TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(test_name) \ |
| 320 | TEST_F(PPAPINaClTest, test_name) { \ |
| 321 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
| 322 | } |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 323 | #endif |
| 324 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 325 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 326 | // |
| 327 | // Interface tests. |
| 328 | // |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 329 | |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 330 | // Disable tests under ASAN. http://crbug.com/104832. |
| 331 | // This is a bit heavy handed, but the majority of these tests fail under ASAN. |
| 332 | // See bug for history. |
| 333 | #if !defined(ADDRESS_SANITIZER) |
| 334 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 335 | TEST_PPAPI_IN_PROCESS(Broker) |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 336 | // Flaky, http://crbug.com/111355 |
| 337 | TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Broker) |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 338 | |
| 339 | TEST_PPAPI_IN_PROCESS(Core) |
| 340 | TEST_PPAPI_OUT_OF_PROCESS(Core) |
| 341 | |
[email protected] | e62768f | 2011-12-20 17:51:34 | [diff] [blame] | 342 | // Times out on Linux. http://crbug.com/108180 |
| 343 | #if defined(OS_LINUX) |
| 344 | #define MAYBE_CursorControl DISABLED_CursorControl |
| 345 | #else |
| 346 | #define MAYBE_CursorControl CursorControl |
| 347 | #endif |
| 348 | |
| 349 | TEST_PPAPI_IN_PROCESS(MAYBE_CursorControl) |
| 350 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_CursorControl) |
| 351 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_CursorControl) |
[email protected] | 9815108e | 2011-05-27 21:50:28 | [diff] [blame] | 352 | |
[email protected] | 1f8b15f | 2011-12-30 12:45:09 | [diff] [blame] | 353 | // Times out on Linux. http://crbug.com/108859 |
| 354 | #if defined(OS_LINUX) |
| 355 | #define MAYBE_InputEvent DISABLED_InputEvent |
[email protected] | 50a7f3a | 2012-01-05 14:30:50 | [diff] [blame] | 356 | #elif defined(OS_MACOSX) |
| 357 | // Flaky on Mac. http://crbug.com/109258 |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 358 | #define MAYBE_InputEvent DISABLED_InputEvent |
[email protected] | 1f8b15f | 2011-12-30 12:45:09 | [diff] [blame] | 359 | #else |
| 360 | #define MAYBE_InputEvent InputEvent |
| 361 | #endif |
| 362 | |
| 363 | TEST_PPAPI_IN_PROCESS(MAYBE_InputEvent) |
| 364 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_InputEvent) |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 365 | // TODO(bbudge) Enable when input events are proxied correctly for NaCl. |
| 366 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_InputEvent) |
[email protected] | ed33e2e | 2011-11-20 21:18:07 | [diff] [blame] | 367 | |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 368 | TEST_PPAPI_IN_PROCESS(Instance) |
[email protected] | c74e095c | 2011-12-09 00:07:34 | [diff] [blame] | 369 | TEST_PPAPI_OUT_OF_PROCESS(Instance) |
| 370 | // The Instance test is actually InstanceDeprecated which isn't supported |
| 371 | // by NaCl. |
[email protected] | 4d849c6 | 2010-09-02 16:00:12 | [diff] [blame] | 372 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 373 | TEST_PPAPI_IN_PROCESS(Graphics2D) |
[email protected] | 779a24a4 | 2011-09-13 05:41:58 | [diff] [blame] | 374 | TEST_PPAPI_OUT_OF_PROCESS(Graphics2D) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 375 | TEST_PPAPI_NACL_VIA_HTTP(Graphics2D) |
[email protected] | 1559f51 | 2010-05-25 04:21:49 | [diff] [blame] | 376 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 377 | TEST_PPAPI_IN_PROCESS(ImageData) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 378 | TEST_PPAPI_OUT_OF_PROCESS(ImageData) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 379 | TEST_PPAPI_NACL_VIA_HTTP(ImageData) |
[email protected] | 4faecb5 | 2010-06-18 23:27:11 | [diff] [blame] | 380 | |
[email protected] | 7a26d92e | 2012-02-17 20:15:25 | [diff] [blame^] | 381 | TEST_PPAPI_IN_PROCESS(BrowserFont) |
| 382 | TEST_PPAPI_OUT_OF_PROCESS(BrowserFont) |
| 383 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 384 | TEST_PPAPI_IN_PROCESS(Buffer) |
| 385 | TEST_PPAPI_OUT_OF_PROCESS(Buffer) |
[email protected] | 4faecb5 | 2010-06-18 23:27:11 | [diff] [blame] | 386 | |
[email protected] | ef5e98e | 2011-12-06 09:49:18 | [diff] [blame] | 387 | // TODO(ygorshenin): investigate why |
| 388 | // TEST_PPAPI_IN_PROCESS(TCPSocketPrivateShared) fails, |
| 389 | // http://crbug.com/105860. |
| 390 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(TCPSocketPrivateShared) |
| 391 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(TCPSocketPrivateShared) |
| 392 | TEST_PPAPI_NACL_VIA_HTTP(TCPSocketPrivateShared) |
| 393 | |
| 394 | // TODO(ygorshenin): investigate why |
| 395 | // TEST_PPAPI_IN_PROCESS(UDPSocketPrivateShared) fails, |
| 396 | // http://crbug.com/105860. |
| 397 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(UDPSocketPrivateShared) |
| 398 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(UDPSocketPrivateShared) |
| 399 | TEST_PPAPI_NACL_VIA_HTTP(UDPSocketPrivateShared) |
| 400 | |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 401 | TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(TCPSocketPrivateDisallowed) |
| 402 | TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(UDPSocketPrivateDisallowed) |
| 403 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 404 | // URLLoader tests. |
| 405 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicGET) |
| 406 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicPOST) |
| 407 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicFilePOST) |
| 408 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicFileRangePOST) |
| 409 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 410 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 411 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 412 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 413 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 414 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_StreamToFile) |
| 415 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 416 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedSameOriginRestriction) |
| 417 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
| 418 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedCrossOriginRequest) |
| 419 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
| 420 | // TODO(bbudge) Fix Javascript URLs for trusted loaders. |
| 421 | // http://crbug.com/103062 |
| 422 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FAILS_URLLoader_TrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 423 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
| 424 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 425 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 426 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 427 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_AbortCalls) |
| 428 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntendedLoad) |
[email protected] | 94af057 | 2012-01-17 22:10:14 | [diff] [blame] | 429 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_PrefetchBufferThreshold) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 430 | |
| 431 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicGET) |
| 432 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicPOST) |
[email protected] | 5667e12 | 2012-01-11 21:27:45 | [diff] [blame] | 433 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicFilePOST) |
| 434 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicFileRangePOST) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 435 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 436 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 437 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 438 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 439 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 440 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_StreamToFile) |
| 441 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 442 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedSameOriginRestriction) |
| 443 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
| 444 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedCrossOriginRequest) |
| 445 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
| 446 | // TODO(bbudge) Fix Javascript URLs for trusted loaders. |
| 447 | // http://crbug.com/103062 |
| 448 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP( |
| 449 | FAILS_URLLoader_TrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 450 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
| 451 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 452 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 453 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 454 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_AbortCalls) |
| 455 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntendedLoad) |
| 456 | |
| 457 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicGET) |
| 458 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicPOST) |
| 459 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicFilePOST) |
| 460 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicFileRangePOST) |
| 461 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 462 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 463 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 464 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 465 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 466 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_StreamToFile) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 467 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 468 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 469 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 470 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 471 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 472 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 473 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_AbortCalls) |
| 474 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntendedLoad) |
[email protected] | 1ff90a8 | 2011-11-22 21:51:49 | [diff] [blame] | 475 | |
[email protected] | a333c23 | 2012-01-27 23:14:27 | [diff] [blame] | 476 | // URLRequestInfo tests. |
| 477 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 478 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 479 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 480 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_SetProperty) |
| 481 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_SetProperty) |
| 482 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_SetProperty) |
| 483 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody) |
| 484 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody) |
| 485 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_AppendDataToBody) |
| 486 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 487 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 488 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_Stress) |
| 489 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 490 | TEST_PPAPI_IN_PROCESS(PaintAggregator) |
[email protected] | 1ff90a8 | 2011-11-22 21:51:49 | [diff] [blame] | 491 | TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 492 | TEST_PPAPI_NACL_VIA_HTTP(PaintAggregator) |
[email protected] | 2f0e64e | 2010-07-08 22:10:22 | [diff] [blame] | 493 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 494 | TEST_PPAPI_IN_PROCESS(Scrollbar) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 495 | // http://crbug.com/89961 |
[email protected] | 1ff90a8 | 2011-11-22 21:51:49 | [diff] [blame] | 496 | TEST_F(OutOfProcessPPAPITest, FAILS_Scrollbar) { |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 497 | RunTest("Scrollbar"); |
| 498 | } |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 499 | TEST_PPAPI_NACL_VIA_HTTP(Scrollbar) |
[email protected] | 39ef434 | 2010-08-05 22:56:03 | [diff] [blame] | 500 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 501 | TEST_PPAPI_IN_PROCESS(URLUtil) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 502 | TEST_PPAPI_OUT_OF_PROCESS(URLUtil) |
[email protected] | e1333fb | 2010-08-22 04:54:00 | [diff] [blame] | 503 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 504 | TEST_PPAPI_IN_PROCESS(CharSet) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 505 | TEST_PPAPI_OUT_OF_PROCESS(CharSet) |
[email protected] | 167b0dd1 | 2010-09-30 20:00:40 | [diff] [blame] | 506 | |
[email protected] | 947bcaf | 2011-11-22 21:56:04 | [diff] [blame] | 507 | TEST_PPAPI_IN_PROCESS(Crypto) |
[email protected] | 8e66338e | 2011-11-22 21:57:17 | [diff] [blame] | 508 | TEST_PPAPI_OUT_OF_PROCESS(Crypto) |
[email protected] | 8d770e49 | 2011-10-11 04:54:31 | [diff] [blame] | 509 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 510 | TEST_PPAPI_IN_PROCESS(Var) |
[email protected] | 608fcb9 | 2011-12-02 20:44:59 | [diff] [blame] | 511 | TEST_PPAPI_OUT_OF_PROCESS(Var) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 512 | TEST_PPAPI_NACL_VIA_HTTP(Var) |
[email protected] | 0925622c | 2011-06-08 20:22:02 | [diff] [blame] | 513 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 514 | TEST_PPAPI_IN_PROCESS(VarDeprecated) |
[email protected] | b538d7e | 2011-12-20 00:07:39 | [diff] [blame] | 515 | TEST_PPAPI_OUT_OF_PROCESS(VarDeprecated) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 516 | |
[email protected] | b20df1c | 2011-08-03 14:38:24 | [diff] [blame] | 517 | // Windows defines 'PostMessage', so we have to undef it. |
| 518 | #ifdef PostMessage |
| 519 | #undef PostMessage |
| 520 | #endif |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 521 | TEST_PPAPI_IN_PROCESS(PostMessage_SendInInit) |
| 522 | TEST_PPAPI_IN_PROCESS(PostMessage_SendingData) |
[email protected] | 8cc26a4 | 2011-12-15 21:22:31 | [diff] [blame] | 523 | TEST_PPAPI_IN_PROCESS(PostMessage_SendingArrayBuffer) |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 524 | TEST_PPAPI_IN_PROCESS(PostMessage_MessageEvent) |
| 525 | TEST_PPAPI_IN_PROCESS(PostMessage_NoHandler) |
| 526 | TEST_PPAPI_IN_PROCESS(PostMessage_ExtraParam) |
| 527 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendInInit) |
| 528 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendingData) |
[email protected] | 10305deb | 2012-02-16 19:39:22 | [diff] [blame] | 529 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendingArrayBuffer) |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 530 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_MessageEvent) |
| 531 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_NoHandler) |
| 532 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_ExtraParam) |
[email protected] | 924071b | 2012-02-10 01:54:07 | [diff] [blame] | 533 | #if !defined(OS_WIN) |
| 534 | // Times out on Windows XP and Windows 7: http://crbug.com/95557 |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 535 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_NonMainThread) |
[email protected] | 924071b | 2012-02-10 01:54:07 | [diff] [blame] | 536 | #endif |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 537 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_SendInInit) |
| 538 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_SendingData) |
[email protected] | 0752771 | 2012-01-06 00:09:55 | [diff] [blame] | 539 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_SendingArrayBuffer) |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 540 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_MessageEvent) |
| 541 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_NoHandler) |
[email protected] | 396e3fd | 2012-02-09 18:46:10 | [diff] [blame] | 542 | |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 543 | #if defined(OS_WIN) |
| 544 | // Flaky: http://crbug.com/111209 |
| 545 | // |
| 546 | // Note from sheriffs miket and syzm: we're not convinced that this test is |
| 547 | // directly to blame for the flakiness. It's possible that it's a more general |
| 548 | // problem that is exposing itself only with one of the later tests in this |
| 549 | // series. |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 550 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_PostMessage_ExtraParam) |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 551 | #else |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 552 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_ExtraParam) |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 553 | #endif |
[email protected] | f1ced92 | 2011-03-26 20:56:35 | [diff] [blame] | 554 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 555 | TEST_PPAPI_IN_PROCESS(Memory) |
| 556 | TEST_PPAPI_OUT_OF_PROCESS(Memory) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 557 | TEST_PPAPI_NACL_VIA_HTTP(Memory) |
[email protected] | 14710e22 | 2011-07-05 21:37:00 | [diff] [blame] | 558 | |
[email protected] | 7ace8ad | 2011-08-06 03:23:58 | [diff] [blame] | 559 | TEST_PPAPI_IN_PROCESS(VideoDecoder) |
| 560 | TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder) |
| 561 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 562 | // Touch and SetLength fail on Mac and Linux due to sandbox restrictions. |
| 563 | // http://crbug.com/101128 |
| 564 | #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 565 | #define MAYBE_FileIO_ReadWriteSetLength DISABLED_FileIO_ReadWriteSetLength |
| 566 | #define MAYBE_FileIO_TouchQuery DISABLED_FileIO_TouchQuery |
| 567 | #define MAYBE_FileIO_WillWriteWillSetLength \ |
| 568 | DISABLED_FileIO_WillWriteWillSetLength |
| 569 | #else |
| 570 | #define MAYBE_FileIO_ReadWriteSetLength FileIO_ReadWriteSetLength |
| 571 | #define MAYBE_FileIO_TouchQuery FileIO_TouchQuery |
| 572 | #define MAYBE_FileIO_WillWriteWillSetLength FileIO_WillWriteWillSetLength |
| 573 | #endif |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 574 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 575 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_Open) |
| 576 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_AbortCalls) |
| 577 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_ParallelReads) |
| 578 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_ParallelWrites) |
| 579 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 580 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 581 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 582 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_WillWriteWillSetLength) |
| 583 | |
[email protected] | 694878de | 2011-12-21 20:22:14 | [diff] [blame] | 584 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_Open) |
| 585 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_AbortCalls) |
| 586 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_ParallelReads) |
| 587 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_ParallelWrites) |
| 588 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 589 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 590 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 591 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_WillWriteWillSetLength) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 592 | |
| 593 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_Open) |
| 594 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_AbortCalls) |
| 595 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_ParallelReads) |
| 596 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_ParallelWrites) |
| 597 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 598 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 599 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 600 | // The following test requires PPB_FileIO_Trusted, not available in NaCl. |
| 601 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_FileIO_WillWriteWillSetLength) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 602 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 603 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileRef) |
[email protected] | cc6db92 | 2011-12-10 16:54:22 | [diff] [blame] | 604 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileRef) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 605 | TEST_PPAPI_NACL_VIA_HTTP(FileRef) |
| 606 | |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 607 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileSystem) |
[email protected] | 0fe6c242 | 2011-09-07 20:20:41 | [diff] [blame] | 608 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileSystem) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 609 | TEST_PPAPI_NACL_VIA_HTTP(FileSystem) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 610 | |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 611 | // Mac/Aura reach NOTIMPLEMENTED/time out. |
| 612 | // Other systems work in-process, but flake out-of-process because of the |
| 613 | // asyncronous nature of the proxy. |
| 614 | // mac: http://crbug.com/96767 |
| 615 | // aura: http://crbug.com/104384 |
| 616 | // async flakiness: http://crbug.com/108471 |
| 617 | #if defined(OS_MACOSX) || defined(USE_AURA) |
[email protected] | 81a33d9 | 2011-12-20 01:13:03 | [diff] [blame] | 618 | #define MAYBE_FlashFullscreen DISABLED_FlashFullscreen |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 619 | #define MAYBE_OutOfProcessFlashFullscreen DISABLED_FlashFullscreen |
[email protected] | 155be09 | 2011-11-16 04:34:59 | [diff] [blame] | 620 | #else |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 621 | #define MAYBE_FlashFullscreen FlashFullscreen |
[email protected] | b6a9ecc | 2012-01-30 23:17:40 | [diff] [blame] | 622 | #define MAYBE_OutOfProcessFlashFullscreen FlashFullscreen |
[email protected] | 155be09 | 2011-11-16 04:34:59 | [diff] [blame] | 623 | #endif |
| 624 | |
| 625 | TEST_F(PPAPITest, MAYBE_FlashFullscreen) { |
[email protected] | 06e0a34 | 2011-09-27 04:24:30 | [diff] [blame] | 626 | RunTestViaHTTP("FlashFullscreen"); |
| 627 | } |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 628 | TEST_F(OutOfProcessPPAPITest, MAYBE_OutOfProcessFlashFullscreen) { |
[email protected] | 06e0a34 | 2011-09-27 04:24:30 | [diff] [blame] | 629 | RunTestViaHTTP("FlashFullscreen"); |
| 630 | } |
[email protected] | 400d9e9 | 2011-12-08 22:54:26 | [diff] [blame] | 631 | |
[email protected] | 1fb49195 | 2011-12-12 05:59:23 | [diff] [blame] | 632 | // http://crbug.com/107175. |
| 633 | #if defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_LINUX) |
[email protected] | 400d9e9 | 2011-12-08 22:54:26 | [diff] [blame] | 634 | #define MAYBE_Fullscreen FAILS_Fullscreen |
| 635 | #else |
| 636 | #define MAYBE_Fullscreen Fullscreen |
| 637 | #endif |
| 638 | |
| 639 | // TODO(bbudge) Fix fullscreen on Mac. |
| 640 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_Fullscreen) |
| 641 | // TODO(bbudge) Will fail until we add an ACK message to extend user gesture. |
| 642 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FAILS_Fullscreen) |
| 643 | // TODO(bbudge) Enable when PPB_Testing_Dev SimulateInputEvent is proxied. |
| 644 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_Fullscreen) |
[email protected] | 6d54e2ed | 2011-09-15 23:02:04 | [diff] [blame] | 645 | |
[email protected] | 3c149c6 | 2011-11-11 23:22:52 | [diff] [blame] | 646 | TEST_PPAPI_IN_PROCESS(FlashClipboard) |
| 647 | TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard) |
[email protected] | fe833c9 | 2011-10-22 16:13:22 | [diff] [blame] | 648 | |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 649 | // http://crbug.com/63239 |
[email protected] | 35f0598 | 2011-06-09 20:38:01 | [diff] [blame] | 650 | #if defined(OS_POSIX) |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 651 | #define MAYBE_DirectoryReader DISABLED_DirectoryReader |
[email protected] | 09283b7 | 2011-06-01 16:04:29 | [diff] [blame] | 652 | #else |
| 653 | #define MAYBE_DirectoryReader DirectoryReader |
| 654 | #endif |
| 655 | |
[email protected] | 35f0598 | 2011-06-09 20:38:01 | [diff] [blame] | 656 | // Flaky on Mac + Linux, maybe http://codereview.chromium.org/7094008 |
[email protected] | a367e28 | 2011-12-02 19:13:25 | [diff] [blame] | 657 | // Not implemented out of process: http://crbug.com/106129 |
[email protected] | 09283b7 | 2011-06-01 16:04:29 | [diff] [blame] | 658 | TEST_F(PPAPITest, MAYBE_DirectoryReader) { |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 659 | RunTestViaHTTP("DirectoryReader"); |
| 660 | } |
[email protected] | 9b4cb19 | 2011-02-16 00:17:22 | [diff] [blame] | 661 | |
[email protected] | c462d12 | 2011-05-25 01:54:04 | [diff] [blame] | 662 | #if defined(ENABLE_P2P_APIS) |
[email protected] | ff8de996 | 2011-08-31 23:23:57 | [diff] [blame] | 663 | // Flaky. http://crbug.com/84294 |
[email protected] | 8c7ed89 | 2012-02-03 04:12:25 | [diff] [blame] | 664 | TEST_F(PPAPITest, DISABLED_Transport) { |
[email protected] | 9b4cb19 | 2011-02-16 00:17:22 | [diff] [blame] | 665 | RunTest("Transport"); |
| 666 | } |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 667 | // http://crbug.com/89961 |
[email protected] | 8c7ed89 | 2012-02-03 04:12:25 | [diff] [blame] | 668 | TEST_F(OutOfProcessPPAPITest, DISABLED_Transport) { |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 669 | RunTestViaHTTP("Transport"); |
| 670 | } |
[email protected] | c462d12 | 2011-05-25 01:54:04 | [diff] [blame] | 671 | #endif // ENABLE_P2P_APIS |
[email protected] | 3105048 | 2011-07-22 17:03:19 | [diff] [blame] | 672 | |
[email protected] | 02ab09c3 | 2011-11-29 18:59:44 | [diff] [blame] | 673 | // There is no proxy. This is used for PDF metrics reporting, and PDF only |
| 674 | // runs in process, so there's currently no need for a proxy. |
[email protected] | 3105048 | 2011-07-22 17:03:19 | [diff] [blame] | 675 | TEST_PPAPI_IN_PROCESS(UMA) |
[email protected] | 87f3637 | 2011-11-11 20:49:01 | [diff] [blame] | 676 | |
[email protected] | ba35935 | 2011-11-22 00:24:13 | [diff] [blame] | 677 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_AreEqual) |
| 678 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_AreHostsEqual) |
| 679 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_Describe) |
| 680 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_ReplacePort) |
| 681 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetAnyAddress) |
| 682 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_DescribeIPv6) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 683 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetFamily) |
| 684 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetPort) |
| 685 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetAddress) |
[email protected] | ba35935 | 2011-11-22 00:24:13 | [diff] [blame] | 686 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_AreEqual) |
| 687 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_AreHostsEqual) |
| 688 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_Describe) |
| 689 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_ReplacePort) |
| 690 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetAnyAddress) |
| 691 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_DescribeIPv6) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 692 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetFamily) |
| 693 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetPort) |
| 694 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetAddress) |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 695 | |
[email protected] | 9e855c0a | 2012-01-18 13:36:55 | [diff] [blame] | 696 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_AreEqual) |
| 697 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_AreHostsEqual) |
| 698 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_Describe) |
| 699 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_ReplacePort) |
| 700 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetAnyAddress) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 701 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetFamily) |
| 702 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetPort) |
| 703 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetAddress) |
[email protected] | 9e855c0a | 2012-01-18 13:36:55 | [diff] [blame] | 704 | |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 705 | // PPB_TCPSocket_Private currently isn't supported in-process. |
| 706 | TEST_F(OutOfProcessPPAPITest, TCPSocketPrivate) { |
| 707 | RunTestViaHTTP("TCPSocketPrivate"); |
| 708 | } |
[email protected] | d67f5ae | 2011-11-17 22:41:52 | [diff] [blame] | 709 | |
| 710 | TEST_PPAPI_IN_PROCESS(Flash_SetInstanceAlwaysOnTop) |
| 711 | TEST_PPAPI_IN_PROCESS(Flash_GetProxyForURL) |
| 712 | TEST_PPAPI_IN_PROCESS(Flash_MessageLoop) |
| 713 | TEST_PPAPI_IN_PROCESS(Flash_GetLocalTimeZoneOffset) |
| 714 | TEST_PPAPI_IN_PROCESS(Flash_GetCommandLineArgs) |
| 715 | TEST_PPAPI_OUT_OF_PROCESS(Flash_SetInstanceAlwaysOnTop) |
| 716 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetProxyForURL) |
| 717 | TEST_PPAPI_OUT_OF_PROCESS(Flash_MessageLoop) |
| 718 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetLocalTimeZoneOffset) |
| 719 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetCommandLineArgs) |
[email protected] | 081d147b | 2011-11-18 05:51:54 | [diff] [blame] | 720 | |
[email protected] | e056f5f | 2012-01-27 16:37:58 | [diff] [blame] | 721 | // Intermittently fails on OSX. http://crbug.com/111636 |
[email protected] | 0866da6 | 2012-01-30 13:26:52 | [diff] [blame] | 722 | #if defined(OS_MACOSX) |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 723 | #define MAYBE_WebSocket_CcInterfaces DISABLED_WebSocket_CcInterfaces |
[email protected] | e056f5f | 2012-01-27 16:37:58 | [diff] [blame] | 724 | #else |
| 725 | #define MAYBE_WebSocket_CcInterfaces WebSocket_CcInterfaces |
| 726 | #endif |
| 727 | |
[email protected] | 081d147b | 2011-11-18 05:51:54 | [diff] [blame] | 728 | TEST_PPAPI_IN_PROCESS(WebSocket_IsWebSocket) |
[email protected] | a1cff78 | 2011-12-06 18:06:34 | [diff] [blame] | 729 | TEST_PPAPI_IN_PROCESS(WebSocket_UninitializedPropertiesAccess) |
[email protected] | 65f6b00 | 2011-12-01 07:44:11 | [diff] [blame] | 730 | TEST_PPAPI_IN_PROCESS(WebSocket_InvalidConnect) |
[email protected] | 32b05b1 | 2011-12-09 04:26:28 | [diff] [blame] | 731 | TEST_PPAPI_IN_PROCESS(WebSocket_Protocols) |
[email protected] | 65f6b00 | 2011-12-01 07:44:11 | [diff] [blame] | 732 | TEST_PPAPI_IN_PROCESS(WebSocket_GetURL) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 733 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_ValidConnect) |
| 734 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_InvalidClose) |
| 735 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_ValidClose) |
| 736 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_GetProtocol) |
| 737 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_TextSendReceive) |
| 738 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_BinarySendReceive) |
| 739 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_BufferedAmount) |
[email protected] | e056f5f | 2012-01-27 16:37:58 | [diff] [blame] | 740 | TEST_PPAPI_IN_PROCESS_WITH_WS(MAYBE_WebSocket_CcInterfaces) |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 741 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_IsWebSocket) |
| 742 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_UninitializedPropertiesAccess) |
| 743 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_InvalidConnect) |
| 744 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_Protocols) |
| 745 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_GetURL) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 746 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_ValidConnect) |
| 747 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_InvalidClose) |
| 748 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_ValidClose) |
| 749 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_GetProtocol) |
| 750 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_TextSendReceive) |
| 751 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_BinarySendReceive) |
| 752 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_BufferedAmount) |
[email protected] | e056f5f | 2012-01-27 16:37:58 | [diff] [blame] | 753 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(MAYBE_WebSocket_CcInterfaces) |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 754 | |
[email protected] | c3d0621 | 2011-12-01 00:40:52 | [diff] [blame] | 755 | TEST_PPAPI_IN_PROCESS(AudioConfig_ValidConfigs) |
| 756 | TEST_PPAPI_IN_PROCESS(AudioConfig_InvalidConfigs) |
| 757 | TEST_PPAPI_OUT_OF_PROCESS(AudioConfig_ValidConfigs) |
| 758 | TEST_PPAPI_OUT_OF_PROCESS(AudioConfig_InvalidConfigs) |
[email protected] | 65bc6036 | 2011-11-30 06:20:37 | [diff] [blame] | 759 | |
[email protected] | 371a7b81 | 2012-02-17 02:35:20 | [diff] [blame] | 760 | // PPAPITest.Audio_Creation fails on Linux try servers. http://crbug.com/114712 |
| 761 | #if defined(OS_LINUX) |
| 762 | #define MAYBE_Audio_Creation DISABLED_Audio_Creation |
| 763 | #else |
| 764 | #define MAYBE_Audio_Creation Audio_Creation |
| 765 | #endif |
| 766 | |
| 767 | TEST_PPAPI_IN_PROCESS(MAYBE_Audio_Creation) |
[email protected] | c6b2b7f | 2011-12-01 02:38:25 | [diff] [blame] | 768 | TEST_PPAPI_IN_PROCESS(Audio_DestroyNoStop) |
| 769 | TEST_PPAPI_IN_PROCESS(Audio_Failures) |
| 770 | TEST_PPAPI_OUT_OF_PROCESS(Audio_Creation) |
| 771 | TEST_PPAPI_OUT_OF_PROCESS(Audio_DestroyNoStop) |
| 772 | TEST_PPAPI_OUT_OF_PROCESS(Audio_Failures) |
| 773 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 774 | TEST_PPAPI_IN_PROCESS(View_CreateVisible); |
| 775 | TEST_PPAPI_OUT_OF_PROCESS(View_CreateVisible); |
| 776 | TEST_PPAPI_NACL_VIA_HTTP(View_CreateVisible); |
| 777 | // This test ensures that plugins created in a background tab have their |
| 778 | // initial visibility set to false. We don't bother testing in-process for this |
| 779 | // custom test since the out of process code also exercises in-process. |
| 780 | TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) { |
| 781 | // Make a second tab in the foreground. |
| 782 | scoped_refptr<TabProxy> tab(GetActiveTab()); |
| 783 | ASSERT_TRUE(tab.get()); |
| 784 | scoped_refptr<BrowserProxy> browser(tab->GetParentBrowser()); |
| 785 | ASSERT_TRUE(browser.get()); |
| 786 | GURL url = GetTestFileUrl("View_CreatedInvisible"); |
| 787 | ASSERT_TRUE(browser->AppendBackgroundTab(url)); |
| 788 | |
| 789 | // Tab 1 will be the one we appended after the default tab 0. |
| 790 | RunTestURL(tab, url); |
| 791 | } |
| 792 | // This test messes with tab visibility so is custom. |
| 793 | TEST_F(OutOfProcessPPAPITest, View_PageHideShow) { |
| 794 | GURL url = GetTestFileUrl("View_PageHideShow"); |
| 795 | scoped_refptr<TabProxy> tab = GetActiveTab(); |
| 796 | ASSERT_TRUE(tab.get()); |
| 797 | ASSERT_TRUE(tab->NavigateToURLBlockUntilNavigationsComplete(url, 1)); |
| 798 | |
| 799 | // The plugin will be loaded in the foreground tab and will set the |
| 800 | // "created" cookie. |
| 801 | std::string true_str("TRUE"); |
| 802 | std::string progress = WaitUntilCookieNonEmpty(tab.get(), url, |
| 803 | "TestPageHideShow:Created", |
| 804 | TestTimeouts::action_max_timeout_ms()); |
| 805 | ASSERT_EQ(true_str, progress); |
| 806 | |
| 807 | // Make a new tab to cause the original one to hide, this should trigger the |
| 808 | // next phase of the test. |
| 809 | scoped_refptr<BrowserProxy> browser(tab->GetParentBrowser()); |
| 810 | ASSERT_TRUE(browser.get()); |
| 811 | ASSERT_TRUE(browser->AppendTab(GURL(chrome::kAboutBlankURL))); |
| 812 | |
| 813 | // Wait until the test acks that it got hidden. |
| 814 | progress = WaitUntilCookieNonEmpty(tab.get(), url, "TestPageHideShow:Hidden", |
| 815 | TestTimeouts::action_max_timeout_ms()); |
| 816 | ASSERT_EQ(true_str, progress); |
| 817 | |
| 818 | // Switch back to the test tab. |
| 819 | ASSERT_TRUE(browser->ActivateTab(0)); |
| 820 | |
| 821 | // Wait for the test completion event. |
| 822 | RunTestURL(tab, url); |
| 823 | } |
| 824 | TEST_PPAPI_IN_PROCESS(View_SizeChange); |
| 825 | TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange); |
| 826 | TEST_PPAPI_NACL_VIA_HTTP(View_SizeChange); |
| 827 | TEST_PPAPI_IN_PROCESS(View_ClipChange); |
| 828 | TEST_PPAPI_OUT_OF_PROCESS(View_ClipChange); |
| 829 | TEST_PPAPI_NACL_VIA_HTTP(View_ClipChange); |
| 830 | |
[email protected] | 6117b82da | 2012-01-07 00:51:01 | [diff] [blame] | 831 | TEST_PPAPI_IN_PROCESS(ResourceArray_Basics) |
| 832 | TEST_PPAPI_IN_PROCESS(ResourceArray_OutOfRangeAccess) |
| 833 | TEST_PPAPI_IN_PROCESS(ResourceArray_EmptyArray) |
| 834 | TEST_PPAPI_IN_PROCESS(ResourceArray_InvalidElement) |
| 835 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_Basics) |
| 836 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_OutOfRangeAccess) |
| 837 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_EmptyArray) |
| 838 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_InvalidElement) |
| 839 | |
[email protected] | cd2af39 | 2012-01-31 09:19:17 | [diff] [blame] | 840 | TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) |
| 841 | TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) |
| 842 | TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) |
| 843 | TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) |
| 844 | |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 845 | #endif // ADDRESS_SANITIZER |