| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/webui/options/core_options_handler.h" | 5 #include "chrome/browser/webui/options/core_options_handler.h" |
| 6 #include "chrome/browser/webui/web_ui_browsertest.h" | |
| 7 #include "chrome/common/url_constants.h" | 6 #include "chrome/common/url_constants.h" |
| 8 #include "chrome/test/ui_test_utils.h" | 7 #include "chrome/test/ui_test_utils.h" |
| 8 #include "content/browser/webui/web_ui_browsertest.h" |
| 9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 12 |
| 13 using ::testing::StrictMock; | 13 using ::testing::StrictMock; |
| 14 using ::testing::_; | 14 using ::testing::_; |
| 15 | 15 |
| 16 MATCHER_P(Eq_ListValue, inList, "") { | 16 MATCHER_P(Eq_ListValue, inList, "") { |
| 17 return arg->Equals(inList); | 17 return arg->Equals(inList); |
| 18 } | 18 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 true_list_value.Append(Value::CreateBooleanValue(true)); | 83 true_list_value.Append(Value::CreateBooleanValue(true)); |
| 84 true_list_value.Append( | 84 true_list_value.Append( |
| 85 Value::CreateStringValue("Options_Homepage_HomeButton")); | 85 Value::CreateStringValue("Options_Homepage_HomeButton")); |
| 86 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUISettingsURL)); | 86 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUISettingsURL)); |
| 87 EXPECT_CALL(mock_core_options_handler_, | 87 EXPECT_CALL(mock_core_options_handler_, |
| 88 HandleSetBooleanPref(Eq_ListValue(&true_list_value))); | 88 HandleSetBooleanPref(Eq_ListValue(&true_list_value))); |
| 89 ASSERT_TRUE(RunWebUITest( | 89 ASSERT_TRUE(RunWebUITest( |
| 90 FILE_PATH_LITERAL("settings_set_boolean_pref_triggers.js"))); | 90 FILE_PATH_LITERAL("settings_set_boolean_pref_triggers.js"))); |
| 91 } | 91 } |
| 92 | 92 |
| OLD | NEW |