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

Side by Side Diff: chrome_frame/test_utils.h

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/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_frame/test/util_unittests.cc ('k') | 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_FRAME_TEST_UTILS_H_
6 #define CHROME_FRAME_TEST_UTILS_H_
7
8 #include <string>
9
10 // Helper class used to register different chrome frame DLLs while running
11 // tests. At construction, this registers the DLL found in the build path.
12 // At destruction, again registers the DLL found in the build path if another
13 // DLL has since been registered. Triggers GTEST asserts on failure.
14 //
15 // TODO(robertshield): Ideally, make this class restore the originally
16 // registered chrome frame DLL (e.g. by looking in HKCR) on destruction.
17 class ScopedChromeFrameRegistrar {
18 public:
19 ScopedChromeFrameRegistrar();
20 virtual ~ScopedChromeFrameRegistrar();
21
22 void RegisterChromeFrameAtPath(const std::wstring& path);
23 void RegisterReferenceChromeFrameBuild();
24
25 std::wstring GetChromeFrameDllPath() const;
26
27 static std::wstring GetChromeFrameBuildPath();
28 static void RegisterAtPath(const std::wstring& path);
29 static void RegisterDefaults();
30
31 private:
32 // Contains the path of the most recently registered npchrome_tab.dll.
33 std::wstring new_chrome_frame_dll_path_;
34
35 // Contains the path of the npchrome_tab.dll to be registered at destruction.
36 std::wstring original_dll_path_;
37 };
38
39 #endif // CHROME_FRAME_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « chrome_frame/test/util_unittests.cc ('k') | chrome_frame/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698