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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
11 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" | 11 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" |
12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 12 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" | 14 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" |
15 #include "chrome/browser/ui/browser_finder.h" | 15 #include "chrome/browser/ui/browser_finder.h" |
16 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" | 16 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/test/base/in_process_browser_test.h" | 18 #include "chrome/test/base/in_process_browser_test.h" |
19 #include "chrome/test/base/ui_test_utils.h" | 19 #include "chrome/test/base/ui_test_utils.h" |
20 #include "components/content_settings/core/common/content_settings_types.h" | 20 #include "components/content_settings/core/common/content_settings_types.h" |
| 21 #include "components/network_session_configurator/common/network_switches.h" |
21 #include "components/rappor/test_rappor_service.h" | 22 #include "components/rappor/test_rappor_service.h" |
22 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
23 #include "content/public/test/test_navigation_observer.h" | 24 #include "content/public/test/test_navigation_observer.h" |
24 #include "net/dns/mock_host_resolver.h" | 25 #include "net/dns/mock_host_resolver.h" |
25 #include "net/test/embedded_test_server/embedded_test_server.h" | 26 #include "net/test/embedded_test_server/embedded_test_server.h" |
26 #include "net/test/embedded_test_server/request_handler_util.h" | 27 #include "net/test/embedded_test_server/request_handler_util.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
28 | 29 |
29 const base::FilePath::CharType kDocRoot[] = | 30 const base::FilePath::CharType kDocRoot[] = |
30 FILE_PATH_LITERAL("chrome/test/data"); | 31 FILE_PATH_LITERAL("chrome/test/data"); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 content_settings::POPUPS_ACTION_CLICKED_MANAGE_POPUPS_BLOCKING, 1); | 280 content_settings::POPUPS_ACTION_CLICKED_MANAGE_POPUPS_BLOCKING, 1); |
280 | 281 |
281 model->OnRadioClicked(model->kAllowButtonIndex); | 282 model->OnRadioClicked(model->kAllowButtonIndex); |
282 delete model.release(); | 283 delete model.release(); |
283 histograms.ExpectBucketCount( | 284 histograms.ExpectBucketCount( |
284 "ContentSettings.Popups", | 285 "ContentSettings.Popups", |
285 content_settings::POPUPS_ACTION_SELECTED_ALWAYS_ALLOW_POPUPS_FROM, 1); | 286 content_settings::POPUPS_ACTION_SELECTED_ALWAYS_ALLOW_POPUPS_FROM, 1); |
286 | 287 |
287 histograms.ExpectTotalCount("ContentSettings.Popups", 5); | 288 histograms.ExpectTotalCount("ContentSettings.Popups", 5); |
288 } | 289 } |
OLD | NEW |