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. |
44 IN_PROC_BROWSER_TEST_F(ClearBrowserDataBrowserTest, | 45 IN_PROC_BROWSER_TEST_F(ClearBrowserDataBrowserTest, |
45 CommitButtonDisabledWhileDeletionInProgress) { | 46 DISABLED_CommitButtonDisabledWhileDeletionInProgress) { |
46 const char kCommitButtonId[] = "#clear-browser-data-commit"; | 47 const char kCommitButtonId[] = "#clear-browser-data-commit"; |
47 BrowsingDataRemoverCompletionInhibitor completion_inhibitor; | 48 BrowsingDataRemoverCompletionInhibitor completion_inhibitor; |
48 | 49 |
49 // Navigate to the Clear Browsing Data dialog to ensure that the commit button | 50 // Navigate to the Clear Browsing Data dialog to ensure that the commit button |
50 // is initially enabled, usable, and gets disabled after having been pressed. | 51 // is initially enabled, usable, and gets disabled after having been pressed. |
51 NavigateToSettingsSubpage(chrome::kClearBrowserDataSubPage); | 52 NavigateToSettingsSubpage(chrome::kClearBrowserDataSubPage); |
52 ASSERT_NO_FATAL_FAILURE(ClickElement(kCommitButtonId)); | 53 ASSERT_NO_FATAL_FAILURE(ClickElement(kCommitButtonId)); |
53 EXPECT_FALSE(IsElementEnabled(kCommitButtonId)); | 54 EXPECT_FALSE(IsElementEnabled(kCommitButtonId)); |
54 | 55 |
55 completion_inhibitor.BlockUntilNearCompletion(); | 56 completion_inhibitor.BlockUntilNearCompletion(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // However, expect the commit button to be re-enabled if any of the data types | 92 // However, expect the commit button to be re-enabled if any of the data types |
92 // gets selected to be cleared. | 93 // gets selected to be cleared. |
93 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { | 94 for (size_t i = 0; i < arraysize(kDataTypes); ++i) { |
94 prefs->SetBoolean(kDataTypes[i], true); | 95 prefs->SetBoolean(kDataTypes[i], true); |
95 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); | 96 EXPECT_TRUE(IsElementEnabled(kCommitButtonId)); |
96 prefs->SetBoolean(kDataTypes[i], false); | 97 prefs->SetBoolean(kDataTypes[i], false); |
97 } | 98 } |
98 } | 99 } |
99 | 100 |
100 } // namespace options | 101 } // namespace options |
OLD | NEW |