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 <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 Loading... |
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 Loading... |
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 |
OLD | NEW |