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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" | 9 #include "chrome/browser/managed_mode/managed_mode_url_filter.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 class ManagedModeURLFilterTest : public ::testing::Test, | 13 class ManagedModeURLFilterTest : public ::testing::Test, |
14 public ManagedModeURLFilter::Observer { | 14 public ManagedModeURLFilter::Observer { |
15 public: | 15 public: |
16 ManagedModeURLFilterTest() : filter_(new ManagedModeURLFilter) { | 16 ManagedModeURLFilterTest() : filter_(new ManagedModeURLFilter) { |
17 filter_->SetDefaultFilteringBehavior(ManagedModeURLFilter::BLOCK); | 17 filter_->SetDefaultFilteringBehavior(ManagedModeURLFilter::BLOCK); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 ManagedModeURLFilter::HasStandardScheme(GURL("gopher://example.com"))); | 198 ManagedModeURLFilter::HasStandardScheme(GURL("gopher://example.com"))); |
199 EXPECT_TRUE( | 199 EXPECT_TRUE( |
200 ManagedModeURLFilter::HasStandardScheme(GURL("ws://example.com"))); | 200 ManagedModeURLFilter::HasStandardScheme(GURL("ws://example.com"))); |
201 EXPECT_TRUE( | 201 EXPECT_TRUE( |
202 ManagedModeURLFilter::HasStandardScheme(GURL("wss://example.com"))); | 202 ManagedModeURLFilter::HasStandardScheme(GURL("wss://example.com"))); |
203 EXPECT_FALSE( | 203 EXPECT_FALSE( |
204 ManagedModeURLFilter::HasStandardScheme(GURL("wtf://example.com"))); | 204 ManagedModeURLFilter::HasStandardScheme(GURL("wtf://example.com"))); |
205 } | 205 } |
206 | 206 |
207 #endif // ENABLE_CONFIGURATION_POLICY | 207 #endif // ENABLE_CONFIGURATION_POLICY |
OLD | NEW |