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

Unified Diff: chrome/browser/ui/webui/policy_ui_browsertest.cc

Issue 1348903007: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | components/policy/core/browser/android/policy_converter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/policy_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/policy_ui_browsertest.cc b/chrome/browser/ui/webui/policy_ui_browsertest.cc
index b7ae8a166d84317a718e80f13e59083c0c474126..161a734a735981668475392a7b3ad5eda7b84366 100644
--- a/chrome/browser/ui/webui/policy_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/policy_ui_browsertest.cc
@@ -41,7 +41,6 @@
std::vector<std::string> PopulateExpectedPolicy(
const std::string& name,
const std::string& value,
- const std::string& source,
const policy::PolicyMap::Entry* metadata,
bool unknown) {
std::vector<std::string> expected_policy;
@@ -63,8 +62,6 @@
} else {
expected_policy.push_back(std::string());
}
- // Populate expected source name.
- expected_policy.push_back(source);
// Populate expected policy name.
expected_policy.push_back(name);
@@ -121,9 +118,9 @@
}
void PolicyUITest::UpdateProviderPolicy(const policy::PolicyMap& policy) {
- provider_.UpdateChromePolicy(policy);
- base::RunLoop loop;
- loop.RunUntilIdle();
+ provider_.UpdateChromePolicy(policy);
+ base::RunLoop loop;
+ loop.RunUntilIdle();
}
void PolicyUITest::VerifyPolicies(
@@ -190,8 +187,7 @@
for (policy::Schema::Iterator it = chrome_schema.GetPropertiesIterator();
!it.IsAtEnd(); it.Advance()) {
expected_policies.push_back(
- PopulateExpectedPolicy(
- it.key(), std::string(), std::string(), nullptr, false));
+ PopulateExpectedPolicy(it.key(), std::string(), NULL, false));
}
// Retrieve the contents of the policy table from the UI and verify that it
@@ -215,28 +211,24 @@
values.Set(policy::key::kRestoreOnStartupURLs,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_CLOUD,
restore_on_startup_urls,
NULL);
expected_values[policy::key::kRestoreOnStartupURLs] = "aaa,bbb,ccc";
values.Set(policy::key::kHomepageLocation,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_MACHINE,
- policy::POLICY_SOURCE_CLOUD,
new base::StringValue("http://google.com"),
NULL);
expected_values[policy::key::kHomepageLocation] = "http://google.com";
values.Set(policy::key::kRestoreOnStartup,
policy::POLICY_LEVEL_RECOMMENDED,
policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_CLOUD,
new base::FundamentalValue(4),
NULL);
expected_values[policy::key::kRestoreOnStartup] = "4";
values.Set(policy::key::kShowHomeButton,
policy::POLICY_LEVEL_RECOMMENDED,
policy::POLICY_SCOPE_MACHINE,
- policy::POLICY_SOURCE_CLOUD,
new base::FundamentalValue(true),
NULL);
expected_values[policy::key::kShowHomeButton] = "true";
@@ -245,7 +237,6 @@
values.Set(kUnknownPolicy,
policy::POLICY_LEVEL_MANDATORY,
policy::POLICY_SCOPE_USER,
- policy::POLICY_SOURCE_PLATFORM,
new base::FundamentalValue(true),
NULL);
expected_values[kUnknownPolicy] = "true";
@@ -266,19 +257,16 @@
expected_values.find(props.key());
const std::string value =
it == expected_values.end() ? std::string() : it->second;
- const std::string source =
- it == expected_values.end() ? std::string() : "Cloud";
const policy::PolicyMap::Entry* metadata = values.Get(props.key());
expected_policies.insert(
metadata ? expected_policies.begin() + first_unset_position++ :
expected_policies.end(),
- PopulateExpectedPolicy(props.key(), value, source, metadata, false));
+ PopulateExpectedPolicy(props.key(), value, metadata, false));
}
expected_policies.insert(
expected_policies.begin() + first_unset_position++,
PopulateExpectedPolicy(kUnknownPolicy,
expected_values[kUnknownPolicy],
- "Platform",
values.Get(kUnknownPolicy),
true));
@@ -330,12 +318,11 @@
for (policy::Schema::Iterator it = chrome_schema.GetPropertiesIterator();
!it.IsAtEnd(); it.Advance()) {
expected_policies.push_back(
- PopulateExpectedPolicy(
- it.key(), std::string(), std::string(), nullptr, false));
+ PopulateExpectedPolicy(it.key(), std::string(), NULL, false));
}
// Add newly added policy to expected policy list.
expected_policies.push_back(PopulateExpectedPolicy(
- newly_added_policy_name, std::string(), std::string(), nullptr, false));
+ newly_added_policy_name, std::string(), NULL, false));
// Verify if policy UI includes policy that extension have.
VerifyPolicies(expected_policies);
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | components/policy/core/browser/android/policy_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698