| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie, | 106 WaitForFinish("npobject_proxy", "1", url, kTestCompleteCookie, |
| 107 kTestCompleteSuccess, action_max_timeout_ms()); | 107 kTestCompleteSuccess, action_max_timeout_ms()); |
| 108 } | 108 } |
| 109 | 109 |
| 110 #if defined(OS_WIN) || defined(OS_MACOSX) | 110 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 111 // Tests if a plugin executing a self deleting script in the context of | 111 // Tests if a plugin executing a self deleting script in the context of |
| 112 // a synchronous paint event works correctly | 112 // a synchronous paint event works correctly |
| 113 // http://crbug.com/44960 | 113 // http://crbug.com/44960 |
| 114 TEST_F(NPAPIVisiblePluginTester, | 114 TEST_F(NPAPIVisiblePluginTester, |
| 115 FLAKY_SelfDeletePluginInvokeInSynchronousPaint) { | 115 FLAKY_SelfDeletePluginInvokeInSynchronousPaint) { |
| 116 if (UITest::in_process_renderer()) | 116 if (ProxyLauncher::in_process_renderer()) |
| 117 return; | 117 return; |
| 118 | 118 |
| 119 show_window_ = true; | 119 show_window_ = true; |
| 120 const FilePath test_case( | 120 const FilePath test_case( |
| 121 FILE_PATH_LITERAL("execute_script_delete_in_paint.html")); | 121 FILE_PATH_LITERAL("execute_script_delete_in_paint.html")); |
| 122 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 122 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 123 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 123 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 124 WaitForFinish("execute_script_delete_in_paint", "1", url, | 124 WaitForFinish("execute_script_delete_in_paint", "1", url, |
| 125 kTestCompleteCookie, kTestCompleteSuccess, | 125 kTestCompleteCookie, kTestCompleteSuccess, |
| 126 action_max_timeout_ms()); | 126 action_max_timeout_ms()); |
| 127 } | 127 } |
| 128 #endif | 128 #endif |
| 129 | 129 |
| 130 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNewStream) { | 130 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNewStream) { |
| 131 if (UITest::in_process_renderer()) | 131 if (ProxyLauncher::in_process_renderer()) |
| 132 return; | 132 return; |
| 133 | 133 |
| 134 show_window_ = true; | 134 show_window_ = true; |
| 135 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_stream.html")); | 135 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_stream.html")); |
| 136 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 136 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 137 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 137 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 138 WaitForFinish("self_delete_plugin_stream", "1", url, | 138 WaitForFinish("self_delete_plugin_stream", "1", url, |
| 139 kTestCompleteCookie, kTestCompleteSuccess, | 139 kTestCompleteCookie, kTestCompleteSuccess, |
| 140 action_max_timeout_ms()); | 140 action_max_timeout_ms()); |
| 141 } | 141 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 ASSERT_TRUE(automation()->WaitForAppModalDialog()); | 183 ASSERT_TRUE(automation()->WaitForAppModalDialog()); |
| 184 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing, | 184 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing, |
| 185 &available_buttons)); | 185 &available_buttons)); |
| 186 ASSERT_TRUE(modal_dialog_showing); | 186 ASSERT_TRUE(modal_dialog_showing); |
| 187 ASSERT_NE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons), 0); | 187 ASSERT_NE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons), 0); |
| 188 ASSERT_TRUE(automation()->ClickAppModalDialogButton( | 188 ASSERT_TRUE(automation()->ClickAppModalDialogButton( |
| 189 MessageBoxFlags::DIALOGBUTTON_OK)); | 189 MessageBoxFlags::DIALOGBUTTON_OK)); |
| 190 } | 190 } |
| 191 | 191 |
| 192 TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) { | 192 TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) { |
| 193 if (UITest::in_process_renderer()) | 193 if (ProxyLauncher::in_process_renderer()) |
| 194 return; | 194 return; |
| 195 | 195 |
| 196 show_window_ = true; | 196 show_window_ = true; |
| 197 const FilePath test_case(FILE_PATH_LITERAL("npobject_lifetime_test.html")); | 197 const FilePath test_case(FILE_PATH_LITERAL("npobject_lifetime_test.html")); |
| 198 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 198 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 199 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 199 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 200 WaitForFinish("npobject_lifetime_test", "1", url, | 200 WaitForFinish("npobject_lifetime_test", "1", url, |
| 201 kTestCompleteCookie, kTestCompleteSuccess, | 201 kTestCompleteCookie, kTestCompleteSuccess, |
| 202 action_max_timeout_ms()); | 202 action_max_timeout_ms()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 // Tests that we don't crash or assert if NPP_New fails | 205 // Tests that we don't crash or assert if NPP_New fails |
| 206 TEST_F(NPAPIVisiblePluginTester, NewFails) { | 206 TEST_F(NPAPIVisiblePluginTester, NewFails) { |
| 207 const FilePath test_case(FILE_PATH_LITERAL("new_fails.html")); | 207 const FilePath test_case(FILE_PATH_LITERAL("new_fails.html")); |
| 208 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 208 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 209 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 209 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 210 WaitForFinish("new_fails", "1", url, kTestCompleteCookie, | 210 WaitForFinish("new_fails", "1", url, kTestCompleteCookie, |
| 211 kTestCompleteSuccess, action_max_timeout_ms()); | 211 kTestCompleteSuccess, action_max_timeout_ms()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) { | 214 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) { |
| 215 if (UITest::in_process_renderer()) | 215 if (ProxyLauncher::in_process_renderer()) |
| 216 return; | 216 return; |
| 217 | 217 |
| 218 const FilePath test_case( | 218 const FilePath test_case( |
| 219 FILE_PATH_LITERAL("execute_script_delete_in_npn_evaluate.html")); | 219 FILE_PATH_LITERAL("execute_script_delete_in_npn_evaluate.html")); |
| 220 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 220 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 221 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 221 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 222 WaitForFinish("npobject_delete_plugin_in_evaluate", "1", url, | 222 WaitForFinish("npobject_delete_plugin_in_evaluate", "1", url, |
| 223 kTestCompleteCookie, kTestCompleteSuccess, | 223 kTestCompleteCookie, kTestCompleteSuccess, |
| 224 action_max_timeout_ms()); | 224 action_max_timeout_ms()); |
| 225 } | 225 } |
| 226 | 226 |
| 227 TEST_F(NPAPIVisiblePluginTester, SelfDeleteCreatePluginInNPNEvaluate) { | 227 TEST_F(NPAPIVisiblePluginTester, SelfDeleteCreatePluginInNPNEvaluate) { |
| 228 if (UITest::in_process_renderer()) | 228 if (ProxyLauncher::in_process_renderer()) |
| 229 return; | 229 return; |
| 230 | 230 |
| 231 const FilePath test_case( | 231 const FilePath test_case( |
| 232 FILE_PATH_LITERAL("npn_plugin_delete_create_in_evaluate.html")); | 232 FILE_PATH_LITERAL("npn_plugin_delete_create_in_evaluate.html")); |
| 233 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 233 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 234 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 234 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 235 WaitForFinish("npobject_delete_create_plugin_in_evaluate", "1", url, | 235 WaitForFinish("npobject_delete_create_plugin_in_evaluate", "1", url, |
| 236 kTestCompleteCookie, kTestCompleteSuccess, | 236 kTestCompleteCookie, kTestCompleteSuccess, |
| 237 action_max_timeout_ms()); | 237 action_max_timeout_ms()); |
| 238 } | 238 } |
| 239 | 239 |
| 240 #endif | 240 #endif |
| 241 | 241 |
| 242 // FLAKY. See bug http://crbug.com/17645. This bug report indicates that this | 242 // FLAKY. See bug http://crbug.com/17645. This bug report indicates that this |
| 243 // test is crashy. I could not repro the crash on my local setup. Leaving this | 243 // test is crashy. I could not repro the crash on my local setup. Leaving this |
| 244 // marked as FLAKY for now while we watch this on the builders. | 244 // marked as FLAKY for now while we watch this on the builders. |
| 245 TEST_F(NPAPIVisiblePluginTester, FLAKY_OpenPopupWindowWithPlugin) { | 245 TEST_F(NPAPIVisiblePluginTester, FLAKY_OpenPopupWindowWithPlugin) { |
| 246 if (UITest::in_process_renderer()) | 246 if (ProxyLauncher::in_process_renderer()) |
| 247 return; | 247 return; |
| 248 | 248 |
| 249 const FilePath test_case( | 249 const FilePath test_case( |
| 250 FILE_PATH_LITERAL("get_javascript_open_popup_with_plugin.html")); | 250 FILE_PATH_LITERAL("get_javascript_open_popup_with_plugin.html")); |
| 251 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 251 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 252 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 252 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 253 WaitForFinish("plugin_popup_with_plugin_target", "1", url, | 253 WaitForFinish("plugin_popup_with_plugin_target", "1", url, |
| 254 kTestCompleteCookie, kTestCompleteSuccess, | 254 kTestCompleteCookie, kTestCompleteSuccess, |
| 255 action_timeout_ms()); | 255 action_timeout_ms()); |
| 256 } | 256 } |
| 257 | 257 |
| 258 // Test checking the privacy mode is off. | 258 // Test checking the privacy mode is off. |
| 259 TEST_F(NPAPITesterBase, PrivateDisabled) { | 259 TEST_F(NPAPITesterBase, PrivateDisabled) { |
| 260 if (UITest::in_process_renderer()) | 260 if (ProxyLauncher::in_process_renderer()) |
| 261 return; | 261 return; |
| 262 | 262 |
| 263 const FilePath test_case(FILE_PATH_LITERAL("private.html")); | 263 const FilePath test_case(FILE_PATH_LITERAL("private.html")); |
| 264 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 264 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 265 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 265 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 266 WaitForFinish("private", "1", url, kTestCompleteCookie, | 266 WaitForFinish("private", "1", url, kTestCompleteCookie, |
| 267 kTestCompleteSuccess, action_max_timeout_ms()); | 267 kTestCompleteSuccess, action_max_timeout_ms()); |
| 268 } | 268 } |
| 269 | 269 |
| 270 TEST_F(NPAPITesterBase, ScheduleTimer) { | 270 TEST_F(NPAPITesterBase, ScheduleTimer) { |
| 271 const FilePath test_case(FILE_PATH_LITERAL("schedule_timer.html")); | 271 const FilePath test_case(FILE_PATH_LITERAL("schedule_timer.html")); |
| 272 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 272 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 273 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 273 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 274 WaitForFinish("schedule_timer", "1", url, kTestCompleteCookie, | 274 WaitForFinish("schedule_timer", "1", url, kTestCompleteCookie, |
| 275 kTestCompleteSuccess, action_max_timeout_ms()); | 275 kTestCompleteSuccess, action_max_timeout_ms()); |
| 276 } | 276 } |
| 277 | 277 |
| 278 TEST_F(NPAPITesterBase, PluginThreadAsyncCall) { | 278 TEST_F(NPAPITesterBase, PluginThreadAsyncCall) { |
| 279 const FilePath test_case(FILE_PATH_LITERAL("plugin_thread_async_call.html")); | 279 const FilePath test_case(FILE_PATH_LITERAL("plugin_thread_async_call.html")); |
| 280 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 280 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 281 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 281 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 282 WaitForFinish("plugin_thread_async_call", "1", url, kTestCompleteCookie, | 282 WaitForFinish("plugin_thread_async_call", "1", url, kTestCompleteCookie, |
| 283 kTestCompleteSuccess, action_max_timeout_ms()); | 283 kTestCompleteSuccess, action_max_timeout_ms()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 // Test checking the privacy mode is on. | 286 // Test checking the privacy mode is on. |
| 287 TEST_F(NPAPIIncognitoTester, PrivateEnabled) { | 287 TEST_F(NPAPIIncognitoTester, PrivateEnabled) { |
| 288 if (UITest::in_process_renderer()) | 288 if (ProxyLauncher::in_process_renderer()) |
| 289 return; | 289 return; |
| 290 | 290 |
| 291 const FilePath test_case(FILE_PATH_LITERAL("private.html?private")); | 291 const FilePath test_case(FILE_PATH_LITERAL("private.html?private")); |
| 292 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 292 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 293 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 293 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 294 WaitForFinish("private", "1", url, kTestCompleteCookie, | 294 WaitForFinish("private", "1", url, kTestCompleteCookie, |
| 295 kTestCompleteSuccess, action_max_timeout_ms()); | 295 kTestCompleteSuccess, action_max_timeout_ms()); |
| 296 } | 296 } |
| 297 | 297 |
| 298 #if defined(OS_WIN) || defined(OS_MACOSX) | 298 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 299 // Test a browser hang due to special case of multiple | 299 // Test a browser hang due to special case of multiple |
| 300 // plugin instances indulged in sync calls across renderer. | 300 // plugin instances indulged in sync calls across renderer. |
| 301 TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) { | 301 TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) { |
| 302 if (UITest::in_process_renderer()) | 302 if (ProxyLauncher::in_process_renderer()) |
| 303 return; | 303 return; |
| 304 | 304 |
| 305 const FilePath test_case( | 305 const FilePath test_case( |
| 306 FILE_PATH_LITERAL("multiple_instances_sync_calls.html")); | 306 FILE_PATH_LITERAL("multiple_instances_sync_calls.html")); |
| 307 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 307 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 308 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 308 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 309 WaitForFinish("multiple_instances_sync_calls", "1", url, kTestCompleteCookie, | 309 WaitForFinish("multiple_instances_sync_calls", "1", url, kTestCompleteCookie, |
| 310 kTestCompleteSuccess, action_max_timeout_ms()); | 310 kTestCompleteSuccess, action_max_timeout_ms()); |
| 311 } | 311 } |
| 312 #endif | 312 #endif |
| 313 | 313 |
| 314 TEST_F(NPAPIVisiblePluginTester, GetURLRequestFailWrite) { | 314 TEST_F(NPAPIVisiblePluginTester, GetURLRequestFailWrite) { |
| 315 if (UITest::in_process_renderer()) | 315 if (ProxyLauncher::in_process_renderer()) |
| 316 return; | 316 return; |
| 317 | 317 |
| 318 GURL url(URLRequestMockHTTPJob::GetMockUrl( | 318 GURL url(URLRequestMockHTTPJob::GetMockUrl( |
| 319 FilePath(FILE_PATH_LITERAL( | 319 FilePath(FILE_PATH_LITERAL( |
| 320 "npapi/plugin_url_request_fail_write.html")))); | 320 "npapi/plugin_url_request_fail_write.html")))); |
| 321 | 321 |
| 322 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 322 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 323 | 323 |
| 324 WaitForFinish("geturl_fail_write", "1", url, kTestCompleteCookie, | 324 WaitForFinish("geturl_fail_write", "1", url, kTestCompleteCookie, |
| 325 kTestCompleteSuccess, action_max_timeout_ms()); | 325 kTestCompleteSuccess, action_max_timeout_ms()); |
| 326 } | 326 } |
| 327 | 327 |
| 328 #if defined(OS_WIN) | 328 #if defined(OS_WIN) |
| 329 TEST_F(NPAPITesterBase, EnsureScriptingWorksInDestroy) { | 329 TEST_F(NPAPITesterBase, EnsureScriptingWorksInDestroy) { |
| 330 if (UITest::in_process_renderer()) | 330 if (ProxyLauncher::in_process_renderer()) |
| 331 return; | 331 return; |
| 332 | 332 |
| 333 const FilePath test_case( | 333 const FilePath test_case( |
| 334 FILE_PATH_LITERAL("ensure_scripting_works_in_destroy.html")); | 334 FILE_PATH_LITERAL("ensure_scripting_works_in_destroy.html")); |
| 335 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 335 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 336 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 336 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 337 WaitForFinish("ensure_scripting_works_in_destroy", "1", url, | 337 WaitForFinish("ensure_scripting_works_in_destroy", "1", url, |
| 338 kTestCompleteCookie, kTestCompleteSuccess, | 338 kTestCompleteCookie, kTestCompleteSuccess, |
| 339 action_max_timeout_ms()); | 339 action_max_timeout_ms()); |
| 340 } | 340 } |
| 341 | 341 |
| 342 // This test uses a Windows Event to signal to the plugin that it should crash | 342 // This test uses a Windows Event to signal to the plugin that it should crash |
| 343 // on NP_Initialize. | 343 // on NP_Initialize. |
| 344 TEST_F(NPAPITesterBase, NoHangIfInitCrashes) { | 344 TEST_F(NPAPITesterBase, NoHangIfInitCrashes) { |
| 345 if (UITest::in_process_renderer()) | 345 if (ProxyLauncher::in_process_renderer()) |
| 346 return; | 346 return; |
| 347 | 347 |
| 348 // Only Windows implements the crash service for now. | 348 // Only Windows implements the crash service for now. |
| 349 #if defined(OS_WIN) | 349 #if defined(OS_WIN) |
| 350 expected_crashes_ = 1; | 350 expected_crashes_ = 1; |
| 351 #endif | 351 #endif |
| 352 | 352 |
| 353 HANDLE crash_event = CreateEvent(NULL, TRUE, FALSE, L"TestPluginCrashOnInit"); | 353 HANDLE crash_event = CreateEvent(NULL, TRUE, FALSE, L"TestPluginCrashOnInit"); |
| 354 SetEvent(crash_event); | 354 SetEvent(crash_event); |
| 355 const FilePath test_case(FILE_PATH_LITERAL("no_hang_if_init_crashes.html")); | 355 const FilePath test_case(FILE_PATH_LITERAL("no_hang_if_init_crashes.html")); |
| 356 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 356 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
| 357 NavigateToURL(url); | 357 NavigateToURL(url); |
| 358 WaitForFinish("no_hang_if_init_crashes", "1", url, | 358 WaitForFinish("no_hang_if_init_crashes", "1", url, |
| 359 kTestCompleteCookie, kTestCompleteSuccess, | 359 kTestCompleteCookie, kTestCompleteSuccess, |
| 360 action_max_timeout_ms()); | 360 action_max_timeout_ms()); |
| 361 CloseHandle(crash_event); | 361 CloseHandle(crash_event); |
| 362 } | 362 } |
| 363 | 363 |
| 364 #endif | 364 #endif |
| 365 | 365 |
| 366 TEST_F(NPAPIVisiblePluginTester, PluginReferrerTest) { | 366 TEST_F(NPAPIVisiblePluginTester, PluginReferrerTest) { |
| 367 if (UITest::in_process_renderer()) | 367 if (ProxyLauncher::in_process_renderer()) |
| 368 return; | 368 return; |
| 369 | 369 |
| 370 GURL url(URLRequestMockHTTPJob::GetMockUrl( | 370 GURL url(URLRequestMockHTTPJob::GetMockUrl( |
| 371 FilePath(FILE_PATH_LITERAL( | 371 FilePath(FILE_PATH_LITERAL( |
| 372 "npapi/plugin_url_request_referrer_test.html")))); | 372 "npapi/plugin_url_request_referrer_test.html")))); |
| 373 | 373 |
| 374 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 374 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 375 | 375 |
| 376 WaitForFinish("plugin_referrer_test", "1", url, kTestCompleteCookie, | 376 WaitForFinish("plugin_referrer_test", "1", url, kTestCompleteCookie, |
| 377 kTestCompleteSuccess, action_max_timeout_ms()); | 377 kTestCompleteSuccess, action_max_timeout_ms()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 #if defined(OS_MACOSX) | 380 #if defined(OS_MACOSX) |
| 381 TEST_F(NPAPIVisiblePluginTester, PluginConvertPointTest) { | 381 TEST_F(NPAPIVisiblePluginTester, PluginConvertPointTest) { |
| 382 if (UITest::in_process_renderer()) | 382 if (ProxyLauncher::in_process_renderer()) |
| 383 return; | 383 return; |
| 384 | 384 |
| 385 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 385 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
| 386 ASSERT_TRUE(browser.get()); | 386 ASSERT_TRUE(browser.get()); |
| 387 scoped_refptr<WindowProxy> window(browser->GetWindow()); | 387 scoped_refptr<WindowProxy> window(browser->GetWindow()); |
| 388 ASSERT_TRUE(window.get()); | 388 ASSERT_TRUE(window.get()); |
| 389 window->SetBounds(gfx::Rect(50, 50, 400, 400)); | 389 window->SetBounds(gfx::Rect(50, 50, 400, 400)); |
| 390 | 390 |
| 391 GURL url(URLRequestMockHTTPJob::GetMockUrl( | 391 GURL url(URLRequestMockHTTPJob::GetMockUrl( |
| 392 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html")))); | 392 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html")))); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 411 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 411 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
| 412 | 412 |
| 413 scoped_refptr<TabProxy> tab(browser->GetTab(0)); | 413 scoped_refptr<TabProxy> tab(browser->GetTab(0)); |
| 414 ASSERT_TRUE(tab.get()); | 414 ASSERT_TRUE(tab.get()); |
| 415 | 415 |
| 416 ASSERT_TRUE(tab->LoadBlockedPlugins()); | 416 ASSERT_TRUE(tab->LoadBlockedPlugins()); |
| 417 | 417 |
| 418 WaitForFinish("setup", "1", url, kTestCompleteCookie, | 418 WaitForFinish("setup", "1", url, kTestCompleteCookie, |
| 419 kTestCompleteSuccess, action_max_timeout_ms()); | 419 kTestCompleteSuccess, action_max_timeout_ms()); |
| 420 } | 420 } |
| OLD | NEW |