Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RELIABILITY_RELIABILITY_TEST_SUITE_H_ | 5 #ifndef CHROME_FRAME_TEST_RELIABILITY_RELIABILITY_TEST_SUITE_H_ |
| 6 #define CHROME_FRAME_TEST_RELIABILITY_RELIABILITY_TEST_SUITE_H_ | 6 #define CHROME_FRAME_TEST_RELIABILITY_RELIABILITY_TEST_SUITE_H_ |
| 7 | 7 |
| 8 #include <objbase.h> | 8 #include "base/win/scoped_com_initializer.h" |
| 9 | |
| 10 #include "chrome_frame/test/reliability/page_load_test.h" | 9 #include "chrome_frame/test/reliability/page_load_test.h" |
| 11 #include "chrome/test/ui/ui_test_suite.h" | 10 #include "chrome/test/ui/ui_test_suite.h" |
| 12 | 11 |
| 13 class ReliabilityTestSuite : public UITestSuite { | 12 class ReliabilityTestSuite : public UITestSuite { |
| 14 public: | 13 public: |
| 15 ReliabilityTestSuite(int argc, char** argv) : UITestSuite(argc, argv) { | 14 ReliabilityTestSuite(int argc, char** argv) : UITestSuite(argc, argv) { |
| 16 } | 15 } |
| 17 | 16 |
| 18 protected: | 17 private: |
| 19 virtual void Initialize() { | 18 virtual void Initialize() { |
|
grt (UTC plus 2)
2012/10/03 13:37:28
OVERRIDE
| |
| 20 CoInitializeEx(NULL, COINIT_MULTITHREADED); | 19 com_initializer_.reset(new base::win::ScopedCOMInitializer( |
| 20 base::win::ScopedCOMInitializer::kMTA)); | |
| 21 SetPageRange(*CommandLine::ForCurrentProcess()); | 21 SetPageRange(*CommandLine::ForCurrentProcess()); |
| 22 UITestSuite::Initialize(); | 22 UITestSuite::Initialize(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 virtual void Shutdown() { | 25 virtual void Shutdown() { |
|
grt (UTC plus 2)
2012/10/03 13:37:28
OVERRIDE
| |
| 26 CoUninitialize(); | |
| 27 UITestSuite::Shutdown(); | 26 UITestSuite::Shutdown(); |
| 27 com_initializer_.reset(); | |
| 28 } | 28 } |
| 29 | |
| 30 scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_; | |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(ReliabilityTestSuite); | |
| 29 }; | 33 }; |
| 30 | 34 |
| 31 #endif // CHROME_FRAME_TEST_RELIABILITY_RELIABILITY_TEST_SUITE_H_ | 35 #endif // CHROME_FRAME_TEST_RELIABILITY_RELIABILITY_TEST_SUITE_H_ |
| 32 | 36 |
| OLD | NEW |