| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ |
| 6 #define CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ | 6 #define CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // member variables and add the call to Init() into SetUpOnMainThread. | 39 // member variables and add the call to Init() into SetUpOnMainThread. |
| 40 // Sample use: | 40 // Sample use: |
| 41 // | 41 // |
| 42 // class MyTestClass : public InProcessBrowserTest { | 42 // class MyTestClass : public InProcessBrowserTest { |
| 43 // public: | 43 // public: |
| 44 // MyTestClass() : | 44 // MyTestClass() : |
| 45 // cld_data_scope( | 45 // cld_data_scope( |
| 46 // test::CldDataHarnessFactory::Get->CreateCldDataHarness()) { | 46 // test::CldDataHarnessFactory::Get->CreateCldDataHarness()) { |
| 47 // // (your additional setup code here) | 47 // // (your additional setup code here) |
| 48 // } | 48 // } |
| 49 // virtual void SetUpOnMainThread() override { | 49 // void SetUpOnMainThread() override { |
| 50 // cld_data_scope->Init(); | 50 // cld_data_scope->Init(); |
| 51 // InProcessBrowserTest::SetUpOnMainThread(); | 51 // InProcessBrowserTest::SetUpOnMainThread(); |
| 52 // } | 52 // } |
| 53 // private: | 53 // private: |
| 54 // scoped_ptr<test::CldDataHarness> cld_data_scope; | 54 // scoped_ptr<test::CldDataHarness> cld_data_scope; |
| 55 // }; | 55 // }; |
| 56 // | 56 // |
| 57 class CldDataHarness { | 57 class CldDataHarness { |
| 58 public: | 58 public: |
| 59 CldDataHarness() {} | 59 CldDataHarness() {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // be used in testing scenarios without accessing the network. | 103 // be used in testing scenarios without accessing the network. |
| 104 void GetTestDataSourceDirectory(base::FilePath* out_path); | 104 void GetTestDataSourceDirectory(base::FilePath* out_path); |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 DISALLOW_COPY_AND_ASSIGN(CldDataHarness); | 107 DISALLOW_COPY_AND_ASSIGN(CldDataHarness); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace test | 110 } // namespace test |
| 111 | 111 |
| 112 #endif // CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ | 112 #endif // CHROME_BROWSER_TRANSLATE_CLD_DATA_HARNESS_H_ |
| OLD | NEW |