| OLD | NEW |
| 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" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // Desired return value of WebFrameClient::runModalBeforeUnloadDialog. | 158 // Desired return value of WebFrameClient::runModalBeforeUnloadDialog. |
| 159 DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG( | 159 DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG( |
| 160 stay_on_page_after_handling_before_unload) | 160 stay_on_page_after_handling_before_unload) |
| 161 | 161 |
| 162 // Indicates if the test already tracks a top loading frame (in any of the | 162 // Indicates if the test already tracks a top loading frame (in any of the |
| 163 // renderer processes). This flag is trying to prevent different renderer | 163 // renderer processes). This flag is trying to prevent different renderer |
| 164 // processes from tracking different top loading frames (i.e. main frame in | 164 // processes from tracking different top loading frames (i.e. main frame in |
| 165 // one renderer and an OOPIF in another renderer). | 165 // one renderer and an OOPIF in another renderer). |
| 166 DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG(have_top_loading_frame) | 166 DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG(have_top_loading_frame) |
| 167 | 167 |
| 168 // If true, new windows can be opened via javascript or by plugins. By |
| 169 // default, set to false and can be toggled to true using |
| 170 // setCanOpenWindows(). |
| 171 DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG(can_open_windows) |
| 172 |
| 168 #undef DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG | 173 #undef DEFINE_BOOL_LAYOUT_TEST_RUNTIME_FLAG |
| 169 #undef DEFINE_STRING_LAYOUT_TEST_RUNTIME_FLAG | 174 #undef DEFINE_STRING_LAYOUT_TEST_RUNTIME_FLAG |
| 170 | 175 |
| 171 // Reports whether recursing over child frames is necessary. | 176 // Reports whether recursing over child frames is necessary. |
| 172 bool dump_child_frames() const { | 177 bool dump_child_frames() const { |
| 173 if (dump_as_text()) | 178 if (dump_as_text()) |
| 174 return dump_child_frames_as_text(); | 179 return dump_child_frames_as_text(); |
| 175 else if (dump_as_markup()) | 180 else if (dump_as_markup()) |
| 176 return dump_child_frames_as_markup(); | 181 return dump_child_frames_as_markup(); |
| 177 else | 182 else |
| 178 return dump_child_frame_scroll_positions(); | 183 return dump_child_frame_scroll_positions(); |
| 179 } | 184 } |
| 180 | 185 |
| 181 private: | 186 private: |
| 182 TrackedDictionary dict_; | 187 TrackedDictionary dict_; |
| 183 | 188 |
| 184 DISALLOW_COPY_AND_ASSIGN(LayoutTestRuntimeFlags); | 189 DISALLOW_COPY_AND_ASSIGN(LayoutTestRuntimeFlags); |
| 185 }; | 190 }; |
| 186 | 191 |
| 187 } // namespace test_runner | 192 } // namespace test_runner |
| 188 | 193 |
| 189 #endif // COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_ | 194 #endif // COMPONENTS_TEST_RUNNER_LAYOUT_TEST_RUNTIME_FLAGS_H_ |
| OLD | NEW |