OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/views/website_settings/website_settings_popup_view.h
" | 5 #include "chrome/browser/ui/views/website_settings/website_settings_popup_view.h
" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" | 8 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" |
8 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
9 #include "content/public/common/ssl_status.h" | 10 #include "content/public/common/ssl_status.h" |
10 #include "content/public/test/test_browser_thread_bundle.h" | 11 #include "content/public/test/test_browser_thread_bundle.h" |
11 #include "content/public/test/test_web_contents_factory.h" | 12 #include "content/public/test/test_web_contents_factory.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "ui/views/controls/button/menu_button.h" | 14 #include "ui/views/controls/button/menu_button.h" |
14 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
15 #include "ui/views/test/scoped_views_test_helper.h" | 16 #include "ui/views/test/scoped_views_test_helper.h" |
16 | 17 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 api_->GetPermissionSelectorAt(0)->PermissionChanged(list.back()); | 175 api_->GetPermissionSelectorAt(0)->PermissionChanged(list.back()); |
175 EXPECT_EQ(1, api_->permissions_content()->child_count()); | 176 EXPECT_EQ(1, api_->permissions_content()->child_count()); |
176 EXPECT_EQ(base::ASCIIToUTF16("Ask by you"), | 177 EXPECT_EQ(base::ASCIIToUTF16("Ask by you"), |
177 api_->GetPermissionButtonAt(0)->GetText()); | 178 api_->GetPermissionButtonAt(0)->GetText()); |
178 | 179 |
179 // However, since the setting is now default, recreating the dialog with those | 180 // However, since the setting is now default, recreating the dialog with those |
180 // settings should omit the permission from the UI. | 181 // settings should omit the permission from the UI. |
181 api_->SetPermissionInfo(list); | 182 api_->SetPermissionInfo(list); |
182 EXPECT_EQ(0, api_->permissions_content()->child_count()); | 183 EXPECT_EQ(0, api_->permissions_content()->child_count()); |
183 } | 184 } |
OLD | NEW |