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/files/file_util.h" | 6 #include "base/files/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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 LoadAndWait(GetURL("get_javascript_url.html")); | 235 LoadAndWait(GetURL("get_javascript_url.html")); |
236 } | 236 } |
237 | 237 |
238 // Test that calling GetURL with a javascript URL and target=_self | 238 // Test that calling GetURL with a javascript URL and target=_self |
239 // works properly when the plugin is embedded in a subframe. | 239 // works properly when the plugin is embedded in a subframe. |
240 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(GetJavaScriptURL2)) { | 240 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(GetJavaScriptURL2)) { |
241 LoadAndWait(GetURL("get_javascript_url2.html")); | 241 LoadAndWait(GetURL("get_javascript_url2.html")); |
242 } | 242 } |
243 | 243 |
244 // Test is flaky on linux/cros/win builders. http://crbug.com/71904 | 244 // Test is flaky on linux/cros/win builders. http://crbug.com/71904 |
| 245 #if !defined(OS_WIN) // http://crbug.com/412042 |
245 IN_PROC_BROWSER_TEST_F(PluginTest, GetURLRedirectNotification) { | 246 IN_PROC_BROWSER_TEST_F(PluginTest, GetURLRedirectNotification) { |
246 LoadAndWait(GetURL("geturl_redirect_notify.html")); | 247 LoadAndWait(GetURL("geturl_redirect_notify.html")); |
247 } | 248 } |
| 249 #endif |
248 | 250 |
249 // Tests that identity is preserved for NPObjects passed from a plugin | 251 // Tests that identity is preserved for NPObjects passed from a plugin |
250 // into JavaScript. | 252 // into JavaScript. |
251 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(NPObjectIdentity)) { | 253 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(NPObjectIdentity)) { |
252 LoadAndWait(GetURL("npobject_identity.html")); | 254 LoadAndWait(GetURL("npobject_identity.html")); |
253 } | 255 } |
254 | 256 |
255 // Tests that if an NPObject is proxies back to its original process, the | 257 // Tests that if an NPObject is proxies back to its original process, the |
256 // original pointer is returned and not a proxy. If this fails the plugin | 258 // original pointer is returned and not a proxy. If this fails the plugin |
257 // will crash. | 259 // will crash. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 } | 349 } |
348 | 350 |
349 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(ScheduleTimer)) { | 351 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(ScheduleTimer)) { |
350 LoadAndWait(GetURL("schedule_timer.html")); | 352 LoadAndWait(GetURL("schedule_timer.html")); |
351 } | 353 } |
352 | 354 |
353 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PluginThreadAsyncCall)) { | 355 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PluginThreadAsyncCall)) { |
354 LoadAndWait(GetURL("plugin_thread_async_call.html")); | 356 LoadAndWait(GetURL("plugin_thread_async_call.html")); |
355 } | 357 } |
356 | 358 |
| 359 #if !defined(OS_WIN) // http://crbug.com/412042 |
357 IN_PROC_BROWSER_TEST_F(PluginTest, PluginSingleRangeRequest) { | 360 IN_PROC_BROWSER_TEST_F(PluginTest, PluginSingleRangeRequest) { |
358 LoadAndWait(GetURL("plugin_single_range_request.html")); | 361 LoadAndWait(GetURL("plugin_single_range_request.html")); |
359 } | 362 } |
| 363 #endif |
360 | 364 |
361 #if !defined(OS_WIN) // http://crbug.com/396373 | 365 #if !defined(OS_WIN) // http://crbug.com/396373 |
362 // Test checking the privacy mode is on. | 366 // Test checking the privacy mode is on. |
363 // If this flakes on Linux, use http://crbug.com/104380 | 367 // If this flakes on Linux, use http://crbug.com/104380 |
364 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PrivateEnabled)) { | 368 IN_PROC_BROWSER_TEST_F(PluginTest, MAYBE(PrivateEnabled)) { |
365 GURL url = GetURL("private.html"); | 369 GURL url = GetURL("private.html"); |
366 url = GURL(url.spec() + "?private"); | 370 url = GURL(url.spec() + "?private"); |
367 LoadAndWaitInWindow(CreateOffTheRecordBrowser(), url); | 371 LoadAndWaitInWindow(CreateOffTheRecordBrowser(), url); |
368 } | 372 } |
369 #endif | 373 #endif |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 ResourceDispatcherHostDelegate* old_delegate = | 561 ResourceDispatcherHostDelegate* old_delegate = |
558 ResourceDispatcherHostImpl::Get()->delegate(); | 562 ResourceDispatcherHostImpl::Get()->delegate(); |
559 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); | 563 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); |
560 LoadAndWait(url); | 564 LoadAndWait(url); |
561 test_delegate.WaitForPluginRequest(); | 565 test_delegate.WaitForPluginRequest(); |
562 ASSERT_TRUE(test_delegate.found_cookie()); | 566 ASSERT_TRUE(test_delegate.found_cookie()); |
563 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); | 567 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); |
564 } | 568 } |
565 | 569 |
566 } // namespace content | 570 } // namespace content |
OLD | NEW |