| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 IN_PROC_BROWSER_TEST_F(PolicyTest, URLBlacklist) { | 1460 IN_PROC_BROWSER_TEST_F(PolicyTest, URLBlacklist) { |
| 1461 // Checks that URLs can be blacklisted, and that exceptions can be made to | 1461 // Checks that URLs can be blacklisted, and that exceptions can be made to |
| 1462 // the blacklist. | 1462 // the blacklist. |
| 1463 | 1463 |
| 1464 // Filter |kURLS| on IO thread, so that requests to those hosts end up | 1464 // Filter |kURLS| on IO thread, so that requests to those hosts end up |
| 1465 // as URLRequestMockHTTPJobs. | 1465 // as URLRequestMockHTTPJobs. |
| 1466 const char* kURLS[] = { | 1466 const char* kURLS[] = { |
| 1467 "http://aaa.com/empty.html", | 1467 "http://aaa.com/empty.html", |
| 1468 "http://bbb.com/empty.html", | 1468 "http://bbb.com/empty.html", |
| 1469 "http://sub.bbb.com/empty.html", | 1469 "http://sub.bbb.com/empty.html", |
| 1470 "http://bbb.com/policy/device_management", | 1470 "http://bbb.com/policy/blank.html", |
| 1471 }; | 1471 }; |
| 1472 BrowserThread::PostTaskAndReply( | 1472 BrowserThread::PostTaskAndReply( |
| 1473 BrowserThread::IO, FROM_HERE, | 1473 BrowserThread::IO, FROM_HERE, |
| 1474 base::Bind(RedirectHostsToTestData, kURLS, arraysize(kURLS)), | 1474 base::Bind(RedirectHostsToTestData, kURLS, arraysize(kURLS)), |
| 1475 MessageLoop::QuitClosure()); | 1475 MessageLoop::QuitClosure()); |
| 1476 content::RunMessageLoop(); | 1476 content::RunMessageLoop(); |
| 1477 | 1477 |
| 1478 // Verify that all the URLs can be opened without a blacklist. | 1478 // Verify that all the URLs can be opened without a blacklist. |
| 1479 for (size_t i = 0; i < arraysize(kURLS); ++i) | 1479 for (size_t i = 0; i < arraysize(kURLS); ++i) |
| 1480 CheckCanOpenURL(browser(), kURLS[i]); | 1480 CheckCanOpenURL(browser(), kURLS[i]); |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1902 this)); | 1902 this)); |
| 1903 | 1903 |
| 1904 MessageLoop::current()->Run(); | 1904 MessageLoop::current()->Run(); |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, | 1907 INSTANTIATE_TEST_CASE_P(MediaStreamDevicesControllerBrowserTestInstance, |
| 1908 MediaStreamDevicesControllerBrowserTest, | 1908 MediaStreamDevicesControllerBrowserTest, |
| 1909 testing::Bool()); | 1909 testing::Bool()); |
| 1910 | 1910 |
| 1911 } // namespace policy | 1911 } // namespace policy |
| OLD | NEW |