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