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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 #define MAYBE_GetURLRedirectNotification GetURLRedirectNotification | 110 #define MAYBE_GetURLRedirectNotification GetURLRedirectNotification |
111 #endif | 111 #endif |
112 TEST_F(NPAPITesterBase, MAYBE_GetURLRedirectNotification) { | 112 TEST_F(NPAPITesterBase, MAYBE_GetURLRedirectNotification) { |
113 const FilePath test_case(FILE_PATH_LITERAL("geturl_redirect_notify.html")); | 113 const FilePath test_case(FILE_PATH_LITERAL("geturl_redirect_notify.html")); |
114 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 114 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
115 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 115 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
116 WaitForFinish("geturlredirectnotify", "1", url, kTestCompleteCookie, | 116 WaitForFinish("geturlredirectnotify", "1", url, kTestCompleteCookie, |
117 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 117 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
118 } | 118 } |
119 | 119 |
| 120 // Tests that identity is preserved for NPObjects passed from a plugin |
| 121 // into JavaScript. |
| 122 TEST_F(NPAPITesterBase, NPObjectIdentity) { |
| 123 const FilePath test_case(FILE_PATH_LITERAL("npobject_identity.html")); |
| 124 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 125 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 126 WaitForFinish("npobject_identity", "1", url, kTestCompleteCookie, |
| 127 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
| 128 } |
| 129 |
120 // Tests that if an NPObject is proxies back to its original process, the | 130 // Tests that if an NPObject is proxies back to its original process, the |
121 // original pointer is returned and not a proxy. If this fails the plugin | 131 // original pointer is returned and not a proxy. If this fails the plugin |
122 // will crash. | 132 // will crash. |
123 TEST_F(NPAPITesterBase, NPObjectProxy) { | 133 TEST_F(NPAPITesterBase, NPObjectProxy) { |
124 const FilePath test_case(FILE_PATH_LITERAL("npobject_proxy.html")); | 134 const FilePath test_case(FILE_PATH_LITERAL("npobject_proxy.html")); |
125 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 135 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
126 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 136 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
127 WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie, | 137 WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie, |
128 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 138 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
129 } | 139 } |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 ASSERT_TRUE(tab->LoadBlockedPlugins()); | 466 ASSERT_TRUE(tab->LoadBlockedPlugins()); |
457 | 467 |
458 WaitForFinish("setup", "1", url, kTestCompleteCookie, | 468 WaitForFinish("setup", "1", url, kTestCompleteCookie, |
459 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 469 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
460 | 470 |
461 ASSERT_TRUE(tab->ExecuteJavaScript("window.inject()")); | 471 ASSERT_TRUE(tab->ExecuteJavaScript("window.inject()")); |
462 | 472 |
463 WaitForFinish("setup", "2", url, kTestCompleteCookie, | 473 WaitForFinish("setup", "2", url, kTestCompleteCookie, |
464 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); | 474 kTestCompleteSuccess, TestTimeouts::action_max_timeout_ms()); |
465 } | 475 } |
OLD | NEW |