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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 "domAutomationController.send(context != null);", 461 "domAutomationController.send(context != null);",
462 &result)); 462 &result));
463 return result; 463 return result;
464 } 464 }
465 465
466 bool IsJavascriptEnabled(content::WebContents* contents) { 466 bool IsJavascriptEnabled(content::WebContents* contents) {
467 std::unique_ptr<base::Value> value = 467 std::unique_ptr<base::Value> value =
468 content::ExecuteScriptAndGetValue(contents->GetMainFrame(), "123"); 468 content::ExecuteScriptAndGetValue(contents->GetMainFrame(), "123");
469 int result = 0; 469 int result = 0;
470 if (!value->GetAsInteger(&result)) 470 if (!value->GetAsInteger(&result))
471 EXPECT_EQ(base::Value::TYPE_NULL, value->GetType()); 471 EXPECT_EQ(base::Value::Type::NONE, value->GetType());
472 return result == 123; 472 return result == 123;
473 } 473 }
474 474
475 bool IsNetworkPredictionEnabled(PrefService* prefs) { 475 bool IsNetworkPredictionEnabled(PrefService* prefs) {
476 return chrome_browser_net::CanPrefetchAndPrerenderUI(prefs) == 476 return chrome_browser_net::CanPrefetchAndPrerenderUI(prefs) ==
477 chrome_browser_net::NetworkPredictionStatus::ENABLED; 477 chrome_browser_net::NetworkPredictionStatus::ENABLED;
478 } 478 }
479 479
480 void FlushBlacklistPolicy() { 480 void FlushBlacklistPolicy() {
481 // Updates of the URLBlacklist are done on IO, after building the blacklist 481 // Updates of the URLBlacklist are done on IO, after building the blacklist
(...skipping 3746 matching lines...) Expand 10 before | Expand all | Expand 10 after
4228 4228
4229 SetEmptyPolicy(); 4229 SetEmptyPolicy();
4230 // Policy not set. 4230 // Policy not set.
4231 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4231 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4232 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4232 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4233 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4233 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4234 } 4234 }
4235 #endif // defined(OS_CHROMEOS) 4235 #endif // defined(OS_CHROMEOS)
4236 4236
4237 } // namespace policy 4237 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698