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 "base/prefs/pref_service.h" | 5 #include "base/prefs/pref_service.h" |
6 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" | 6 #include "chrome/browser/browsing_data/browsing_data_remover_test_util.h" |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" | 9 #include "chrome/browser/ui/webui/options/options_ui_browsertest.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 const std::string& selector, | 34 const std::string& selector, |
35 bool* enabled) { | 35 bool* enabled) { |
36 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( | 36 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
37 GetSettingsFrame(), | 37 GetSettingsFrame(), |
38 "window.domAutomationController.send(!document.querySelector('" + | 38 "window.domAutomationController.send(!document.querySelector('" + |
39 selector + "').disabled);", | 39 selector + "').disabled);", |
40 enabled)); | 40 enabled)); |
41 } | 41 } |
42 }; | 42 }; |
43 | 43 |
44 // Disabled, see http://crbug.com/396752. | |
45 IN_PROC_BROWSER_TEST_F(ClearBrowserDataBrowserTest, | 44 IN_PROC_BROWSER_TEST_F(ClearBrowserDataBrowserTest, |
46 DISABLED_CommitButtonDisabledWhileDeletionInProgress) { | 45 CommitButtonDisabledWhileDeletionInProgress) { |
47 const char kCommitButtonId[] = "#clear-browser-data-commit"; | 46 const char kCommitButtonId[] = "#clear-browser-data-commit"; |
48 BrowsingDataRemoverCompletionInhibitor completion_inhibitor; | 47 BrowsingDataRemoverCompletionInhibitor completion_inhibitor; |
49 | 48 |
50 // Navigate to the Clear Browsing Data dialog to ensure that the commit button | 49 // Navigate to the Clear Browsing Data dialog to ensure that the commit button |
51 // is initially enabled, usable, and gets disabled after having been pressed. | 50 // is initially enabled, usable, and gets disabled after having been pressed. |
52 NavigateToSettingsSubpage(chrome::kClearBrowserDataSubPage); | 51 NavigateToSettingsSubpage(chrome::kClearBrowserDataSubPage); |
53 ASSERT_NO_FATAL_FAILURE(ClickElement(kCommitButtonId)); | 52 ASSERT_NO_FATAL_FAILURE(ClickElement(kCommitButtonId)); |
54 EXPECT_FALSE(IsElementEnabled(kCommitButtonId)); | 53 EXPECT_FALSE(IsElementEnabled(kCommitButtonId)); |
55 | 54 |
56 completion_inhibitor.BlockUntilNearCompletion(); | 55 completion_inhibitor.BlockUntilNearCompletion(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // However, expect the commit button to be re-enabled if any of the data types | 91 // However, expect the commit button to be re-enabled if any of the data types |
93 // gets selected to be cleared. | 92 // gets selected to be cleared. |
94 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { | 93 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { |
95 prefs->SetBoolean(kDataTypes[i], true); | 94 prefs->SetBoolean(kDataTypes[i], true); |
96 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); | 95 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); |
97 prefs->SetBoolean(kDataTypes[i], false); | 96 prefs->SetBoolean(kDataTypes[i], false); |
98 } | 97 } |
99 } | 98 } |
100 | 99 |
101 } // namespace options | 100 } // namespace options |
OLD | NEW |