Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: chrome/test/interactive_ui/npapi_interactive_test.cc

Issue 5967003: Refactor UITestBase/ProxyLauncher. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add POD struct to hold some launcher variables. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2008, Google Inc. 1 // Copyright 2008, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 27 matching lines...) Expand all
38 #include "chrome/test/ui/npapi_test_helper.h" 38 #include "chrome/test/ui/npapi_test_helper.h"
39 #include "chrome/test/ui_test_utils.h" 39 #include "chrome/test/ui_test_utils.h"
40 40
41 const char kTestCompleteCookie[] = "status"; 41 const char kTestCompleteCookie[] = "status";
42 const char kTestCompleteSuccess[] = "OK"; 42 const char kTestCompleteSuccess[] = "OK";
43 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi"); 43 static const FilePath::CharType* kTestDir = FILE_PATH_LITERAL("npapi");
44 44
45 // Tests if a plugin executing a self deleting script in the context of 45 // Tests if a plugin executing a self deleting script in the context of
46 // a synchronous mousemove works correctly 46 // a synchronous mousemove works correctly
47 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) { 47 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInvokeInSynchronousMouseMove) {
48 if (UITest::in_process_renderer()) 48 if (ProxyLauncher::in_process_renderer())
49 return; 49 return;
50 50
51 show_window_ = true; 51 show_window_ = true;
52 const FilePath kTestDir(FILE_PATH_LITERAL("npapi")); 52 const FilePath kTestDir(FILE_PATH_LITERAL("npapi"));
53 const FilePath test_case( 53 const FilePath test_case(
54 FILE_PATH_LITERAL("execute_script_delete_in_mouse_move.html")); 54 FILE_PATH_LITERAL("execute_script_delete_in_mouse_move.html"));
55 GURL url = ui_test_utils::GetTestUrl(kTestDir, test_case); 55 GURL url = ui_test_utils::GetTestUrl(kTestDir, test_case);
56 NavigateToURL(url); 56 NavigateToURL(url);
57 57
58 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); 58 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
59 59
60 gfx::Point cursor_position(150, 250); 60 gfx::Point cursor_position(150, 250);
61 window->SimulateOSMouseMove(cursor_position); 61 window->SimulateOSMouseMove(cursor_position);
62 62
63 WaitForFinish("execute_script_delete_in_mouse_move", "1", url, 63 WaitForFinish("execute_script_delete_in_mouse_move", "1", url,
64 kTestCompleteCookie, kTestCompleteSuccess, 64 kTestCompleteCookie, kTestCompleteSuccess,
65 action_max_timeout_ms()); 65 action_max_timeout_ms());
66 } 66 }
67 67
68 // Flaky, http://crbug.com/60071. 68 // Flaky, http://crbug.com/60071.
69 TEST_F(NPAPIVisiblePluginTester, FLAKY_GetURLRequest404Response) { 69 TEST_F(NPAPIVisiblePluginTester, FLAKY_GetURLRequest404Response) {
70 if (UITest::in_process_renderer()) 70 if (ProxyLauncher::in_process_renderer())
71 return; 71 return;
72 72
73 GURL url(URLRequestMockHTTPJob::GetMockUrl( 73 GURL url(URLRequestMockHTTPJob::GetMockUrl(
74 FilePath(FILE_PATH_LITERAL( 74 FilePath(FILE_PATH_LITERAL(
75 "npapi/plugin_url_request_404.html")))); 75 "npapi/plugin_url_request_404.html"))));
76 76
77 NavigateToURL(url); 77 NavigateToURL(url);
78 78
79 // Wait for the alert dialog and then close it. 79 // Wait for the alert dialog and then close it.
80 automation()->WaitForAppModalDialog(); 80 automation()->WaitForAppModalDialog();
(...skipping 17 matching lines...) Expand all
98 // Wait for the alert dialog and then close it. 98 // Wait for the alert dialog and then close it.
99 ASSERT_TRUE(automation()->WaitForAppModalDialog()); 99 ASSERT_TRUE(automation()->WaitForAppModalDialog());
100 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow()); 100 scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
101 ASSERT_TRUE(window.get()); 101 ASSERT_TRUE(window.get());
102 ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_ESCAPE, 0)); 102 ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_ESCAPE, 0));
103 103
104 WaitForFinish("self_delete_plugin_invoke_alert", "1", url, 104 WaitForFinish("self_delete_plugin_invoke_alert", "1", url,
105 kTestCompleteCookie, kTestCompleteSuccess, 105 kTestCompleteCookie, kTestCompleteSuccess,
106 action_max_timeout_ms()); 106 action_max_timeout_ms());
107 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698