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

Unified Diff: src/platform/power_manager/xidle_unittest.cc

Issue 652147: Add xidle library to power_manager for testing how long the user has been idle (Closed)
Patch Set: Fix issues pointed out by rtc Created 10 years, 10 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 | « src/platform/power_manager/xidle-example.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/power_manager/xidle_unittest.cc
diff --git a/src/platform/power_manager/xidle_unittest.cc b/src/platform/power_manager/xidle_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6f9eba265aafe8bca19237335b073b9f800ba9cb
--- /dev/null
+++ b/src/platform/power_manager/xidle_unittest.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <gtest/gtest.h>
+#include <unistd.h>
+
+#include <base/command_line.h>
+#include <base/logging.h>
+
+#include "power_manager/xidle.h"
+
+namespace chromeos {
+
+class XIdleTest : public ::testing::Test { };
+
+TEST(XIdleTest, GetIdleTimeTest) {
+ uint64 idleTime = kuint64max;
+ chromeos::XIdle idle;
+ if (idle.getIdleTime(&idleTime))
+ ASSERT_NE(idleTime, kuint64max);
+ else
+ ASSERT_EQ(idleTime, kuint64max);
+}
+
+} // namespace login_manager
« no previous file with comments | « src/platform/power_manager/xidle-example.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698