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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 } // namespace | 424 } // namespace |
425 | 425 |
426 class PolicyTest : public InProcessBrowserTest { | 426 class PolicyTest : public InProcessBrowserTest { |
427 protected: | 427 protected: |
428 PolicyTest() {} | 428 PolicyTest() {} |
429 virtual ~PolicyTest() {} | 429 virtual ~PolicyTest() {} |
430 | 430 |
431 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 431 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
432 EXPECT_CALL(provider_, IsInitializationComplete(_)) | 432 EXPECT_CALL(provider_, IsInitializationComplete(_)) |
433 .WillRepeatedly(Return(true)); | 433 .WillRepeatedly(Return(true)); |
434 EXPECT_CALL(provider_, RegisterPolicyDomain(_, _)).Times(AnyNumber()); | 434 EXPECT_CALL(provider_, RegisterPolicyDomain(_)).Times(AnyNumber()); |
435 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 435 BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
436 } | 436 } |
437 | 437 |
438 virtual void SetUpOnMainThread() OVERRIDE { | 438 virtual void SetUpOnMainThread() OVERRIDE { |
439 BrowserThread::PostTask( | 439 BrowserThread::PostTask( |
440 BrowserThread::IO, FROM_HERE, | 440 BrowserThread::IO, FROM_HERE, |
441 base::Bind(chrome_browser_net::SetUrlRequestMocksEnabled, true)); | 441 base::Bind(chrome_browser_net::SetUrlRequestMocksEnabled, true)); |
442 } | 442 } |
443 | 443 |
444 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA | 444 // Makes URLRequestMockHTTPJobs serve data from content::DIR_TEST_DATA |
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2087 chrome_variations::VariationsService::GetVariationsServerURL( | 2087 chrome_variations::VariationsService::GetVariationsServerURL( |
2088 g_browser_process->local_state()); | 2088 g_browser_process->local_state()); |
2089 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); | 2089 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); |
2090 std::string value; | 2090 std::string value; |
2091 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); | 2091 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); |
2092 EXPECT_EQ("restricted", value); | 2092 EXPECT_EQ("restricted", value); |
2093 } | 2093 } |
2094 #endif | 2094 #endif |
2095 | 2095 |
2096 } // namespace policy | 2096 } // namespace policy |
OLD | NEW |