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

Side by Side Diff: chrome/test/ui/npapi_uitest.cc

Issue 194051: Remove unused ATL headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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
« no previous file with comments | « chrome/test/plugin/plugin_test.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // windows headers 5 // windows headers
6 #include <windows.h> 6 #include <windows.h>
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #include <atlbase.h>
10 #include <comutil.h> 9 #include <comutil.h>
11 10
12 // runtime headers 11 // runtime headers
13 #include <stdlib.h> 12 #include <stdlib.h>
14 #include <string.h> 13 #include <string.h>
15 #include <memory.h> 14 #include <memory.h>
16 15
17 #include <ostream> 16 #include <ostream>
18 17
19 #include "base/file_util.h" 18 #include "base/file_util.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 std::wstring test_case = L"alert_in_window_message.html"; 199 std::wstring test_case = L"alert_in_window_message.html";
201 GURL url = GetTestUrl(L"npapi", test_case); 200 GURL url = GetTestUrl(L"npapi", test_case);
202 NavigateToURL(url); 201 NavigateToURL(url);
203 202
204 bool modal_dialog_showing = false; 203 bool modal_dialog_showing = false;
205 MessageBoxFlags::DialogButton available_buttons; 204 MessageBoxFlags::DialogButton available_buttons;
206 ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout)); 205 ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout));
207 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing, 206 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
208 &available_buttons)); 207 &available_buttons));
209 ASSERT_TRUE(modal_dialog_showing); 208 ASSERT_TRUE(modal_dialog_showing);
210 ASSERT_TRUE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons) != 0); 209 ASSERT_NE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons), 0);
211 ASSERT_TRUE(automation()->ClickAppModalDialogButton( 210 ASSERT_TRUE(automation()->ClickAppModalDialogButton(
212 MessageBoxFlags::DIALOGBUTTON_OK)); 211 MessageBoxFlags::DIALOGBUTTON_OK));
213 212
214 modal_dialog_showing = false; 213 modal_dialog_showing = false;
215 ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout)); 214 ASSERT_TRUE(automation()->WaitForAppModalDialog(kShortWaitTimeout));
216 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing, 215 ASSERT_TRUE(automation()->GetShowingAppModalDialog(&modal_dialog_showing,
217 &available_buttons)); 216 &available_buttons));
218 ASSERT_TRUE(modal_dialog_showing); 217 ASSERT_TRUE(modal_dialog_showing);
219 ASSERT_TRUE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons) != 0); 218 ASSERT_NE((MessageBoxFlags::DIALOGBUTTON_OK & available_buttons), 0);
220 ASSERT_TRUE(automation()->ClickAppModalDialogButton( 219 ASSERT_TRUE(automation()->ClickAppModalDialogButton(
221 MessageBoxFlags::DIALOGBUTTON_OK)); 220 MessageBoxFlags::DIALOGBUTTON_OK));
222 } 221 }
223 222
224 #endif 223 #endif
225 224
226 TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) { 225 TEST_F(NPAPIVisiblePluginTester, VerifyNPObjectLifetimeTest) {
227 if (!UITest::in_process_renderer()) { 226 if (!UITest::in_process_renderer()) {
228 show_window_ = true; 227 show_window_ = true;
229 std::wstring test_case = L"npobject_lifetime_test.html"; 228 std::wstring test_case = L"npobject_lifetime_test.html";
230 GURL url = GetTestUrl(L"npapi", test_case); 229 GURL url = GetTestUrl(L"npapi", test_case);
231 NavigateToURL(url); 230 NavigateToURL(url);
232 WaitForFinish("npobject_lifetime_test", "1", url, 231 WaitForFinish("npobject_lifetime_test", "1", url,
233 kTestCompleteCookie, kTestCompleteSuccess, 232 kTestCompleteCookie, kTestCompleteSuccess,
234 kShortWaitTimeout); 233 kShortWaitTimeout);
235 } 234 }
236 } 235 }
237 236
238 // Tests that we don't crash or assert if NPP_New fails 237 // Tests that we don't crash or assert if NPP_New fails
239 TEST_F(NPAPIVisiblePluginTester, NewFails) { 238 TEST_F(NPAPIVisiblePluginTester, NewFails) {
240 GURL url = GetTestUrl(L"npapi", L"new_fails.html"); 239 GURL url = GetTestUrl(L"npapi", L"new_fails.html");
241 NavigateToURL(url); 240 NavigateToURL(url);
242 WaitForFinish("new_fails", "1", url, kTestCompleteCookie, 241 WaitForFinish("new_fails", "1", url, kTestCompleteCookie,
243 kTestCompleteSuccess, kShortWaitTimeout); 242 kTestCompleteSuccess, kShortWaitTimeout);
244 } 243 }
245 244
246 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) { 245 TEST_F(NPAPIVisiblePluginTester, SelfDeletePluginInNPNEvaluate) {
247 if (!UITest::in_process_renderer()) { 246 if (!UITest::in_process_renderer()) {
248 GURL url = GetTestUrl(L"npapi", 247 GURL url = GetTestUrl(L"npapi",
249 L"execute_script_delete_in_npn_evaluate.html"); 248 L"execute_script_delete_in_npn_evaluate.html");
250 NavigateToURL(url); 249 NavigateToURL(url);
251 WaitForFinish("npobject_delete_plugin_in_evaluate", "1", url, 250 WaitForFinish("npobject_delete_plugin_in_evaluate", "1", url,
252 kTestCompleteCookie, kTestCompleteSuccess, 251 kTestCompleteCookie, kTestCompleteSuccess,
253 kShortWaitTimeout); 252 kShortWaitTimeout);
254 } 253 }
255 } 254 }
256 255
257 // Flaky. See http://crbug.com/17645 256 // Flaky. See http://crbug.com/17645
258 TEST_F(NPAPIVisiblePluginTester, DISABLED_OpenPopupWindowWithPlugin) { 257 TEST_F(NPAPIVisiblePluginTester, DISABLED_OpenPopupWindowWithPlugin) {
259 GURL url = GetTestUrl(L"npapi", 258 GURL url = GetTestUrl(L"npapi",
260 L"get_javascript_open_popup_with_plugin.html"); 259 L"get_javascript_open_popup_with_plugin.html");
261 NavigateToURL(url); 260 NavigateToURL(url);
262 WaitForFinish("plugin_popup_with_plugin_target", "1", url, 261 WaitForFinish("plugin_popup_with_plugin_target", "1", url,
263 kTestCompleteCookie, kTestCompleteSuccess, 262 kTestCompleteCookie, kTestCompleteSuccess,
264 action_timeout_ms()); 263 action_timeout_ms());
(...skipping 26 matching lines...) Expand all
291 TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) { 290 TEST_F(NPAPIVisiblePluginTester, MultipleInstancesSyncCalls) {
292 if (UITest::in_process_renderer()) 291 if (UITest::in_process_renderer())
293 return; 292 return;
294 293
295 GURL url = GetTestUrl(L"npapi", L"multiple_instances_sync_calls.html"); 294 GURL url = GetTestUrl(L"npapi", L"multiple_instances_sync_calls.html");
296 NavigateToURL(url); 295 NavigateToURL(url);
297 WaitForFinish("multiple_instances_sync_calls", "1", url, kTestCompleteCookie, 296 WaitForFinish("multiple_instances_sync_calls", "1", url, kTestCompleteCookie,
298 kTestCompleteSuccess, kShortWaitTimeout); 297 kTestCompleteSuccess, kShortWaitTimeout);
299 } 298 }
300 299
OLDNEW
« no previous file with comments | « chrome/test/plugin/plugin_test.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698