Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 15061007: Added a PolicyDomainDescriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments, rebase on new PolicySchema Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698