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

Side by Side Diff: chrome_frame/test/chrome_frame_test_utils.h

Issue 2374002: Add chrome frame tests for common navigation cases to ensure IE still works.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 7 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_frame/chrome_frame.gyp ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | 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) 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 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <string> 10 #include <string>
11 #include <exdisp.h> 11 #include <exdisp.h>
12 #include <exdispid.h> 12 #include <exdispid.h>
13 #include <mshtml.h> 13 #include <mshtml.h>
14 #include <shlguid.h> 14 #include <shlguid.h>
15 #include <shobjidl.h> 15 #include <shobjidl.h>
16 #include <windows.h> 16 #include <windows.h>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/message_loop.h" 19 #include "base/message_loop.h"
20 #include "base/process_util.h" 20 #include "base/process_util.h"
21 #include "base/scoped_comptr_win.h" 21 #include "base/scoped_comptr_win.h"
22 #include "base/scoped_variant_win.h" 22 #include "base/scoped_variant_win.h"
23 23
24 #include "chrome_frame/test_utils.h" 24 #include "chrome_frame/test_utils.h"
25 #include "chrome_frame/test/simulate_input.h" 25 #include "chrome_frame/test/simulate_input.h"
26 #include "chrome_frame/test/window_watchdog.h" 26 #include "chrome_frame/test/window_watchdog.h"
27 #include "chrome_frame/utils.h" 27 #include "chrome_frame/utils.h"
28 #include "gmock/gmock.h"
28 29
29 // Include without path to make GYP build see it. 30 // Include without path to make GYP build see it.
30 #include "chrome_tab.h" // NOLINT 31 #include "chrome_tab.h" // NOLINT
31 32
32 namespace chrome_frame_test { 33 namespace chrome_frame_test {
33 34
34 int CloseVisibleWindowsOnAllThreads(HANDLE process); 35 int CloseVisibleWindowsOnAllThreads(HANDLE process);
35 36
36 base::ProcessHandle LaunchFirefox(const std::wstring& url); 37 base::ProcessHandle LaunchFirefox(const std::wstring& url);
37 base::ProcessHandle LaunchOpera(const std::wstring& url); 38 base::ProcessHandle LaunchOpera(const std::wstring& url);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 339
339 // Returns the profile path to be used for IE. This varies as per version. 340 // Returns the profile path to be used for IE. This varies as per version.
340 FilePath GetProfilePathForIE(); 341 FilePath GetProfilePathForIE();
341 342
342 // Returns the version of the exe passed in. 343 // Returns the version of the exe passed in.
343 std::wstring GetExeVersion(const std::wstring& exe_path); 344 std::wstring GetExeVersion(const std::wstring& exe_path);
344 345
345 // Returns the version of Internet Explorer on the machine. 346 // Returns the version of Internet Explorer on the machine.
346 IEVersion GetInstalledIEVersion(); 347 IEVersion GetInstalledIEVersion();
347 348
349 // Posts a delayed task to send an extended keystroke |repeat| times with an
350 // optional modifier via SendInput. Following this, the enter key is sent.
351 void DelaySendExtendedKeysEnter(TimedMsgLoop* loop, int delay, char c,
352 int repeat, simulate_input::Modifier mod);
353
354 // Returns an action which posts a delayed task that sends the given
355 // scan code via SendInput.
356 ACTION_P4(DelaySendScanCode, loop, delay, c, mod) {
357 loop->PostDelayedTask(FROM_HERE, NewRunnableFunction(
358 simulate_input::SendScanCode, c, mod), delay);
359 }
360
348 // A convenience class to close all open IE windows at the end 361 // A convenience class to close all open IE windows at the end
349 // of a scope. It's more convenient to do it this way than to 362 // of a scope. It's more convenient to do it this way than to
350 // explicitly call chrome_frame_test::CloseAllIEWindows at the 363 // explicitly call chrome_frame_test::CloseAllIEWindows at the
351 // end of a test since part of the test's cleanup code may be 364 // end of a test since part of the test's cleanup code may be
352 // in object destructors that would run after CloseAllIEWindows 365 // in object destructors that would run after CloseAllIEWindows
353 // would get called. 366 // would get called.
354 // Ideally all IE windows should be closed when this happens so 367 // Ideally all IE windows should be closed when this happens so
355 // if the test ran normally, we should not have any windows to 368 // if the test ran normally, we should not have any windows to
356 // close at this point. 369 // close at this point.
357 class CloseIeAtEndOfScope { 370 class CloseIeAtEndOfScope {
(...skipping 16 matching lines...) Expand all
374 class ComStackObjectWithUninitialize : public CComObjectStackEx<Base> { 387 class ComStackObjectWithUninitialize : public CComObjectStackEx<Base> {
375 public: 388 public:
376 virtual ~ComStackObjectWithUninitialize() { 389 virtual ~ComStackObjectWithUninitialize() {
377 Base::Uninitialize(); 390 Base::Uninitialize();
378 } 391 }
379 }; 392 };
380 393
381 } // namespace chrome_frame_test 394 } // namespace chrome_frame_test
382 395
383 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ 396 #endif // CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome_frame/chrome_frame.gyp ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698