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

Side by Side Diff: chrome/browser/translate/translate_browser_test_utils.h

Issue 285293004: Allow browser tests to run with dynamic CLD data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cld_uma
Patch Set: toyoshim@'s comments Created 6 years, 7 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_TEST_UTILS_H_
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_TEST_UTILS_H_
7
8 #include "base/macros.h"
9
10 namespace test {
11
12 // A utility class that sets up CLD dynamic data when constructed, and cleans
13 // it up when destroyed.
14 // The test data for this class lives under:
15 // src/chrome/test/data/cld2_component
16 class ScopedCLDDynamicDataHarness {
17 public:
18 // Invokes whatever dark magic is required in order to make the CLD data
19 // available immediately to testing code. The implementation may vary
20 // depending on the following defines, bypassing any external data access
21 // requirements.
22 ScopedCLDDynamicDataHarness();
23
24 // Reverses the work done by the constructor: any files and/or directories
25 // that would be created by the constructor are immediately and irrevocably
26 // deleted.
27 // If dynamic data is not currently available for any reason, this method has
28 // no net effect on the runtime.
29 ~ScopedCLDDynamicDataHarness();
30
31 private:
32 void ClearStandaloneDataFileState();
33
34 DISALLOW_COPY_AND_ASSIGN(ScopedCLDDynamicDataHarness);
35 };
36
37 } // namespace test
38
39 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_BROWSER_TEST_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698