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

Unified Diff: extensions/browser/api/system_cpu/system_cpu_apitest.cc

Issue 2802593005: extensions: Add CPU temperatures field to system.cpu.getInfo() function (Closed)
Patch Set: Responded to tbarzic's feedback Created 3 years, 8 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 | « extensions/browser/api/system_cpu/cpu_info_provider.cc ('k') | extensions/common/api/system_cpu.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/system_cpu/system_cpu_apitest.cc
diff --git a/extensions/browser/api/system_cpu/system_cpu_apitest.cc b/extensions/browser/api/system_cpu/system_cpu_apitest.cc
index eabacff9393df97dbea45bf326e9ab95bf9df720..5685db52ec3a74c4346dfd0df81472032c15be23 100644
--- a/extensions/browser/api/system_cpu/system_cpu_apitest.cc
+++ b/extensions/browser/api/system_cpu/system_cpu_apitest.cc
@@ -28,6 +28,10 @@ class MockCpuInfoProviderImpl : public CpuInfoProvider {
info_.processors[0].usage.user = 2;
info_.processors[0].usage.idle = 3;
info_.processors[0].usage.total = 6;
+
+ // The fractional part of these values should be exactly represented as
+ // floating points to avoid rounding errors.
+ info_.temperatures = {30.125, 40.0625};
return true;
}
« no previous file with comments | « extensions/browser/api/system_cpu/cpu_info_provider.cc ('k') | extensions/common/api/system_cpu.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698