[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 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 5 | #include "chrome/test/ui/ppapi_uitest.h" |
| 6 | |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 7 | #include "base/command_line.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 8 | #include "base/file_util.h" |
| 9 | #include "base/path_service.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 10 | #include "base/stringprintf.h" |
| 11 | #include "base/string_util.h" |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 12 | #include "base/test/test_timeouts.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 13 | #include "base/timer.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 14 | #include "build/build_config.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 15 | #include "chrome/browser/ui/browser.h" |
| 16 | #include "chrome/browser/ui/browser_navigator.h" |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 17 | #include "chrome/common/chrome_paths.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 18 | #include "chrome/common/chrome_switches.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 19 | #include "chrome/test/base/in_process_browser_test.h" |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 20 | #include "chrome/test/base/ui_test_utils.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 21 | #include "content/public/browser/dom_operation_notification_details.h" |
| 22 | #include "content/public/browser/notification_types.h" |
| 23 | #include "content/public/browser/web_contents.h" |
[email protected] | e8d05dc | 2012-03-22 03:19:10 | [diff] [blame] | 24 | #include "content/public/common/content_paths.h" |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 25 | #include "content/public/common/content_switches.h" |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 26 | #include "content/public/common/url_constants.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 27 | #include "net/base/net_util.h" |
[email protected] | 3985ba8 | 2010-07-29 21:44:12 | [diff] [blame] | 28 | #include "net/test/test_server.h" |
[email protected] | 0bd75368 | 2010-12-16 18:15:52 | [diff] [blame] | 29 | #include "webkit/plugins/plugin_switches.h" |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 30 | |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 31 | using content::DomOperationNotificationDetails; |
| 32 | using content::RenderViewHost; |
| 33 | |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 34 | namespace { |
| 35 | |
[email protected] | df4bdd0 | 2010-06-10 17:56:53 | [diff] [blame] | 36 | // Platform-specific filename relative to the chrome executable. |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 37 | #if defined(OS_WIN) |
| 38 | const wchar_t library_name[] = L"ppapi_tests.dll"; |
| 39 | #elif defined(OS_MACOSX) |
| 40 | const char library_name[] = "ppapi_tests.plugin"; |
| 41 | #elif defined(OS_POSIX) |
[email protected] | df4bdd0 | 2010-06-10 17:56:53 | [diff] [blame] | 42 | const char library_name[] = "libppapi_tests.so"; |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 43 | #endif |
| 44 | |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 45 | // The large timeout was causing the cycle time for the whole test suite |
| 46 | // to be too long when a tiny bug caused all tests to timeout. |
| 47 | // http://crbug.com/108264 |
| 48 | static int kTimeoutMs = 90000; |
| 49 | //static int kTimeoutMs = TestTimeouts::large_test_timeout_ms()); |
| 50 | |
| 51 | class TestFinishObserver : public content::NotificationObserver { |
| 52 | public: |
| 53 | explicit TestFinishObserver(RenderViewHost* render_view_host, int timeout_s) |
| 54 | : finished_(false), waiting_(false), timeout_s_(timeout_s) { |
| 55 | registrar_.Add(this, content::NOTIFICATION_DOM_OPERATION_RESPONSE, |
| 56 | content::Source<RenderViewHost>(render_view_host)); |
| 57 | timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s), |
| 58 | this, &TestFinishObserver::OnTimeout); |
| 59 | } |
| 60 | |
| 61 | bool WaitForFinish() { |
| 62 | if (!finished_) { |
| 63 | waiting_ = true; |
| 64 | ui_test_utils::RunMessageLoop(); |
| 65 | waiting_ = false; |
| 66 | } |
| 67 | return finished_; |
| 68 | } |
| 69 | |
| 70 | virtual void Observe(int type, |
| 71 | const content::NotificationSource& source, |
| 72 | const content::NotificationDetails& details) { |
| 73 | DCHECK(type == content::NOTIFICATION_DOM_OPERATION_RESPONSE); |
| 74 | content::Details<DomOperationNotificationDetails> dom_op_details(details); |
| 75 | // We might receive responses for other script execution, but we only |
| 76 | // care about the test finished message. |
| 77 | std::string response; |
| 78 | TrimString(dom_op_details->json, "\"", &response); |
| 79 | if (response == "...") { |
| 80 | timer_.Stop(); |
| 81 | timer_.Start(FROM_HERE, base::TimeDelta::FromSeconds(timeout_s_), |
| 82 | this, &TestFinishObserver::OnTimeout); |
| 83 | } else { |
| 84 | result_ = response; |
| 85 | finished_ = true; |
| 86 | if (waiting_) |
| 87 | MessageLoopForUI::current()->Quit(); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | std::string result() const { return result_; } |
| 92 | |
| 93 | void Reset() { |
| 94 | finished_ = false; |
| 95 | waiting_ = false; |
| 96 | result_.clear(); |
| 97 | } |
| 98 | |
| 99 | private: |
| 100 | void OnTimeout() { |
| 101 | MessageLoopForUI::current()->Quit(); |
| 102 | } |
| 103 | |
| 104 | bool finished_; |
| 105 | bool waiting_; |
| 106 | int timeout_s_; |
| 107 | std::string result_; |
| 108 | content::NotificationRegistrar registrar_; |
| 109 | base::RepeatingTimer<TestFinishObserver> timer_; |
| 110 | |
| 111 | DISALLOW_COPY_AND_ASSIGN(TestFinishObserver); |
| 112 | }; |
| 113 | |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 114 | } // namespace |
| 115 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 116 | PPAPITestBase::PPAPITestBase() { |
| 117 | EnableDOMAutomation(); |
| 118 | } |
| 119 | |
| 120 | void PPAPITestBase::SetUpCommandLine(CommandLine* command_line) { |
| 121 | // The test sends us the result via a cookie. |
| 122 | command_line->AppendSwitch(switches::kEnableFileCookies); |
| 123 | |
| 124 | // Some stuff is hung off of the testing interface which is not enabled |
| 125 | // by default. |
| 126 | command_line->AppendSwitch(switches::kEnablePepperTesting); |
| 127 | |
| 128 | // Smooth scrolling confuses the scrollbar test. |
| 129 | command_line->AppendSwitch(switches::kDisableSmoothScrolling); |
| 130 | } |
| 131 | |
| 132 | GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) { |
| 133 | FilePath test_path; |
| 134 | EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path)); |
| 135 | test_path = test_path.Append(FILE_PATH_LITERAL("ppapi")); |
| 136 | test_path = test_path.Append(FILE_PATH_LITERAL("tests")); |
| 137 | test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html")); |
| 138 | |
| 139 | // Sanity check the file name. |
| 140 | EXPECT_TRUE(file_util::PathExists(test_path)); |
| 141 | |
| 142 | GURL test_url = net::FilePathToFileURL(test_path); |
| 143 | |
| 144 | GURL::Replacements replacements; |
| 145 | std::string query = BuildQuery("", test_case); |
| 146 | replacements.SetQuery(query.c_str(), url_parse::Component(0, query.size())); |
| 147 | return test_url.ReplaceComponents(replacements); |
| 148 | } |
| 149 | |
| 150 | void PPAPITestBase::RunTest(const std::string& test_case) { |
| 151 | GURL url = GetTestFileUrl(test_case); |
| 152 | RunTestURL(url); |
| 153 | } |
| 154 | |
| 155 | void PPAPITestBase::RunTestAndReload(const std::string& test_case) { |
| 156 | GURL url = GetTestFileUrl(test_case); |
| 157 | RunTestURL(url); |
| 158 | // If that passed, we simply run the test again, which navigates again. |
| 159 | RunTestURL(url); |
| 160 | } |
| 161 | |
| 162 | void PPAPITestBase::RunTestViaHTTP(const std::string& test_case) { |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 163 | FilePath document_root; |
| 164 | ASSERT_TRUE(GetHTTPDocumentRoot(&document_root)); |
| 165 | RunHTTPTestServer(document_root, test_case, ""); |
| 166 | } |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 167 | |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 168 | void PPAPITestBase::RunTestWithSSLServer(const std::string& test_case) { |
| 169 | FilePath document_root; |
| 170 | ASSERT_TRUE(GetHTTPDocumentRoot(&document_root)); |
| 171 | net::TestServer test_server(net::BaseTestServer::HTTPSOptions(), |
| 172 | document_root); |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 173 | ASSERT_TRUE(test_server.Start()); |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 174 | uint16_t port = test_server.host_port_pair().port(); |
| 175 | RunHTTPTestServer(document_root, test_case, |
| 176 | StringPrintf("ssl_server_port=%d", port)); |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 177 | } |
[email protected] | eff5e888 | 2010-10-20 00:24:46 | [diff] [blame] | 178 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 179 | void PPAPITestBase::RunTestWithWebSocketServer(const std::string& test_case) { |
| 180 | FilePath websocket_root_dir; |
| 181 | ASSERT_TRUE( |
[email protected] | e8d05dc | 2012-03-22 03:19:10 | [diff] [blame] | 182 | PathService::Get(content::DIR_LAYOUT_TESTS, &websocket_root_dir)); |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 183 | ui_test_utils::TestWebSocketServer server; |
| 184 | int port = server.UseRandomPort(); |
| 185 | ASSERT_TRUE(server.Start(websocket_root_dir)); |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 186 | FilePath http_document_root; |
| 187 | ASSERT_TRUE(GetHTTPDocumentRoot(&http_document_root)); |
| 188 | RunHTTPTestServer(http_document_root, test_case, |
| 189 | StringPrintf("websocket_port=%d", port)); |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 190 | } |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 191 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 192 | std::string PPAPITestBase::StripPrefixes(const std::string& test_name) { |
| 193 | const char* const prefixes[] = { |
| 194 | "FAILS_", "FLAKY_", "DISABLED_", "SLOW_" }; |
| 195 | for (size_t i = 0; i < sizeof(prefixes)/sizeof(prefixes[0]); ++i) |
| 196 | if (test_name.find(prefixes[i]) == 0) |
| 197 | return test_name.substr(strlen(prefixes[i])); |
| 198 | return test_name; |
| 199 | } |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 200 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 201 | void PPAPITestBase::RunTestURL(const GURL& test_url) { |
| 202 | // See comment above TestingInstance in ppapi/test/testing_instance.h. |
| 203 | // Basically it sends messages using the DOM automation controller. The |
| 204 | // value of "..." means it's still working and we should continue to wait, |
| 205 | // any other value indicates completion (in this case it will start with |
| 206 | // "PASS" or "FAIL"). This keeps us from timing out on waits for long tests. |
| 207 | TestFinishObserver observer( |
| 208 | browser()->GetSelectedWebContents()->GetRenderViewHost(), kTimeoutMs); |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 209 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 210 | ui_test_utils::NavigateToURL(browser(), test_url); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 211 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 212 | ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 213 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 214 | EXPECT_STREQ("PASS", observer.result().c_str()); |
| 215 | } |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 216 | |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 217 | void PPAPITestBase::RunHTTPTestServer( |
| 218 | const FilePath& document_root, |
| 219 | const std::string& test_case, |
| 220 | const std::string& extra_params) { |
| 221 | net::TestServer test_server(net::TestServer::TYPE_HTTP, |
| 222 | net::TestServer::kLocalhost, |
| 223 | document_root); |
| 224 | ASSERT_TRUE(test_server.Start()); |
| 225 | std::string query = BuildQuery("files/test_case.html?", test_case); |
| 226 | if (!extra_params.empty()) |
| 227 | query = StringPrintf("%s&%s", query.c_str(), extra_params.c_str()); |
| 228 | |
| 229 | GURL url = test_server.GetURL(query); |
| 230 | RunTestURL(url); |
| 231 | } |
| 232 | |
| 233 | bool PPAPITestBase::GetHTTPDocumentRoot(FilePath* document_root) { |
| 234 | // For HTTP tests, we use the output DIR to grab the generated files such |
| 235 | // as the NEXEs. |
| 236 | FilePath exe_dir = CommandLine::ForCurrentProcess()->GetProgram().DirName(); |
| 237 | FilePath src_dir; |
| 238 | if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) |
| 239 | return false; |
| 240 | |
| 241 | // TestServer expects a path relative to source. So we must first |
| 242 | // generate absolute paths to SRC and EXE and from there generate |
| 243 | // a relative path. |
| 244 | if (!exe_dir.IsAbsolute()) file_util::AbsolutePath(&exe_dir); |
| 245 | if (!src_dir.IsAbsolute()) file_util::AbsolutePath(&src_dir); |
| 246 | if (!exe_dir.IsAbsolute()) |
| 247 | return false; |
| 248 | if (!src_dir.IsAbsolute()) |
| 249 | return false; |
| 250 | |
| 251 | size_t match, exe_size, src_size; |
| 252 | std::vector<FilePath::StringType> src_parts, exe_parts; |
| 253 | |
| 254 | // Determine point at which src and exe diverge, and create a relative path. |
| 255 | exe_dir.GetComponents(&exe_parts); |
| 256 | src_dir.GetComponents(&src_parts); |
| 257 | exe_size = exe_parts.size(); |
| 258 | src_size = src_parts.size(); |
| 259 | for (match = 0; match < exe_size && match < src_size; ++match) { |
| 260 | if (exe_parts[match] != src_parts[match]) |
| 261 | break; |
| 262 | } |
| 263 | for (size_t tmp_itr = match; tmp_itr < src_size; ++tmp_itr) { |
| 264 | *document_root = document_root->Append(FILE_PATH_LITERAL("..")); |
| 265 | } |
| 266 | for (; match < exe_size; ++match) { |
| 267 | *document_root = document_root->Append(exe_parts[match]); |
| 268 | } |
| 269 | return true; |
| 270 | } |
| 271 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 272 | PPAPITest::PPAPITest() { |
| 273 | } |
[email protected] | 13e343c | 2012-03-16 22:34:22 | [diff] [blame] | 274 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 275 | void PPAPITest::SetUpCommandLine(CommandLine* command_line) { |
| 276 | PPAPITestBase::SetUpCommandLine(command_line); |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 277 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 278 | // Append the switch to register the pepper plugin. |
| 279 | // library name = <out dir>/<test_name>.<library_extension> |
| 280 | // MIME type = application/x-ppapi-<test_name> |
| 281 | FilePath plugin_dir; |
| 282 | EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir)); |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 283 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 284 | FilePath plugin_lib = plugin_dir.Append(library_name); |
| 285 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
| 286 | FilePath::StringType pepper_plugin = plugin_lib.value(); |
| 287 | pepper_plugin.append(FILE_PATH_LITERAL(";application/x-ppapi-tests")); |
| 288 | command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, |
| 289 | pepper_plugin); |
| 290 | command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| 291 | } |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 292 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 293 | std::string PPAPITest::BuildQuery(const std::string& base, |
| 294 | const std::string& test_case){ |
| 295 | return StringPrintf("%stestcase=%s", base.c_str(), test_case.c_str()); |
| 296 | } |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 297 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 298 | OutOfProcessPPAPITest::OutOfProcessPPAPITest() { |
| 299 | } |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 300 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 301 | void OutOfProcessPPAPITest::SetUpCommandLine(CommandLine* command_line) { |
| 302 | PPAPITest::SetUpCommandLine(command_line); |
[email protected] | 44d80ea | 2010-07-02 20:14:25 | [diff] [blame] | 303 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 304 | // Run PPAPI out-of-process to exercise proxy implementations. |
| 305 | command_line->AppendSwitch(switches::kPpapiOutOfProcess); |
| 306 | } |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 307 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 308 | PPAPINaClTest::PPAPINaClTest() { |
| 309 | } |
[email protected] | efc3a40e | 2011-11-23 02:32:51 | [diff] [blame] | 310 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 311 | void PPAPINaClTest::SetUpCommandLine(CommandLine* command_line) { |
| 312 | PPAPITestBase::SetUpCommandLine(command_line); |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 313 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 314 | FilePath plugin_lib; |
| 315 | EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 316 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 317 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 318 | // Enable running NaCl outside of the store. |
| 319 | command_line->AppendSwitch(switches::kEnableNaCl); |
| 320 | command_line->AppendSwitchASCII(switches::kAllowNaClSocketAPI, "127.0.0.1"); |
| 321 | } |
[email protected] | 49c09c15d | 2010-12-10 02:46:03 | [diff] [blame] | 322 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 323 | // Append the correct mode and testcase string |
| 324 | std::string PPAPINaClTest::BuildQuery(const std::string& base, |
| 325 | const std::string& test_case) { |
| 326 | return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| 327 | test_case.c_str()); |
| 328 | } |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 329 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 330 | PPAPINaClTestDisallowedSockets::PPAPINaClTestDisallowedSockets() { |
| 331 | } |
[email protected] | 37d0691 | 2010-05-20 20:00:31 | [diff] [blame] | 332 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 333 | void PPAPINaClTestDisallowedSockets::SetUpCommandLine( |
| 334 | CommandLine* command_line) { |
| 335 | PPAPITestBase::SetUpCommandLine(command_line); |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 336 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 337 | FilePath plugin_lib; |
| 338 | EXPECT_TRUE(PathService::Get(chrome::FILE_NACL_PLUGIN, &plugin_lib)); |
| 339 | EXPECT_TRUE(file_util::PathExists(plugin_lib)); |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 340 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 341 | // Enable running NaCl outside of the store. |
| 342 | command_line->AppendSwitch(switches::kEnableNaCl); |
| 343 | } |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 344 | |
[email protected] | 5926124 | 2012-03-19 13:08:59 | [diff] [blame] | 345 | // Append the correct mode and testcase string |
| 346 | std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| 347 | const std::string& base, |
| 348 | const std::string& test_case) { |
| 349 | return StringPrintf("%smode=nacl&testcase=%s", base.c_str(), |
| 350 | test_case.c_str()); |
| 351 | } |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 352 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 353 | // This macro finesses macro expansion to do what we want. |
| 354 | #define STRIP_PREFIXES(test_name) StripPrefixes(#test_name) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 355 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 356 | // Use these macros to run the tests for a specific interface. |
| 357 | // Most interfaces should be tested with both macros. |
| 358 | #define TEST_PPAPI_IN_PROCESS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 359 | IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 360 | RunTest(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 361 | } |
| 362 | #define TEST_PPAPI_OUT_OF_PROCESS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 363 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 364 | RunTest(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 365 | } |
[email protected] | 9815108e | 2011-05-27 21:50:28 | [diff] [blame] | 366 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 367 | // Similar macros that test over HTTP. |
| 368 | #define TEST_PPAPI_IN_PROCESS_VIA_HTTP(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 369 | IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 370 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 371 | } |
| 372 | #define TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 373 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 374 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 375 | } |
[email protected] | 97f706c | 2011-07-11 20:32:53 | [diff] [blame] | 376 | |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 377 | // Similar macros that test with an SSL server. |
| 378 | #define TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(test_name) \ |
| 379 | IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \ |
| 380 | RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \ |
| 381 | } |
| 382 | #define TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(test_name) \ |
| 383 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \ |
| 384 | RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \ |
| 385 | } |
| 386 | |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 387 | // Similar macros that test with WebSocket server |
| 388 | #define TEST_PPAPI_IN_PROCESS_WITH_WS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 389 | IN_PROC_BROWSER_TEST_F(PPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 390 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 391 | } |
| 392 | #define TEST_PPAPI_OUT_OF_PROCESS_WITH_WS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 393 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, test_name) { \ |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 394 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
[email protected] | 31c1a7e | 2011-11-26 03:45:30 | [diff] [blame] | 395 | } |
| 396 | |
| 397 | |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 398 | #if defined(DISABLE_NACL) |
| 399 | #define TEST_PPAPI_NACL_VIA_HTTP(test_name) |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 400 | #define TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(test_name) |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 401 | #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 402 | #define TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(test_name) |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 403 | #else |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 404 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 405 | // NaCl based PPAPI tests |
| 406 | #define TEST_PPAPI_NACL_VIA_HTTP(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 407 | IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 408 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| 409 | } |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 410 | |
| 411 | // NaCl based PPAPI tests with disallowed socket API |
| 412 | #define TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 413 | IN_PROC_BROWSER_TEST_F(PPAPINaClTestDisallowedSockets, test_name) { \ |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 414 | RunTestViaHTTP(STRIP_PREFIXES(test_name)); \ |
| 415 | } |
| 416 | |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 417 | // NaCl based PPAPI tests with SSL server |
| 418 | #define TEST_PPAPI_NACL_WITH_SSL_SERVER(test_name) \ |
| 419 | IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
| 420 | RunTestWithSSLServer(STRIP_PREFIXES(test_name)); \ |
| 421 | } |
| 422 | |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 423 | // NaCl based PPAPI tests with WebSocket server |
| 424 | #define TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(test_name) \ |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 425 | IN_PROC_BROWSER_TEST_F(PPAPINaClTest, test_name) { \ |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 426 | RunTestWithWebSocketServer(STRIP_PREFIXES(test_name)); \ |
| 427 | } |
[email protected] | c1af406f | 2011-11-27 07:05:20 | [diff] [blame] | 428 | #endif |
| 429 | |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 430 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 431 | // |
| 432 | // Interface tests. |
| 433 | // |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 434 | |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 435 | // Disable tests under ASAN. http://crbug.com/104832. |
| 436 | // This is a bit heavy handed, but the majority of these tests fail under ASAN. |
| 437 | // See bug for history. |
| 438 | #if !defined(ADDRESS_SANITIZER) |
| 439 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 440 | TEST_PPAPI_IN_PROCESS(Broker) |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 441 | // Flaky, http://crbug.com/111355 |
| 442 | TEST_PPAPI_OUT_OF_PROCESS(DISABLED_Broker) |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 443 | |
| 444 | TEST_PPAPI_IN_PROCESS(Core) |
| 445 | TEST_PPAPI_OUT_OF_PROCESS(Core) |
| 446 | |
[email protected] | e62768f | 2011-12-20 17:51:34 | [diff] [blame] | 447 | // Times out on Linux. http://crbug.com/108180 |
| 448 | #if defined(OS_LINUX) |
| 449 | #define MAYBE_CursorControl DISABLED_CursorControl |
| 450 | #else |
| 451 | #define MAYBE_CursorControl CursorControl |
| 452 | #endif |
| 453 | |
| 454 | TEST_PPAPI_IN_PROCESS(MAYBE_CursorControl) |
| 455 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_CursorControl) |
| 456 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_CursorControl) |
[email protected] | 9815108e | 2011-05-27 21:50:28 | [diff] [blame] | 457 | |
[email protected] | 1f8b15f | 2011-12-30 12:45:09 | [diff] [blame] | 458 | // Times out on Linux. http://crbug.com/108859 |
| 459 | #if defined(OS_LINUX) |
| 460 | #define MAYBE_InputEvent DISABLED_InputEvent |
[email protected] | 50a7f3a | 2012-01-05 14:30:50 | [diff] [blame] | 461 | #elif defined(OS_MACOSX) |
| 462 | // Flaky on Mac. http://crbug.com/109258 |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 463 | #define MAYBE_InputEvent DISABLED_InputEvent |
[email protected] | 1f8b15f | 2011-12-30 12:45:09 | [diff] [blame] | 464 | #else |
| 465 | #define MAYBE_InputEvent InputEvent |
| 466 | #endif |
| 467 | |
| 468 | TEST_PPAPI_IN_PROCESS(MAYBE_InputEvent) |
| 469 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_InputEvent) |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 470 | // TODO(bbudge) Enable when input events are proxied correctly for NaCl. |
| 471 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_InputEvent) |
[email protected] | ed33e2e | 2011-11-20 21:18:07 | [diff] [blame] | 472 | |
[email protected] | 13e343c | 2012-03-16 22:34:22 | [diff] [blame] | 473 | TEST_PPAPI_IN_PROCESS(Instance_ExecuteScript); |
| 474 | TEST_PPAPI_OUT_OF_PROCESS(Instance_ExecuteScript) |
| 475 | // ExecuteScript isn't supported by NaCl. |
| 476 | |
| 477 | // We run and reload the RecursiveObjects test to ensure that the InstanceObject |
| 478 | // (and others) are properly cleaned up after the first run. |
| 479 | IN_PROC_BROWSER_TEST_F(PPAPITest, Instance_RecursiveObjects) { |
| 480 | RunTestAndReload("Instance_RecursiveObjects"); |
| 481 | } |
| 482 | // TODO(dmichael): Make it work out-of-process (or at least see whether we |
| 483 | // care). |
| 484 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, |
| 485 | DISABLED_Instance_RecursiveObjects) { |
| 486 | RunTestAndReload("Instance_RecursiveObjects"); |
| 487 | } |
| 488 | TEST_PPAPI_IN_PROCESS(Instance_TestLeakedObjectDestructors); |
| 489 | TEST_PPAPI_OUT_OF_PROCESS(Instance_TestLeakedObjectDestructors); |
| 490 | // ScriptableObjects aren't supported in NaCl, so Instance_RecursiveObjects and |
| 491 | // Instance_TestLeakedObjectDestructors don't make sense for NaCl. |
[email protected] | 4d849c6 | 2010-09-02 16:00:12 | [diff] [blame] | 492 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 493 | TEST_PPAPI_IN_PROCESS(Graphics2D) |
[email protected] | 779a24a4 | 2011-09-13 05:41:58 | [diff] [blame] | 494 | TEST_PPAPI_OUT_OF_PROCESS(Graphics2D) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 495 | TEST_PPAPI_NACL_VIA_HTTP(Graphics2D) |
[email protected] | 1559f51 | 2010-05-25 04:21:49 | [diff] [blame] | 496 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 497 | TEST_PPAPI_IN_PROCESS(ImageData) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 498 | TEST_PPAPI_OUT_OF_PROCESS(ImageData) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 499 | TEST_PPAPI_NACL_VIA_HTTP(ImageData) |
[email protected] | 4faecb5 | 2010-06-18 23:27:11 | [diff] [blame] | 500 | |
[email protected] | 7a26d92e | 2012-02-17 20:15:25 | [diff] [blame] | 501 | TEST_PPAPI_IN_PROCESS(BrowserFont) |
| 502 | TEST_PPAPI_OUT_OF_PROCESS(BrowserFont) |
| 503 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 504 | TEST_PPAPI_IN_PROCESS(Buffer) |
| 505 | TEST_PPAPI_OUT_OF_PROCESS(Buffer) |
[email protected] | 4faecb5 | 2010-06-18 23:27:11 | [diff] [blame] | 506 | |
[email protected] | 6c11340 | 2012-03-23 01:31:51 | [diff] [blame] | 507 | TEST_PPAPI_OUT_OF_PROCESS_WITH_SSL_SERVER(TCPSocketPrivate) |
| 508 | TEST_PPAPI_IN_PROCESS_WITH_SSL_SERVER(TCPSocketPrivate) |
| 509 | TEST_PPAPI_NACL_WITH_SSL_SERVER(TCPSocketPrivate) |
[email protected] | ef5e98e | 2011-12-06 09:49:18 | [diff] [blame] | 510 | |
[email protected] | e33facb | 2012-03-27 20:50:54 | [diff] [blame] | 511 | // Flaky: http://crbug.com/120470 |
[email protected] | b00c5a33 | 2012-03-30 21:14:07 | [diff] [blame] | 512 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(DISABLED_UDPSocketPrivate) |
[email protected] | e33facb | 2012-03-27 20:50:54 | [diff] [blame] | 513 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(DISABLED_UDPSocketPrivate) |
[email protected] | e5edf61 | 2012-03-30 14:33:35 | [diff] [blame] | 514 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_UDPSocketPrivate) |
[email protected] | ef5e98e | 2011-12-06 09:49:18 | [diff] [blame] | 515 | |
[email protected] | 50da420 | 2012-03-11 11:07:12 | [diff] [blame] | 516 | TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(TCPServerSocketPrivateDisallowed) |
[email protected] | 24050234 | 2011-12-22 20:07:49 | [diff] [blame] | 517 | TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(TCPSocketPrivateDisallowed) |
| 518 | TEST_PPAPI_NACL_VIA_HTTP_DISALLOWED_SOCKETS(UDPSocketPrivateDisallowed) |
| 519 | |
[email protected] | 20e3112 | 2012-02-22 15:56:03 | [diff] [blame] | 520 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(TCPServerSocketPrivate) |
[email protected] | 2d011e8 | 2012-03-15 09:39:56 | [diff] [blame] | 521 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(TCPServerSocketPrivate) |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 522 | // TODO(ygorshenin): http://crbug.com/116480. |
| 523 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_TCPServerSocketPrivate) |
[email protected] | 20e3112 | 2012-02-22 15:56:03 | [diff] [blame] | 524 | |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 525 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(HostResolverPrivate_Create) |
[email protected] | 2493110 | 2012-03-15 01:21:27 | [diff] [blame] | 526 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(HostResolverPrivate_Resolve) |
| 527 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(HostResolverPrivate_ResolveIPV4) |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 528 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_Create) |
[email protected] | 2493110 | 2012-03-15 01:21:27 | [diff] [blame] | 529 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_Resolve) |
| 530 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(HostResolverPrivate_ResolveIPV4) |
| 531 | |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 532 | // Undeterministically can't be found on Windows. http://crbug.com/119260 |
| 533 | #if defined(OS_WIN) |
| 534 | #define MAYBE_HostResolverPrivate_Create \ |
| 535 | DISABLED_HostResolverPrivate_Create |
| 536 | #define MAYBE_HostResolverPrivate_Resolve \ |
| 537 | DISABLED_HostResolverPrivate_Resolve |
| 538 | #define MAYBE_HostResolverPrivate_ResolveIPV4 \ |
| 539 | DISABLED_HostResolverPrivate_ResolveIPV4 |
| 540 | #else |
| 541 | #define MAYBE_HostResolverPrivate_Create \ |
| 542 | HostResolverPrivate_Create |
| 543 | #define MAYBE_HostResolverPrivate_Resolve \ |
| 544 | HostResolverPrivate_Resolve |
| 545 | #define MAYBE_HostResolverPrivate_ResolveIPV4 \ |
| 546 | HostResolverPrivate_ResolveIPV4 |
| 547 | #endif |
| 548 | |
| 549 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_HostResolverPrivate_Create) |
| 550 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_HostResolverPrivate_Resolve) |
| 551 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_HostResolverPrivate_ResolveIPV4) |
| 552 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 553 | // URLLoader tests. |
| 554 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicGET) |
| 555 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicPOST) |
| 556 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicFilePOST) |
| 557 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BasicFileRangePOST) |
| 558 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 559 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 560 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 561 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 562 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 563 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_StreamToFile) |
| 564 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 565 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedSameOriginRestriction) |
| 566 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
| 567 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedCrossOriginRequest) |
| 568 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
| 569 | // TODO(bbudge) Fix Javascript URLs for trusted loaders. |
| 570 | // http://crbug.com/103062 |
| 571 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FAILS_URLLoader_TrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 572 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
| 573 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_TrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 574 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 575 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 576 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_AbortCalls) |
| 577 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_UntendedLoad) |
[email protected] | 94af057 | 2012-01-17 22:10:14 | [diff] [blame] | 578 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLLoader_PrefetchBufferThreshold) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 579 | |
| 580 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicGET) |
| 581 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicPOST) |
[email protected] | 5667e12 | 2012-01-11 21:27:45 | [diff] [blame] | 582 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicFilePOST) |
| 583 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BasicFileRangePOST) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 584 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 585 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 586 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 587 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 588 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 589 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_StreamToFile) |
| 590 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 591 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedSameOriginRestriction) |
| 592 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
| 593 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedCrossOriginRequest) |
| 594 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
| 595 | // TODO(bbudge) Fix Javascript URLs for trusted loaders. |
| 596 | // http://crbug.com/103062 |
| 597 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP( |
| 598 | FAILS_URLLoader_TrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 599 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
| 600 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_TrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 601 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 602 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 603 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_AbortCalls) |
| 604 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLLoader_UntendedLoad) |
| 605 | |
| 606 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicGET) |
| 607 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicPOST) |
| 608 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicFilePOST) |
| 609 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BasicFileRangePOST) |
| 610 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_CompoundBodyPOST) |
| 611 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_EmptyDataPOST) |
| 612 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_BinaryDataPOST) |
| 613 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_CustomRequestHeader) |
| 614 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_FailsBogusContentLength) |
| 615 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_StreamToFile) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 616 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedSameOriginRestriction) |
| 617 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedCrossOriginRequest) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 618 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedJavascriptURLRestriction) |
[email protected] | 91ebba3 | 2011-12-08 01:35:42 | [diff] [blame] | 619 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntrustedHttpRestriction) |
[email protected] | c95b4579 | 2011-12-08 23:54:18 | [diff] [blame] | 620 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_FollowURLRedirect) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 621 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_AuditURLRedirect) |
| 622 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_AbortCalls) |
| 623 | TEST_PPAPI_NACL_VIA_HTTP(URLLoader_UntendedLoad) |
[email protected] | 1ff90a8 | 2011-11-22 21:51:49 | [diff] [blame] | 624 | |
[email protected] | a333c23 | 2012-01-27 23:14:27 | [diff] [blame] | 625 | // URLRequestInfo tests. |
| 626 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 627 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 628 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_CreateAndIsURLRequestInfo) |
| 629 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_SetProperty) |
| 630 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_SetProperty) |
| 631 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_SetProperty) |
| 632 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody) |
| 633 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_AppendDataToBody) |
| 634 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_AppendDataToBody) |
| 635 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 636 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(URLRequest_Stress) |
| 637 | TEST_PPAPI_NACL_VIA_HTTP(URLRequest_Stress) |
| 638 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 639 | TEST_PPAPI_IN_PROCESS(PaintAggregator) |
[email protected] | 1ff90a8 | 2011-11-22 21:51:49 | [diff] [blame] | 640 | TEST_PPAPI_OUT_OF_PROCESS(PaintAggregator) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 641 | TEST_PPAPI_NACL_VIA_HTTP(PaintAggregator) |
[email protected] | 2f0e64e | 2010-07-08 22:10:22 | [diff] [blame] | 642 | |
[email protected] | 15fc79cc | 2012-02-22 23:27:52 | [diff] [blame] | 643 | // TODO(danakj): http://crbug.com/115286 |
[email protected] | a69e8214 | 2012-02-22 16:47:28 | [diff] [blame] | 644 | TEST_PPAPI_IN_PROCESS(DISABLED_Scrollbar) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 645 | // http://crbug.com/89961 |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 646 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, FAILS_Scrollbar) { |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 647 | RunTest("Scrollbar"); |
| 648 | } |
[email protected] | 15fc79cc | 2012-02-22 23:27:52 | [diff] [blame] | 649 | // TODO(danakj): http://crbug.com/115286 |
| 650 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_Scrollbar) |
[email protected] | 39ef434 | 2010-08-05 22:56:03 | [diff] [blame] | 651 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 652 | TEST_PPAPI_IN_PROCESS(URLUtil) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 653 | TEST_PPAPI_OUT_OF_PROCESS(URLUtil) |
[email protected] | e1333fb | 2010-08-22 04:54:00 | [diff] [blame] | 654 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 655 | TEST_PPAPI_IN_PROCESS(CharSet) |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 656 | TEST_PPAPI_OUT_OF_PROCESS(CharSet) |
[email protected] | 167b0dd1 | 2010-09-30 20:00:40 | [diff] [blame] | 657 | |
[email protected] | 947bcaf | 2011-11-22 21:56:04 | [diff] [blame] | 658 | TEST_PPAPI_IN_PROCESS(Crypto) |
[email protected] | 8e66338e | 2011-11-22 21:57:17 | [diff] [blame] | 659 | TEST_PPAPI_OUT_OF_PROCESS(Crypto) |
[email protected] | 8d770e49 | 2011-10-11 04:54:31 | [diff] [blame] | 660 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 661 | TEST_PPAPI_IN_PROCESS(Var) |
[email protected] | 608fcb9 | 2011-12-02 20:44:59 | [diff] [blame] | 662 | TEST_PPAPI_OUT_OF_PROCESS(Var) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 663 | TEST_PPAPI_NACL_VIA_HTTP(Var) |
[email protected] | 0925622c | 2011-06-08 20:22:02 | [diff] [blame] | 664 | |
[email protected] | d560c6f5 | 2012-03-30 15:08:57 | [diff] [blame] | 665 | // Flaky on mac, http://crbug.com/121107 |
| 666 | #if defined(OS_MACOSX) |
| 667 | #define MAYBE_VarDeprecated DISABLED_VarDeprecated |
| 668 | #else |
| 669 | #define MAYBE_VarDeprecated VarDeprecated |
| 670 | #endif |
| 671 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 672 | TEST_PPAPI_IN_PROCESS(VarDeprecated) |
[email protected] | d560c6f5 | 2012-03-30 15:08:57 | [diff] [blame] | 673 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_VarDeprecated) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 674 | |
[email protected] | b20df1c | 2011-08-03 14:38:24 | [diff] [blame] | 675 | // Windows defines 'PostMessage', so we have to undef it. |
| 676 | #ifdef PostMessage |
| 677 | #undef PostMessage |
| 678 | #endif |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 679 | TEST_PPAPI_IN_PROCESS(PostMessage_SendInInit) |
| 680 | TEST_PPAPI_IN_PROCESS(PostMessage_SendingData) |
[email protected] | 15fc79cc | 2012-02-22 23:27:52 | [diff] [blame] | 681 | // TODO(danakj): http://crbug.com/115286 |
| 682 | TEST_PPAPI_IN_PROCESS(DISABLED_PostMessage_SendingArrayBuffer) |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 683 | TEST_PPAPI_IN_PROCESS(PostMessage_MessageEvent) |
| 684 | TEST_PPAPI_IN_PROCESS(PostMessage_NoHandler) |
| 685 | TEST_PPAPI_IN_PROCESS(PostMessage_ExtraParam) |
| 686 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendInInit) |
| 687 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendingData) |
[email protected] | 10305deb | 2012-02-16 19:39:22 | [diff] [blame] | 688 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_SendingArrayBuffer) |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 689 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_MessageEvent) |
| 690 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_NoHandler) |
| 691 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_ExtraParam) |
[email protected] | d6783d5ac | 2012-03-29 23:27:57 | [diff] [blame] | 692 | #if !defined(OS_WIN) && !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) |
| 693 | // Times out on Windows XP, Windows 7, and Linux x64: http://crbug.com/95557 |
[email protected] | 2622d6b | 2011-11-16 04:28:02 | [diff] [blame] | 694 | TEST_PPAPI_OUT_OF_PROCESS(PostMessage_NonMainThread) |
[email protected] | 924071b | 2012-02-10 01:54:07 | [diff] [blame] | 695 | #endif |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 696 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_SendInInit) |
| 697 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_SendingData) |
[email protected] | 2048666c | 2012-03-11 05:38:34 | [diff] [blame] | 698 | TEST_PPAPI_NACL_VIA_HTTP(SLOW_PostMessage_SendingArrayBuffer) |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 699 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_MessageEvent) |
| 700 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_NoHandler) |
[email protected] | 396e3fd | 2012-02-09 18:46:10 | [diff] [blame] | 701 | |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 702 | #if defined(OS_WIN) |
| 703 | // Flaky: http://crbug.com/111209 |
| 704 | // |
| 705 | // Note from sheriffs miket and syzm: we're not convinced that this test is |
| 706 | // directly to blame for the flakiness. It's possible that it's a more general |
| 707 | // problem that is exposing itself only with one of the later tests in this |
| 708 | // series. |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 709 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_PostMessage_ExtraParam) |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 710 | #else |
[email protected] | 0861010 | 2011-12-17 14:24:30 | [diff] [blame] | 711 | TEST_PPAPI_NACL_VIA_HTTP(PostMessage_ExtraParam) |
[email protected] | 976976e1 | 2012-01-24 20:08:08 | [diff] [blame] | 712 | #endif |
[email protected] | f1ced92 | 2011-03-26 20:56:35 | [diff] [blame] | 713 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 714 | TEST_PPAPI_IN_PROCESS(Memory) |
| 715 | TEST_PPAPI_OUT_OF_PROCESS(Memory) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 716 | TEST_PPAPI_NACL_VIA_HTTP(Memory) |
[email protected] | 14710e22 | 2011-07-05 21:37:00 | [diff] [blame] | 717 | |
[email protected] | 7ace8ad | 2011-08-06 03:23:58 | [diff] [blame] | 718 | TEST_PPAPI_IN_PROCESS(VideoDecoder) |
| 719 | TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder) |
| 720 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 721 | // Touch and SetLength fail on Mac and Linux due to sandbox restrictions. |
| 722 | // http://crbug.com/101128 |
| 723 | #if defined(OS_MACOSX) || defined(OS_LINUX) |
| 724 | #define MAYBE_FileIO_ReadWriteSetLength DISABLED_FileIO_ReadWriteSetLength |
| 725 | #define MAYBE_FileIO_TouchQuery DISABLED_FileIO_TouchQuery |
| 726 | #define MAYBE_FileIO_WillWriteWillSetLength \ |
| 727 | DISABLED_FileIO_WillWriteWillSetLength |
| 728 | #else |
| 729 | #define MAYBE_FileIO_ReadWriteSetLength FileIO_ReadWriteSetLength |
| 730 | #define MAYBE_FileIO_TouchQuery FileIO_TouchQuery |
| 731 | #define MAYBE_FileIO_WillWriteWillSetLength FileIO_WillWriteWillSetLength |
| 732 | #endif |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 733 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 734 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_Open) |
| 735 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_AbortCalls) |
| 736 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_ParallelReads) |
| 737 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_ParallelWrites) |
| 738 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 739 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 740 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 741 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(MAYBE_FileIO_WillWriteWillSetLength) |
| 742 | |
[email protected] | 694878de | 2011-12-21 20:22:14 | [diff] [blame] | 743 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_Open) |
| 744 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_AbortCalls) |
| 745 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_ParallelReads) |
| 746 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_ParallelWrites) |
| 747 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 748 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 749 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 750 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(MAYBE_FileIO_WillWriteWillSetLength) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 751 | |
[email protected] | 71e270e | 2012-03-30 14:52:49 | [diff] [blame] | 752 | // PPAPINaclTest.FileIO_ParallelReads is flaky on Mac. http://crbug.com/121104 |
| 753 | #if defined(OS_MACOSX) |
| 754 | #define MAYBE_FileIO_ParallelReads DISABLED_FileIO_ParallelReads |
| 755 | #else |
| 756 | #define MAYBE_FileIO_ParallelReads FileIO_ParallelReads |
| 757 | #endif |
| 758 | |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 759 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_Open) |
| 760 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_AbortCalls) |
[email protected] | 71e270e | 2012-03-30 14:52:49 | [diff] [blame] | 761 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_FileIO_ParallelReads) |
[email protected] | d406742 | 2011-12-07 05:24:24 | [diff] [blame] | 762 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_ParallelWrites) |
| 763 | TEST_PPAPI_NACL_VIA_HTTP(FileIO_NotAllowMixedReadWrite) |
| 764 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_FileIO_TouchQuery) |
| 765 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_FileIO_ReadWriteSetLength) |
| 766 | // The following test requires PPB_FileIO_Trusted, not available in NaCl. |
| 767 | TEST_PPAPI_NACL_VIA_HTTP(DISABLED_FileIO_WillWriteWillSetLength) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 768 | |
[email protected] | d8eba1a | 2011-07-20 21:41:55 | [diff] [blame] | 769 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileRef) |
[email protected] | cc6db92 | 2011-12-10 16:54:22 | [diff] [blame] | 770 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileRef) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 771 | TEST_PPAPI_NACL_VIA_HTTP(FileRef) |
| 772 | |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 773 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(FileSystem) |
[email protected] | 0fe6c242 | 2011-09-07 20:20:41 | [diff] [blame] | 774 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(FileSystem) |
[email protected] | cee34b7 | 2011-11-18 21:52:40 | [diff] [blame] | 775 | TEST_PPAPI_NACL_VIA_HTTP(FileSystem) |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 776 | |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 777 | // Mac/Aura reach NOTIMPLEMENTED/time out. |
| 778 | // Other systems work in-process, but flake out-of-process because of the |
| 779 | // asyncronous nature of the proxy. |
| 780 | // mac: http://crbug.com/96767 |
| 781 | // aura: http://crbug.com/104384 |
| 782 | // async flakiness: http://crbug.com/108471 |
| 783 | #if defined(OS_MACOSX) || defined(USE_AURA) |
[email protected] | 81a33d9 | 2011-12-20 01:13:03 | [diff] [blame] | 784 | #define MAYBE_FlashFullscreen DISABLED_FlashFullscreen |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 785 | #define MAYBE_OutOfProcessFlashFullscreen DISABLED_FlashFullscreen |
[email protected] | 155be09 | 2011-11-16 04:34:59 | [diff] [blame] | 786 | #else |
[email protected] | 61d2eea | 2012-01-12 03:08:53 | [diff] [blame] | 787 | #define MAYBE_FlashFullscreen FlashFullscreen |
[email protected] | b6a9ecc | 2012-01-30 23:17:40 | [diff] [blame] | 788 | #define MAYBE_OutOfProcessFlashFullscreen FlashFullscreen |
[email protected] | 155be09 | 2011-11-16 04:34:59 | [diff] [blame] | 789 | #endif |
| 790 | |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 791 | IN_PROC_BROWSER_TEST_F(PPAPITest, MAYBE_FlashFullscreen) { |
[email protected] | 06e0a34 | 2011-09-27 04:24:30 | [diff] [blame] | 792 | RunTestViaHTTP("FlashFullscreen"); |
| 793 | } |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 794 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, MAYBE_OutOfProcessFlashFullscreen) { |
[email protected] | 06e0a34 | 2011-09-27 04:24:30 | [diff] [blame] | 795 | RunTestViaHTTP("FlashFullscreen"); |
| 796 | } |
[email protected] | 400d9e9 | 2011-12-08 22:54:26 | [diff] [blame] | 797 | |
[email protected] | 3b98ced7 | 2012-03-09 02:08:33 | [diff] [blame] | 798 | TEST_PPAPI_IN_PROCESS_VIA_HTTP(Fullscreen) |
[email protected] | 5d50f86 | 2012-03-14 05:23:37 | [diff] [blame] | 799 | TEST_PPAPI_OUT_OF_PROCESS_VIA_HTTP(Fullscreen) |
[email protected] | 6d54e2ed | 2011-09-15 23:02:04 | [diff] [blame] | 800 | |
[email protected] | 3c149c6 | 2011-11-11 23:22:52 | [diff] [blame] | 801 | TEST_PPAPI_IN_PROCESS(FlashClipboard) |
| 802 | TEST_PPAPI_OUT_OF_PROCESS(FlashClipboard) |
[email protected] | fe833c9 | 2011-10-22 16:13:22 | [diff] [blame] | 803 | |
[email protected] | de289526 | 2012-04-04 17:15:48 | [diff] [blame^] | 804 | TEST_PPAPI_IN_PROCESS(X509CertificatePrivate) |
| 805 | TEST_PPAPI_OUT_OF_PROCESS(X509CertificatePrivate) |
| 806 | |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 807 | // http://crbug.com/63239 |
[email protected] | 35f0598 | 2011-06-09 20:38:01 | [diff] [blame] | 808 | #if defined(OS_POSIX) |
[email protected] | 0caf230 | 2012-02-14 21:35:25 | [diff] [blame] | 809 | #define MAYBE_DirectoryReader DISABLED_DirectoryReader |
[email protected] | 09283b7 | 2011-06-01 16:04:29 | [diff] [blame] | 810 | #else |
| 811 | #define MAYBE_DirectoryReader DirectoryReader |
| 812 | #endif |
| 813 | |
[email protected] | 35f0598 | 2011-06-09 20:38:01 | [diff] [blame] | 814 | // Flaky on Mac + Linux, maybe http://codereview.chromium.org/7094008 |
[email protected] | a367e28 | 2011-12-02 19:13:25 | [diff] [blame] | 815 | // Not implemented out of process: http://crbug.com/106129 |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 816 | IN_PROC_BROWSER_TEST_F(PPAPITest, MAYBE_DirectoryReader) { |
[email protected] | 3ed0969 | 2010-11-13 00:28:17 | [diff] [blame] | 817 | RunTestViaHTTP("DirectoryReader"); |
| 818 | } |
[email protected] | 9b4cb19 | 2011-02-16 00:17:22 | [diff] [blame] | 819 | |
[email protected] | c462d12 | 2011-05-25 01:54:04 | [diff] [blame] | 820 | #if defined(ENABLE_P2P_APIS) |
[email protected] | ff8de996 | 2011-08-31 23:23:57 | [diff] [blame] | 821 | // Flaky. http://crbug.com/84294 |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 822 | IN_PROC_BROWSER_TEST_F(PPAPITest, DISABLED_Transport) { |
[email protected] | 9b4cb19 | 2011-02-16 00:17:22 | [diff] [blame] | 823 | RunTest("Transport"); |
| 824 | } |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 825 | // http://crbug.com/89961 |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 826 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, DISABLED_Transport) { |
[email protected] | c4d5960e5 | 2011-07-21 21:47:43 | [diff] [blame] | 827 | RunTestViaHTTP("Transport"); |
| 828 | } |
[email protected] | c462d12 | 2011-05-25 01:54:04 | [diff] [blame] | 829 | #endif // ENABLE_P2P_APIS |
[email protected] | 3105048 | 2011-07-22 17:03:19 | [diff] [blame] | 830 | |
[email protected] | 02ab09c3 | 2011-11-29 18:59:44 | [diff] [blame] | 831 | // There is no proxy. This is used for PDF metrics reporting, and PDF only |
| 832 | // runs in process, so there's currently no need for a proxy. |
[email protected] | 3105048 | 2011-07-22 17:03:19 | [diff] [blame] | 833 | TEST_PPAPI_IN_PROCESS(UMA) |
[email protected] | 87f3637 | 2011-11-11 20:49:01 | [diff] [blame] | 834 | |
[email protected] | ba35935 | 2011-11-22 00:24:13 | [diff] [blame] | 835 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_AreEqual) |
| 836 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_AreHostsEqual) |
| 837 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_Describe) |
| 838 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_ReplacePort) |
| 839 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetAnyAddress) |
| 840 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_DescribeIPv6) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 841 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetFamily) |
| 842 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetPort) |
| 843 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetAddress) |
[email protected] | b13deef8 | 2012-03-22 22:41:06 | [diff] [blame] | 844 | TEST_PPAPI_IN_PROCESS(NetAddressPrivate_GetScopeID) |
[email protected] | ba35935 | 2011-11-22 00:24:13 | [diff] [blame] | 845 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_AreEqual) |
| 846 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_AreHostsEqual) |
| 847 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_Describe) |
| 848 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_ReplacePort) |
| 849 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetAnyAddress) |
| 850 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_DescribeIPv6) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 851 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetFamily) |
| 852 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetPort) |
| 853 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetAddress) |
[email protected] | b13deef8 | 2012-03-22 22:41:06 | [diff] [blame] | 854 | TEST_PPAPI_OUT_OF_PROCESS(NetAddressPrivate_GetScopeID) |
[email protected] | cfff9eb8 | 2011-11-15 03:17:10 | [diff] [blame] | 855 | |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 856 | // Frequently timing out on Windows. http://crbug.com/115440 |
| 857 | #if defined(OS_WIN) |
| 858 | #define MAYBE_NetAddressPrivateUntrusted_Describe \ |
| 859 | DISABLED_NetAddressPrivateUntrusted_Describe |
| 860 | #define MAYBE_NetAddressPrivateUntrusted_ReplacePort \ |
| 861 | DISABLED_NetAddressPrivateUntrusted_ReplacePort |
| 862 | #define MAYBE_NetAddressPrivateUntrusted_GetPort \ |
| 863 | DISABLED_NetAddressPrivateUntrusted_GetPort |
| 864 | #else |
| 865 | #define MAYBE_NetAddressPrivateUntrusted_Describe \ |
| 866 | NetAddressPrivateUntrusted_Describe |
| 867 | #define MAYBE_NetAddressPrivateUntrusted_ReplacePort \ |
| 868 | NetAddressPrivateUntrusted_ReplacePort |
| 869 | #define MAYBE_NetAddressPrivateUntrusted_GetPort \ |
| 870 | NetAddressPrivateUntrusted_GetPort |
| 871 | #endif |
| 872 | |
[email protected] | 9e855c0a | 2012-01-18 13:36:55 | [diff] [blame] | 873 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_AreEqual) |
| 874 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_AreHostsEqual) |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 875 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_NetAddressPrivateUntrusted_Describe) |
| 876 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_NetAddressPrivateUntrusted_ReplacePort) |
[email protected] | 9e855c0a | 2012-01-18 13:36:55 | [diff] [blame] | 877 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetAnyAddress) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 878 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetFamily) |
[email protected] | f3ae866d | 2012-03-22 13:08:00 | [diff] [blame] | 879 | TEST_PPAPI_NACL_VIA_HTTP(MAYBE_NetAddressPrivateUntrusted_GetPort) |
[email protected] | ee9bdfce | 2012-02-09 00:04:09 | [diff] [blame] | 880 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetAddress) |
[email protected] | d2cbdbbdb | 2012-03-26 19:52:09 | [diff] [blame] | 881 | TEST_PPAPI_NACL_VIA_HTTP(NetAddressPrivateUntrusted_GetScopeID) |
[email protected] | 9e855c0a | 2012-01-18 13:36:55 | [diff] [blame] | 882 | |
[email protected] | 2e80d0548 | 2012-03-13 00:10:41 | [diff] [blame] | 883 | TEST_PPAPI_IN_PROCESS(NetworkMonitorPrivate_Basic) |
[email protected] | 5b9b80e | 2012-03-20 20:19:39 | [diff] [blame] | 884 | TEST_PPAPI_OUT_OF_PROCESS(NetworkMonitorPrivate_Basic) |
[email protected] | 2e80d0548 | 2012-03-13 00:10:41 | [diff] [blame] | 885 | TEST_PPAPI_IN_PROCESS(NetworkMonitorPrivate_2Monitors) |
[email protected] | 5b9b80e | 2012-03-20 20:19:39 | [diff] [blame] | 886 | TEST_PPAPI_OUT_OF_PROCESS(NetworkMonitorPrivate_2Monitors) |
| 887 | TEST_PPAPI_IN_PROCESS(NetworkMonitorPrivate_DeleteInCallback) |
| 888 | TEST_PPAPI_OUT_OF_PROCESS(NetworkMonitorPrivate_DeleteInCallback) |
[email protected] | 3983280 | 2012-03-21 18:55:08 | [diff] [blame] | 889 | TEST_PPAPI_IN_PROCESS(NetworkMonitorPrivate_ListObserver) |
| 890 | TEST_PPAPI_OUT_OF_PROCESS(NetworkMonitorPrivate_ListObserver) |
[email protected] | 2e80d0548 | 2012-03-13 00:10:41 | [diff] [blame] | 891 | |
[email protected] | d67f5ae | 2011-11-17 22:41:52 | [diff] [blame] | 892 | TEST_PPAPI_IN_PROCESS(Flash_SetInstanceAlwaysOnTop) |
| 893 | TEST_PPAPI_IN_PROCESS(Flash_GetProxyForURL) |
| 894 | TEST_PPAPI_IN_PROCESS(Flash_MessageLoop) |
| 895 | TEST_PPAPI_IN_PROCESS(Flash_GetLocalTimeZoneOffset) |
| 896 | TEST_PPAPI_IN_PROCESS(Flash_GetCommandLineArgs) |
| 897 | TEST_PPAPI_OUT_OF_PROCESS(Flash_SetInstanceAlwaysOnTop) |
| 898 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetProxyForURL) |
| 899 | TEST_PPAPI_OUT_OF_PROCESS(Flash_MessageLoop) |
| 900 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetLocalTimeZoneOffset) |
| 901 | TEST_PPAPI_OUT_OF_PROCESS(Flash_GetCommandLineArgs) |
[email protected] | 081d147b | 2011-11-18 05:51:54 | [diff] [blame] | 902 | |
[email protected] | 081d147b | 2011-11-18 05:51:54 | [diff] [blame] | 903 | TEST_PPAPI_IN_PROCESS(WebSocket_IsWebSocket) |
[email protected] | a1cff78 | 2011-12-06 18:06:34 | [diff] [blame] | 904 | TEST_PPAPI_IN_PROCESS(WebSocket_UninitializedPropertiesAccess) |
[email protected] | 65f6b00 | 2011-12-01 07:44:11 | [diff] [blame] | 905 | TEST_PPAPI_IN_PROCESS(WebSocket_InvalidConnect) |
[email protected] | 32b05b1 | 2011-12-09 04:26:28 | [diff] [blame] | 906 | TEST_PPAPI_IN_PROCESS(WebSocket_Protocols) |
[email protected] | 65f6b00 | 2011-12-01 07:44:11 | [diff] [blame] | 907 | TEST_PPAPI_IN_PROCESS(WebSocket_GetURL) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 908 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_ValidConnect) |
| 909 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_InvalidClose) |
| 910 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_ValidClose) |
| 911 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_GetProtocol) |
| 912 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_TextSendReceive) |
| 913 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_BinarySendReceive) |
[email protected] | 3f915fae | 2012-03-26 11:13:29 | [diff] [blame] | 914 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_StressedSendReceive) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 915 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_BufferedAmount) |
[email protected] | 3f915fae | 2012-03-26 11:13:29 | [diff] [blame] | 916 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_CcInterfaces) |
[email protected] | 2785cb9 | 2012-02-29 20:22:09 | [diff] [blame] | 917 | TEST_PPAPI_IN_PROCESS(WebSocket_UtilityInvalidConnect) |
| 918 | TEST_PPAPI_IN_PROCESS(WebSocket_UtilityProtocols) |
| 919 | TEST_PPAPI_IN_PROCESS(WebSocket_UtilityGetURL) |
| 920 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityValidConnect) |
| 921 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityInvalidClose) |
| 922 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityValidClose) |
| 923 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityGetProtocol) |
| 924 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityTextSendReceive) |
| 925 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityBinarySendReceive) |
| 926 | TEST_PPAPI_IN_PROCESS_WITH_WS(WebSocket_UtilityBufferedAmount) |
[email protected] | 9082aa5b | 2012-01-19 08:44:47 | [diff] [blame] | 927 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_IsWebSocket) |
| 928 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_UninitializedPropertiesAccess) |
| 929 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_InvalidConnect) |
| 930 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_Protocols) |
| 931 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_GetURL) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 932 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_ValidConnect) |
| 933 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_InvalidClose) |
| 934 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_ValidClose) |
| 935 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_GetProtocol) |
| 936 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_TextSendReceive) |
| 937 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_BinarySendReceive) |
[email protected] | 3f915fae | 2012-03-26 11:13:29 | [diff] [blame] | 938 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_StressedSendReceive) |
[email protected] | 2e4b7ab | 2012-01-25 13:28:07 | [diff] [blame] | 939 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_BufferedAmount) |
[email protected] | 3f915fae | 2012-03-26 11:13:29 | [diff] [blame] | 940 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_CcInterfaces) |
[email protected] | 2785cb9 | 2012-02-29 20:22:09 | [diff] [blame] | 941 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_UtilityInvalidConnect) |
| 942 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_UtilityProtocols) |
| 943 | TEST_PPAPI_NACL_VIA_HTTP(WebSocket_UtilityGetURL) |
| 944 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityValidConnect) |
| 945 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityInvalidClose) |
| 946 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityValidClose) |
| 947 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityGetProtocol) |
| 948 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityTextSendReceive) |
| 949 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityBinarySendReceive) |
| 950 | TEST_PPAPI_NACL_VIA_HTTP_WITH_WS(WebSocket_UtilityBufferedAmount) |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 951 | |
[email protected] | c3d0621 | 2011-12-01 00:40:52 | [diff] [blame] | 952 | TEST_PPAPI_IN_PROCESS(AudioConfig_ValidConfigs) |
| 953 | TEST_PPAPI_IN_PROCESS(AudioConfig_InvalidConfigs) |
| 954 | TEST_PPAPI_OUT_OF_PROCESS(AudioConfig_ValidConfigs) |
| 955 | TEST_PPAPI_OUT_OF_PROCESS(AudioConfig_InvalidConfigs) |
[email protected] | 65bc6036 | 2011-11-30 06:20:37 | [diff] [blame] | 956 | |
[email protected] | 94d1a7b1 | 2012-03-13 10:04:54 | [diff] [blame] | 957 | // PPAPITest.Audio_Creation fails on Linux & Mac try servers. |
| 958 | // http://crbug.com/114712 |
| 959 | #if defined(OS_LINUX) || defined(OS_MACOSX) |
[email protected] | 371a7b81 | 2012-02-17 02:35:20 | [diff] [blame] | 960 | #define MAYBE_Audio_Creation DISABLED_Audio_Creation |
| 961 | #else |
| 962 | #define MAYBE_Audio_Creation Audio_Creation |
| 963 | #endif |
| 964 | |
| 965 | TEST_PPAPI_IN_PROCESS(MAYBE_Audio_Creation) |
[email protected] | c6b2b7f | 2011-12-01 02:38:25 | [diff] [blame] | 966 | TEST_PPAPI_IN_PROCESS(Audio_DestroyNoStop) |
| 967 | TEST_PPAPI_IN_PROCESS(Audio_Failures) |
[email protected] | 530a3f0 | 2012-02-23 09:07:09 | [diff] [blame] | 968 | TEST_PPAPI_OUT_OF_PROCESS(MAYBE_Audio_Creation) |
[email protected] | c6b2b7f | 2011-12-01 02:38:25 | [diff] [blame] | 969 | TEST_PPAPI_OUT_OF_PROCESS(Audio_DestroyNoStop) |
| 970 | TEST_PPAPI_OUT_OF_PROCESS(Audio_Failures) |
| 971 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 972 | TEST_PPAPI_IN_PROCESS(View_CreateVisible); |
| 973 | TEST_PPAPI_OUT_OF_PROCESS(View_CreateVisible); |
| 974 | TEST_PPAPI_NACL_VIA_HTTP(View_CreateVisible); |
| 975 | // This test ensures that plugins created in a background tab have their |
| 976 | // initial visibility set to false. We don't bother testing in-process for this |
| 977 | // custom test since the out of process code also exercises in-process. |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 978 | |
| 979 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_CreateInvisible) { |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 980 | // Make a second tab in the foreground. |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 981 | GURL url = GetTestFileUrl("View_CreatedInvisible"); |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 982 | browser::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); |
| 983 | params.disposition = NEW_BACKGROUND_TAB; |
| 984 | ui_test_utils::NavigateToURL(¶ms); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 985 | } |
[email protected] | 6317990 | 2012-03-09 23:47:28 | [diff] [blame] | 986 | |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 987 | // This test messes with tab visibility so is custom. |
| 988 | IN_PROC_BROWSER_TEST_F(OutOfProcessPPAPITest, View_PageHideShow) { |
| 989 | // The plugin will be loaded in the foreground tab and will send us a message. |
| 990 | TestFinishObserver observer( |
| 991 | browser()->GetSelectedWebContents()->GetRenderViewHost(), |
[email protected] | 81ffaa823 | 2012-03-10 04:49:24 | [diff] [blame] | 992 | TestTimeouts::action_max_timeout_ms()); |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 993 | |
| 994 | GURL url = GetTestFileUrl("View_PageHideShow"); |
| 995 | ui_test_utils::NavigateToURL(browser(), url); |
| 996 | |
| 997 | ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; |
| 998 | EXPECT_STREQ("TestPageHideShow:Created", observer.result().c_str()); |
| 999 | observer.Reset(); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 1000 | |
| 1001 | // Make a new tab to cause the original one to hide, this should trigger the |
| 1002 | // next phase of the test. |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 1003 | browser::NavigateParams params( |
| 1004 | browser(), GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_LINK); |
| 1005 | params.disposition = NEW_FOREGROUND_TAB; |
| 1006 | ui_test_utils::NavigateToURL(¶ms); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 1007 | |
| 1008 | // Wait until the test acks that it got hidden. |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 1009 | ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; |
| 1010 | EXPECT_STREQ("TestPageHideShow:Hidden", observer.result().c_str()); |
[email protected] | 6317990 | 2012-03-09 23:47:28 | [diff] [blame] | 1011 | |
[email protected] | 81ffaa823 | 2012-03-10 04:49:24 | [diff] [blame] | 1012 | // Wait for the test completion event. |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 1013 | observer.Reset(); |
| 1014 | |
| 1015 | // Switch back to the test tab. |
| 1016 | browser()->ActivateTabAt(0, true); |
| 1017 | |
| 1018 | ASSERT_TRUE(observer.WaitForFinish()) << "Test timed out."; |
| 1019 | EXPECT_STREQ("PASS", observer.result().c_str()); |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 1020 | } |
[email protected] | f237c0f | 2012-03-10 07:49:10 | [diff] [blame] | 1021 | |
[email protected] | 09c37ba | 2012-01-05 18:00:33 | [diff] [blame] | 1022 | TEST_PPAPI_IN_PROCESS(View_SizeChange); |
| 1023 | TEST_PPAPI_OUT_OF_PROCESS(View_SizeChange); |
| 1024 | TEST_PPAPI_NACL_VIA_HTTP(View_SizeChange); |
| 1025 | TEST_PPAPI_IN_PROCESS(View_ClipChange); |
| 1026 | TEST_PPAPI_OUT_OF_PROCESS(View_ClipChange); |
| 1027 | TEST_PPAPI_NACL_VIA_HTTP(View_ClipChange); |
| 1028 | |
[email protected] | 6117b82da | 2012-01-07 00:51:01 | [diff] [blame] | 1029 | TEST_PPAPI_IN_PROCESS(ResourceArray_Basics) |
| 1030 | TEST_PPAPI_IN_PROCESS(ResourceArray_OutOfRangeAccess) |
| 1031 | TEST_PPAPI_IN_PROCESS(ResourceArray_EmptyArray) |
| 1032 | TEST_PPAPI_IN_PROCESS(ResourceArray_InvalidElement) |
| 1033 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_Basics) |
| 1034 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_OutOfRangeAccess) |
| 1035 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_EmptyArray) |
| 1036 | TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_InvalidElement) |
| 1037 | |
[email protected] | cd2af39 | 2012-01-31 09:19:17 | [diff] [blame] | 1038 | TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) |
| 1039 | TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) |
| 1040 | TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) |
| 1041 | TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) |
| 1042 | |
[email protected] | a9d504a | 2011-11-22 22:46:47 | [diff] [blame] | 1043 | #endif // ADDRESS_SANITIZER |