| 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 // NPAPI interactive UI tests. | 5 // NPAPI interactive UI tests. |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
| 9 #include "chrome/browser/net/url_request_mock_http_job.h" | |
| 10 #include "chrome/test/automation/window_proxy.h" | 9 #include "chrome/test/automation/window_proxy.h" |
| 11 #include "chrome/test/ui/npapi_test_helper.h" | 10 #include "chrome/test/ui/npapi_test_helper.h" |
| 12 #include "chrome/test/ui_test_utils.h" | 11 #include "chrome/test/ui_test_utils.h" |
| 12 #include "content/browser/net/url_request_mock_http_job.h" |
| 13 #include "ui/base/keycodes/keyboard_codes.h" | 13 #include "ui/base/keycodes/keyboard_codes.h" |
| 14 | 14 |
| 15 const char kTestCompleteCookie[] = "status"; | 15 const char kTestCompleteCookie[] = "status"; |
| 16 const char kTestCompleteSuccess[] = "OK"; | 16 const char kTestCompleteSuccess[] = "OK"; |
| 17 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi"); | 17 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi"); |
| 18 | 18 |
| 19 // Tests if a plugin executing a self deleting script in the context of | 19 // Tests if a plugin executing a self deleting script in the context of |
| 20 // a synchronous mousemove works correctly | 20 // a synchronous mousemove works correctly |
| 21 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { | 21 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { |
| 22 if (ProxyLauncher::in_process_renderer()) | 22 if (ProxyLauncher::in_process_renderer()) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Wait for the alert dialog and then close it. | 72 // Wait for the alert dialog and then close it. |
| 73 ASSERT_TRUE(automation()->WaitForAppModalDialog()); | 73 ASSERT_TRUE(automation()->WaitForAppModalDialog()); |
| 74 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); | 74 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); |
| 75 ASSERT_TRUE(window.get()); | 75 ASSERT_TRUE(window.get()); |
| 76 ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_ESCAPE, 0)); | 76 ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_ESCAPE, 0)); |
| 77 | 77 |
| 78 WaitForFinish("self_delete_plugin_invoke_alert", "1", url, | 78 WaitForFinish("self_delete_plugin_invoke_alert", "1", url, |
| 79 kTestCompleteCookie, kTestCompleteSuccess, | 79 kTestCompleteCookie, kTestCompleteSuccess, |
| 80 TestTimeouts::action_max_timeout_ms()); | 80 TestTimeouts::action_max_timeout_ms()); |
| 81 } | 81 } |
| OLD | NEW |