OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 347 } |
348 | 348 |
349 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PluginThreadAsyncCall)) { | 349 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PluginThreadAsyncCall)) { |
350 LoadAndWait(GetURL("plugin_thread_async_call.html")); | 350 LoadAndWait(GetURL("plugin_thread_async_call.html")); |
351 } | 351 } |
352 | 352 |
353 IN_PROC_BROWSER_TEST_F(PluginTest, PluginSingleRangeRequest) { | 353 IN_PROC_BROWSER_TEST_F(PluginTest, PluginSingleRangeRequest) { |
354 LoadAndWait(GetURL("plugin_single_range_request.html")); | 354 LoadAndWait(GetURL("plugin_single_range_request.html")); |
355 } | 355 } |
356 | 356 |
| 357 #if !defined(OS_WIN) // http://crbug.com/396373 |
357 // Test checking the privacy mode is on. | 358 // Test checking the privacy mode is on. |
358 // If this flakes on Linux, use http://crbug.com/104380 | 359 // If this flakes on Linux, use http://crbug.com/104380 |
359 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PrivateEnabled)) { | 360 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PrivateEnabled)) { |
360 GURL url = GetURL("private.html"); | 361 GURL url = GetURL("private.html"); |
361 url = GURL(url.spec() + "?private"); | 362 url = GURL(url.spec() + "?private"); |
362 LoadAndWaitInWindow(CreateOffTheRecordBrowser(), url); | 363 LoadAndWaitInWindow(CreateOffTheRecordBrowser(), url); |
363 } | 364 } |
| 365 #endif |
364 | 366 |
365 #if defined(OS_WIN) || defined(OS_MACOSX) | 367 // These used to run on Windows: http://crbug.com/396373 |
| 368 #if defined(OS_MACOSX) |
366 // Test a browser hang due to special case of multiple | 369 // Test a browser hang due to special case of multiple |
367 // plugin instances indulged in sync calls across renderer. | 370 // plugin instances indulged in sync calls across renderer. |
368 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(MultipleInstancesSyncCalls)) { | 371 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(MultipleInstancesSyncCalls)) { |
369 LoadAndWait(GetURL("multiple_instances_sync_calls.html")); | 372 LoadAndWait(GetURL("multiple_instances_sync_calls.html")); |
370 } | 373 } |
371 #endif | |
372 | 374 |
373 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(GetURLRequestFailWrite)) { | 375 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(GetURLRequestFailWrite)) { |
374 GURL url(URLRequestMockHTTPJob::GetMockUrl( | 376 GURL url(URLRequestMockHTTPJob::GetMockUrl( |
375 base::FilePath().AppendASCII("npapi"). | 377 base::FilePath().AppendASCII("npapi"). |
376 AppendASCII("plugin_url_request_fail_write.html"))); | 378 AppendASCII("plugin_url_request_fail_write.html"))); |
377 LoadAndWait(url); | 379 LoadAndWait(url); |
378 } | 380 } |
| 381 #endif |
379 | 382 |
380 #if defined(OS_WIN) | 383 #if defined(OS_WIN) |
381 // Flaky on Windows x86. http://crbug.com/388245 | 384 // Flaky on Windows x86. http://crbug.com/388245 |
382 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_EnsureScriptingWorksInDestroy) { | 385 IN_PROC_BROWSER_TEST_F(PluginTest, DISABLED_EnsureScriptingWorksInDestroy) { |
383 LoadAndWait(GetURL("ensure_scripting_works_in_destroy.html")); | 386 LoadAndWait(GetURL("ensure_scripting_works_in_destroy.html")); |
384 } | 387 } |
385 | 388 |
386 // This test uses a Windows Event to signal to the plugin that it should crash | 389 // This test uses a Windows Event to signal to the plugin that it should crash |
387 // on NP_Initialize. | 390 // on NP_Initialize. |
388 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(NoHangIfInitCrashes)) { | 391 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(NoHangIfInitCrashes)) { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 ResourceDispatcherHostDelegate* old_delegate = | 552 ResourceDispatcherHostDelegate* old_delegate = |
550 ResourceDispatcherHostImpl::Get()->delegate(); | 553 ResourceDispatcherHostImpl::Get()->delegate(); |
551 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); | 554 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); |
552 LoadAndWait(url); | 555 LoadAndWait(url); |
553 test_delegate.WaitForPluginRequest(); | 556 test_delegate.WaitForPluginRequest(); |
554 ASSERT_TRUE(test_delegate.found_cookie()); | 557 ASSERT_TRUE(test_delegate.found_cookie()); |
555 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); | 558 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); |
556 } | 559 } |
557 | 560 |
558 } // namespace content | 561 } // namespace content |
OLD | NEW |