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

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

Issue 883803002: Expose API on VariationsService to set the restrict mode param. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « chrome/browser/metrics/variations/variations_service_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3530 matching lines...) Expand 10 before | Expand all | Expand 10 after
3541 } 3541 }
3542 }; 3542 };
3543 3543
3544 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) { 3544 IN_PROC_BROWSER_TEST_F(PolicyVariationsServiceTest, VariationsURLIsValid) {
3545 const std::string default_variations_url = 3545 const std::string default_variations_url =
3546 chrome_variations::VariationsService:: 3546 chrome_variations::VariationsService::
3547 GetDefaultVariationsServerURLForTesting(); 3547 GetDefaultVariationsServerURLForTesting();
3548 3548
3549 const GURL url = 3549 const GURL url =
3550 chrome_variations::VariationsService::GetVariationsServerURL( 3550 chrome_variations::VariationsService::GetVariationsServerURL(
3551 g_browser_process->local_state()); 3551 g_browser_process->local_state(), std::string());
3552 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true)); 3552 EXPECT_TRUE(StartsWithASCII(url.spec(), default_variations_url, true));
3553 std::string value; 3553 std::string value;
3554 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value)); 3554 EXPECT_TRUE(net::GetValueForKeyInQuery(url, "restrict", &value));
3555 EXPECT_EQ("restricted", value); 3555 EXPECT_EQ("restricted", value);
3556 } 3556 }
3557 3557
3558 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) { 3558 IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingBlacklistSelective) {
3559 base::ListValue blacklist; 3559 base::ListValue blacklist;
3560 blacklist.Append(new base::StringValue("host.name")); 3560 blacklist.Append(new base::StringValue("host.name"));
3561 PolicyMap policies; 3561 PolicyMap policies;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
3625 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( 3625 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
3626 browser2->tab_strip_model()->GetActiveWebContents(), 3626 browser2->tab_strip_model()->GetActiveWebContents(),
3627 "domAutomationController.send(window.showModalDialog !== undefined);", 3627 "domAutomationController.send(window.showModalDialog !== undefined);",
3628 &result)); 3628 &result));
3629 EXPECT_TRUE(result); 3629 EXPECT_TRUE(result);
3630 } 3630 }
3631 3631
3632 #endif // !defined(CHROME_OS) 3632 #endif // !defined(CHROME_OS)
3633 3633
3634 } // namespace policy 3634 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/metrics/variations/variations_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698