| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 // windows headers | 8 // windows headers |
| 9 #include <comutil.h> | 9 #include <comutil.h> |
| 10 #include <shellapi.h> | 10 #include <shellapi.h> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // Test passing arguments to a plugin. | 38 // Test passing arguments to a plugin. |
| 39 TEST_F(NPAPITesterBase, Arguments) { | 39 TEST_F(NPAPITesterBase, Arguments) { |
| 40 const FilePath test_case(FILE_PATH_LITERAL("arguments.html")); | 40 const FilePath test_case(FILE_PATH_LITERAL("arguments.html")); |
| 41 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 41 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 42 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 42 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 43 WaitForFinish("arguments", "1", url, kTestCompleteCookie, | 43 WaitForFinish("arguments", "1", url, kTestCompleteCookie, |
| 44 kTestCompleteSuccess, action_max_timeout_ms()); | 44 kTestCompleteSuccess, action_max_timeout_ms()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 // Test invoking many plugins within a single page. | 47 // Test invoking many plugins within a single page. |
| 48 // Test still flaky under valgrind | 48 TEST_F(NPAPITesterBase, ManyPlugins) { |
| 49 // http://crbug.com/28372, http://crbug.com/45561 | |
| 50 TEST_F(NPAPITesterBase, FLAKY_ManyPlugins) { | |
| 51 const FilePath test_case(FILE_PATH_LITERAL("many_plugins.html")); | 49 const FilePath test_case(FILE_PATH_LITERAL("many_plugins.html")); |
| 52 GURL url(ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case)); | 50 GURL url(ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case)); |
| 53 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 51 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 54 | 52 |
| 55 for (int i = 1; i <= 15; i++) { | 53 for (int i = 1; i <= 15; i++) { |
| 56 SCOPED_TRACE(StringPrintf("Waiting for plugin #%d", i)); | 54 SCOPED_TRACE(StringPrintf("Waiting for plugin #%d", i)); |
| 57 ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", base::IntToString(i), | 55 ASSERT_NO_FATAL_FAILURE(WaitForFinish("arguments", base::IntToString(i), |
| 58 url, kTestCompleteCookie, | 56 url, kTestCompleteCookie, |
| 59 kTestCompleteSuccess, | 57 kTestCompleteSuccess, |
| 60 action_max_timeout_ms())); | 58 action_max_timeout_ms())); |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 FILE_PATH_LITERAL("ensure_scripting_works_in_destroy.html")); | 327 FILE_PATH_LITERAL("ensure_scripting_works_in_destroy.html")); |
| 330 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 328 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 331 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 329 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 332 WaitForFinish("ensure_scripting_works_in_destroy", "1", url, | 330 WaitForFinish("ensure_scripting_works_in_destroy", "1", url, |
| 333 kTestCompleteCookie, kTestCompleteSuccess, | 331 kTestCompleteCookie, kTestCompleteSuccess, |
| 334 action_max_timeout_ms()); | 332 action_max_timeout_ms()); |
| 335 } | 333 } |
| 336 | 334 |
| 337 // This test uses a Windows Event to signal to the plugin that it should crash | 335 // This test uses a Windows Event to signal to the plugin that it should crash |
| 338 // on NP_Initialize. | 336 // on NP_Initialize. |
| 339 // This is flaky. http://crbug.com/32048 | 337 TEST_F(NPAPITesterBase, NoHangIfInitCrashes) { |
| 340 TEST_F(NPAPITesterBase, FLAKY_NoHangIfInitCrashes) { | |
| 341 if (UITest::in_process_renderer()) | 338 if (UITest::in_process_renderer()) |
| 342 return; | 339 return; |
| 343 | 340 |
| 344 // Only Windows implements the crash service for now. | 341 // Only Windows implements the crash service for now. |
| 345 #if defined(OS_WIN) | 342 #if defined(OS_WIN) |
| 346 expected_crashes_ = 1; | 343 expected_crashes_ = 1; |
| 347 #endif | 344 #endif |
| 348 | 345 |
| 349 HANDLE crash_event = CreateEvent(NULL, TRUE, FALSE, L"TestPluginCrashOnInit"); | 346 HANDLE crash_event = CreateEvent(NULL, TRUE, FALSE, L"TestPluginCrashOnInit"); |
| 350 SetEvent(crash_event); | 347 SetEvent(crash_event); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 404 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 408 | 405 |
| 409 scoped_refptr<TabProxy> tab(browser->GetTab(0)); | 406 scoped_refptr<TabProxy> tab(browser->GetTab(0)); |
| 410 ASSERT_TRUE(tab.get()); | 407 ASSERT_TRUE(tab.get()); |
| 411 | 408 |
| 412 ASSERT_TRUE(tab->LoadBlockedPlugins()); | 409 ASSERT_TRUE(tab->LoadBlockedPlugins()); |
| 413 | 410 |
| 414 WaitForFinish("setup", "1", url, kTestCompleteCookie, | 411 WaitForFinish("setup", "1", url, kTestCompleteCookie, |
| 415 kTestCompleteSuccess, action_max_timeout_ms()); | 412 kTestCompleteSuccess, action_max_timeout_ms()); |
| 416 } | 413 } |
| OLD | NEW |