OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/test/wtflib/wtf.h" |
| 6 |
| 7 // TODO(jcarollo): Don't do this. |
| 8 #if defined(UNIT_TEST) |
| 9 #include "base/at_exit.h" |
| 10 #else |
| 11 #define UNIT_TEST |
| 12 #include "base/at_exit.h" |
| 13 #undef UNIT_TEST |
| 14 #endif |
| 15 |
| 16 #include "base/file_path.h" |
| 17 #include "chrome/test/wtflib/wtf_testsuite.h" |
| 18 |
| 19 |
| 20 WTF::WTF() |
| 21 : at_exit_manager_(new base::ShadowingAtExitManager), |
| 22 wtf_testsuite_(new WTFTestSuite(false, std::wstring())) { |
| 23 } |
| 24 |
| 25 WTF::~WTF() { |
| 26 wtf_testsuite_->TearDown(); |
| 27 delete wtf_testsuite_; |
| 28 delete at_exit_manager_; |
| 29 } |
| 30 |
| 31 void WTF::Initialize(const std::string& browser_dir) { |
| 32 wtf_testsuite_->Initialize(FilePath(browser_dir)); |
| 33 wtf_testsuite_->SetUp(); |
| 34 } |
| 35 |
| 36 void WTF::NavigateToURL(const std::string url_string) { |
| 37 wtf_testsuite_->NavigateToURL(url_string.c_str()); |
| 38 } |
| 39 |
| 40 bool WTF::OpenNewBrowserWindow(bool show) { |
| 41 return wtf_testsuite_->OpenNewBrowserWindow(show); |
| 42 } |
OLD | NEW |