blob: 3b23a8aa8dd12767f4e7d10e85da931936eba78a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome_frame/test/reliability/reliability_test_suite.h"
#include "base/command_line.h"
#include "chrome/common/chrome_paths.h"
#include "chrome_frame/test_utils.h"
const wchar_t kRegisterDllFlag[] = L"register";
int main(int argc, char **argv) {
// If --register is passed, then we need to ensure that Chrome Frame is
// registered before starting up the reliability tests.
CommandLine::Init(argc, argv);
CommandLine* cmd_line = CommandLine::ForCurrentProcess();
DCHECK(cmd_line);
// We create this slightly early as it is the one who instantiates THE
// AtExitManager which some of the other stuff below relies on.
ReliabilityTestSuite test_suite(argc, argv);
int result = -1;
if (cmd_line->HasSwitch(kRegisterDllFlag)) {
std::wstring dll_path = cmd_line->GetSwitchValue(kRegisterDllFlag);
// Run() must be called within the scope of the ScopedChromeFrameRegistrar
// to ensure that the correct DLL remains registered during the tests.
ScopedChromeFrameRegistrar scoped_chrome_frame_registrar(dll_path);
result = test_suite.Run();
} else {
result = test_suite.Run();
}
return result;
}
|