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

Side by Side Diff: chrome/browser/google/google_update_win_unittest.cc

Issue 985573003: Support 32-bit subversion fields in base::Version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a static assert Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/google/google_update_win.h" 5 #include "chrome/browser/google/google_update_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 10
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // Create a mock IGoogleUpdate on-demand update class 337 // Create a mock IGoogleUpdate on-demand update class
338 ASSERT_EQ(S_OK, CComObject<MockOnDemand>::CreateInstance(&mock_on_demand_)); 338 ASSERT_EQ(S_OK, CComObject<MockOnDemand>::CreateInstance(&mock_on_demand_));
339 on_demand_holder_ = mock_on_demand_; 339 on_demand_holder_ = mock_on_demand_;
340 // Configure the mock to return a generic failure by default. 340 // Configure the mock to return a generic failure by default.
341 ON_CALL(*mock_on_demand_, CheckForUpdate(_, _)) 341 ON_CALL(*mock_on_demand_, CheckForUpdate(_, _))
342 .WillByDefault(Return(E_FAIL)); 342 .WillByDefault(Return(E_FAIL));
343 ON_CALL(*mock_on_demand_, Update(_, _)).WillByDefault(Return(E_FAIL)); 343 ON_CALL(*mock_on_demand_, Update(_, _)).WillByDefault(Return(E_FAIL));
344 344
345 // Compute a newer version. 345 // Compute a newer version.
346 base::Version current_version(CHROME_VERSION_STRING); 346 base::Version current_version(CHROME_VERSION_STRING);
347 new_version_ = base::StringPrintf(L"%hu.%hu.%hu.%hu", 347 new_version_ = base::StringPrintf(L"%u.%u.%u.%u",
348 current_version.components()[0], 348 current_version.components()[0],
349 current_version.components()[1], 349 current_version.components()[1],
350 current_version.components()[2] + 1, 350 current_version.components()[2] + 1,
351 current_version.components()[3]); 351 current_version.components()[3]);
352 } 352 }
353 353
354 void TearDown() override { 354 void TearDown() override {
355 // Remove the test's IGoogleUpdate on-demand update class factory. 355 // Remove the test's IGoogleUpdate on-demand update class factory.
356 SetGoogleUpdateFactoryForTesting(OnDemandAppsClassFactory()); 356 SetGoogleUpdateFactoryForTesting(OnDemandAppsClassFactory());
357 } 357 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 StrEq(kError), IsEmpty())); 571 StrEq(kError), IsEmpty()));
572 BeginUpdateCheck(task_runner_, true, 0, callback_receiver_.GetCallback()); 572 BeginUpdateCheck(task_runner_, true, 0, callback_receiver_.GetCallback());
573 task_runner_->RunUntilIdle(); 573 task_runner_->RunUntilIdle();
574 } 574 }
575 575
576 #endif // defined(GOOGLE_CHROME_BUILD) 576 #endif // defined(GOOGLE_CHROME_BUILD)
577 577
578 INSTANTIATE_TEST_CASE_P(UserLevel, GoogleUpdateWinTest, Values(false)); 578 INSTANTIATE_TEST_CASE_P(UserLevel, GoogleUpdateWinTest, Values(false));
579 579
580 INSTANTIATE_TEST_CASE_P(SystemLevel, GoogleUpdateWinTest, Values(true)); 580 INSTANTIATE_TEST_CASE_P(SystemLevel, GoogleUpdateWinTest, Values(true));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698