| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Test that calling GetURL with a javascript URL and target=_self | 85 // Test that calling GetURL with a javascript URL and target=_self |
| 86 // works properly when the plugin is embedded in a subframe. | 86 // works properly when the plugin is embedded in a subframe. |
| 87 TEST_F(NPAPITesterBase, GetJavaScriptURL2) { | 87 TEST_F(NPAPITesterBase, GetJavaScriptURL2) { |
| 88 const FilePath test_case(FILE_PATH_LITERAL("get_javascript_url2.html")); | 88 const FilePath test_case(FILE_PATH_LITERAL("get_javascript_url2.html")); |
| 89 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 89 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 90 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 90 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 91 WaitForFinish("getjavascripturl2", "1", url, kTestCompleteCookie, | 91 WaitForFinish("getjavascripturl2", "1", url, kTestCompleteCookie, |
| 92 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 92 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 TEST_F(NPAPITesterBase, GetURLRedirectNotification) { | 95 // Test is flaky on linux/cros builders. http://crbug.com/71904 |
| 96 #if defined(OS_POSIX) |
| 97 #define MAYBE_GetURLRedirectNotification FLAKY_GetURLRedirectNotification |
| 98 #else |
| 99 #define MAYBE_GetURLRedirectNotification GetURLRedirectNotification |
| 100 #endif |
| 101 TEST(NPAPITesterBase, MAYBE_GetURLRedirectNotification) { |
| 96 const FilePath test_case(FILE_PATH_LITERAL("geturl_redirect_notify.html")); | 102 const FilePath test_case(FILE_PATH_LITERAL("geturl_redirect_notify.html")); |
| 97 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 103 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 98 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 104 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 99 WaitForFinish("geturlredirectnotify", "1", url, kTestCompleteCookie, | 105 WaitForFinish("geturlredirectnotify", "1", url, kTestCompleteCookie, |
| 100 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 106 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
| 101 } | 107 } |
| 102 | 108 |
| 103 // Tests that if an NPObject is proxies back to its original process, the | 109 // Tests that if an NPObject is proxies back to its original process, the |
| 104 // original pointer is returned and not a proxy. If this fails the plugin | 110 // original pointer is returned and not a proxy. If this fails the plugin |
| 105 // will crash. | 111 // will crash. |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 421 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 416 | 422 |
| 417 scoped_refptr<TabProxy> tab(browser->GetTab(0)); | 423 scoped_refptr<TabProxy> tab(browser->GetTab(0)); |
| 418 ASSERT_TRUE(tab.get()); | 424 ASSERT_TRUE(tab.get()); |
| 419 | 425 |
| 420 ASSERT_TRUE(tab->LoadBlockedPlugins()); | 426 ASSERT_TRUE(tab->LoadBlockedPlugins()); |
| 421 | 427 |
| 422 WaitForFinish("setup", "1", url, kTestCompleteCookie, | 428 WaitForFinish("setup", "1", url, kTestCompleteCookie, |
| 423 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 429 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
| 424 } | 430 } |
| OLD | NEW |