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

Unified Diff: omaha_request_action_unittest.cc

Issue 2808082: AU: Remove instances of Omaha ID -- machine ID and user ID. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: comment typo fix Created 10 years, 5 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 | « omaha_request_action.h ('k') | omaha_request_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_action_unittest.cc
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 5ac0811b9f5e12c563cda594eefae00097799c1a..f4dcd1e9050077304e268707ab71e64129afb8dd 100755
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -35,8 +35,6 @@ class OmahaRequestActionTest : public ::testing::Test { };
namespace {
const OmahaRequestParams kDefaultTestParams(
- "machine_id",
- "user_id",
OmahaRequestParams::kOsPlatform,
OmahaRequestParams::kOsVersion,
"service_pack",
@@ -406,9 +404,7 @@ TEST(OmahaRequestActionTest, XmlEncodeTest) {
vector<char> post_data;
// Make sure XML Encode is being called on the params
- OmahaRequestParams params("testthemachine<id",
- "testtheuser_id&lt;",
- OmahaRequestParams::kOsPlatform,
+ OmahaRequestParams params(OmahaRequestParams::kOsPlatform,
OmahaRequestParams::kOsVersion,
"testtheservice_pack>",
"x86 generic<id",
@@ -576,9 +572,7 @@ TEST(OmahaRequestActionTest, FormatDeltaOkayOutputTest) {
bool delta_okay = i == 1;
const char* delta_okay_str = delta_okay ? "true" : "false";
vector<char> post_data;
- OmahaRequestParams params("machine_id",
- "user_id",
- OmahaRequestParams::kOsPlatform,
+ OmahaRequestParams params(OmahaRequestParams::kOsPlatform,
OmahaRequestParams::kOsVersion,
"service_pack",
"x86-generic",
@@ -738,7 +732,7 @@ TEST(OmahaRequestActionTest, BackInTimePingTest) {
TEST(OmahaRequestActionTest, LastPingDayUpdateTest) {
// This test checks that the action updates the last ping day to now
- // minus 200 seconds with a slack for 5 seconds. Therefore, the test
+ // minus 200 seconds with a slack of 5 seconds. Therefore, the test
// may fail if it runs for longer than 5 seconds. It shouldn't run
// that long though.
int64_t midnight =
@@ -799,4 +793,18 @@ TEST(OmahaRequestActionTest, BadElapsedSecondsTest) {
NULL));
}
+TEST(OmahaRequestActionTest, NoUniqueIDTest) {
+ vector<char> post_data;
+ ASSERT_FALSE(TestUpdateCheck(NULL, // prefs
+ kDefaultTestParams,
+ "invalid xml>",
+ kActionCodeError,
+ NULL, // response
+ &post_data));
+ // convert post_data to string
+ string post_str(&post_data[0], post_data.size());
+ EXPECT_EQ(post_str.find("machineid="), string::npos);
+ EXPECT_EQ(post_str.find("userid="), string::npos);
+}
+
} // namespace chromeos_update_engine
« no previous file with comments | « omaha_request_action.h ('k') | omaha_request_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698