| 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 #include <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/prefs/pref_service.h" | |
| 9 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" | 9 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" |
| 11 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" | 12 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
| 14 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "components/prefs/pref_service.h" |
| 15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 | 16 |
| 17 namespace options { | 17 namespace options { |
| 18 | 18 |
| 19 class ClearBrowserDataBrowserTest : public OptionsUIBrowserTest { | 19 class ClearBrowserDataBrowserTest : public OptionsUIBrowserTest { |
| 20 protected: | 20 protected: |
| 21 void ClickElement(const std::string& selector) { | 21 void ClickElement(const std::string& selector) { |
| 22 bool element_enabled = false; | 22 bool element_enabled = false; |
| 23 ASSERT_NO_FATAL_FAILURE(GetElementEnabledState(selector, &element_enabled)); | 23 ASSERT_NO_FATAL_FAILURE(GetElementEnabledState(selector, &element_enabled)); |
| 24 ASSERT_TRUE(element_enabled); | 24 ASSERT_TRUE(element_enabled); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // However, expect the commit button to be re-enabled if any of the data types | 104 // However, expect the commit button to be re-enabled if any of the data types |
| 105 // gets selected to be cleared. | 105 // gets selected to be cleared. |
| 106 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { | 106 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { |
| 107 prefs->SetBoolean(kDataTypes[i], true); | 107 prefs->SetBoolean(kDataTypes[i], true); |
| 108 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); | 108 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); |
| 109 prefs->SetBoolean(kDataTypes[i], false); | 109 prefs->SetBoolean(kDataTypes[i], false); |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace options | 113 } // namespace options |
| OLD | NEW |