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

Side by Side Diff: components/test_runner/layout_test_runtime_flags.h

Issue 1857043002: Remove unused functions under components/test_runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 8 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
« no previous file with comments | « no previous file | components/test_runner/mock_web_media_stream_center.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_
6 #define COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_ 6 #define COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "components/test_runner/test_runner_export.h" 13 #include "components/test_runner/test_runner_export.h"
14 #include "components/test_runner/tracked_dictionary.h" 14 #include "components/test_runner/tracked_dictionary.h"
15 15
16 namespace test_runner { 16 namespace test_runner {
17 17
18 // LayoutTestRuntimeFlags stores flags controlled by layout tests at runtime 18 // LayoutTestRuntimeFlags stores flags controlled by layout tests at runtime
19 // (i.e. by calling testRunner.dumpAsText() or testRunner.waitUntilDone()). 19 // (i.e. by calling testRunner.dumpAsText() or testRunner.waitUntilDone()).
20 // Changes to the flags are tracked (to help replicate them across renderers). 20 // Changes to the flags are tracked (to help replicate them across renderers).
21 class TEST_RUNNER_EXPORT LayoutTestRuntimeFlags { 21 class TEST_RUNNER_EXPORT LayoutTestRuntimeFlags {
22 public: 22 public:
23 // Creates default flags (see also the Reset method). 23 // Creates default flags (see also the Reset method).
24 LayoutTestRuntimeFlags(); 24 LayoutTestRuntimeFlags();
25 25
26 // Resets all the values to their defaults. 26 // Resets all the values to their defaults.
27 void Reset(); 27 void Reset();
28 28
29 TrackedDictionary& tracked_dictionary() { return dict_; } 29 TrackedDictionary& tracked_dictionary() { return dict_; }
30 const TrackedDictionary& tracked_dictionary() const { return dict_; }
31 30
32 #define DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG(name) \ 31 #define DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG(name) \
33 bool name() const { \ 32 bool name() const { \
34 bool result; \ 33 bool result; \
35 bool found = dict_.current_values().GetBoolean(#name, &result); \ 34 bool found = dict_.current_values().GetBoolean(#name, &result); \
36 DCHECK(found); \ 35 DCHECK(found); \
37 return result; \ 36 return result; \
38 } \ 37 } \
39 void set_##name(bool new_value) { dict_.SetBoolean(#name, new_value); } 38 void set_##name(bool new_value) { dict_.SetBoolean(#name, new_value); }
40 39
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 115
117 private: 116 private:
118 TrackedDictionary dict_; 117 TrackedDictionary dict_;
119 118
120 DISALLOW_COPY_AND_ASSIGN(LayoutTestRuntimeFlags); 119 DISALLOW_COPY_AND_ASSIGN(LayoutTestRuntimeFlags);
121 }; 120 };
122 121
123 } // namespace test_runner 122 } // namespace test_runner
124 123
125 #endif // COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_ 124 #endif // COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/mock_web_media_stream_center.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698