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

Side by Side Diff: chrome/installer/util/shell_util_unittest.cc

Issue 14287008: Refactoring installer shortcut deletion; adding dedicated shortcut update feature. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Generaling 'Retarget' to 'Update' via base::win::ShortcutProperties. Created 7 years, 7 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 (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 "chrome/installer/util/shell_util.h" 5 #include "chrome/installer/util/shell_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/base_paths_win.h" 10 #include "base/base_paths_win.h"
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 TEST_F(ShellUtilShortcutTest, RemoveChromeShortcut) { 349 TEST_F(ShellUtilShortcutTest, RemoveChromeShortcut) {
350 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 350 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
351 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 351 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
352 *test_properties_, 352 *test_properties_,
353 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 353 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
354 354
355 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt); 355 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt);
356 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name)); 356 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name));
357 ASSERT_TRUE(file_util::PathExists(shortcut_path)); 357 ASSERT_TRUE(file_util::PathExists(shortcut_path));
358 358
359 ASSERT_TRUE(ShellUtil::RemoveShortcut( 359 ASSERT_TRUE(ShellUtil::RemoveShortcuts(
360 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, chrome_exe_, 360 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::CURRENT_USER,
361 ShellUtil::CURRENT_USER, NULL)); 361 chrome_exe_));
362 ASSERT_FALSE(file_util::PathExists(shortcut_path)); 362 ASSERT_FALSE(file_util::PathExists(shortcut_path));
363 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName())); 363 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName()));
364 } 364 }
365 365
366 TEST_F(ShellUtilShortcutTest, RemoveSystemLevelChromeShortcut) { 366 TEST_F(ShellUtilShortcutTest, RemoveSystemLevelChromeShortcut) {
367 test_properties_->level = ShellUtil::SYSTEM_LEVEL; 367 test_properties_->level = ShellUtil::SYSTEM_LEVEL;
368 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 368 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
369 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 369 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
370 *test_properties_, 370 *test_properties_,
371 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 371 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
372 372
373 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt); 373 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt);
374 base::FilePath shortcut_path( 374 base::FilePath shortcut_path(
375 fake_common_desktop_.path().Append(shortcut_name)); 375 fake_common_desktop_.path().Append(shortcut_name));
376 ASSERT_TRUE(file_util::PathExists(shortcut_path)); 376 ASSERT_TRUE(file_util::PathExists(shortcut_path));
377 377
378 ASSERT_TRUE(ShellUtil::RemoveShortcut( 378 ASSERT_TRUE(ShellUtil::RemoveShortcuts(
379 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, chrome_exe_, 379 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::SYSTEM_LEVEL,
380 ShellUtil::SYSTEM_LEVEL, NULL)); 380 chrome_exe_));
381 ASSERT_FALSE(file_util::PathExists(shortcut_path)); 381 ASSERT_FALSE(file_util::PathExists(shortcut_path));
382 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName())); 382 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName()));
383 } 383 }
384 384
385 TEST_F(ShellUtilShortcutTest, RemoveChromeShortcutWithSpecialName) { 385 TEST_F(ShellUtilShortcutTest, RemoveChromeShortcutWithSpecialName) {
386 static const wchar_t kSpecialName[] = L"I'm special"; 386 static const wchar_t kSpecialName[] = L"I'm special";
387 test_properties_->set_shortcut_name(kSpecialName); 387 test_properties_->set_shortcut_name(kSpecialName);
388 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 388 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
389 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 389 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
390 *test_properties_, 390 *test_properties_,
391 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 391 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
392 392
393 string16 shortcut_name(string16(kSpecialName).append(installer::kLnkExt)); 393 string16 shortcut_name(string16(kSpecialName).append(installer::kLnkExt));
394 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name)); 394 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name));
395 ASSERT_TRUE(file_util::PathExists(shortcut_path)); 395 ASSERT_TRUE(file_util::PathExists(shortcut_path));
396
397 ASSERT_TRUE(ShellUtil::RemoveShortcut(
398 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, chrome_exe_,
399 ShellUtil::CURRENT_USER, &string16(kSpecialName)));
400 ASSERT_FALSE(file_util::PathExists(shortcut_path));
401 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName()));
402 } 396 }
403 397
404 TEST_F(ShellUtilShortcutTest, RemoveMultipleChromeShortcuts) { 398 TEST_F(ShellUtilShortcutTest, RemoveMultipleChromeShortcuts) {
405 const wchar_t kShortcutName1[] = L"Chrome 1"; 399 const wchar_t kShortcutName1[] = L"Chrome 1";
406 const wchar_t kShortcutName2[] = L"Chrome 2"; 400 const wchar_t kShortcutName2[] = L"Chrome 2";
407 401
408 test_properties_->set_shortcut_name(kShortcutName1); 402 test_properties_->set_shortcut_name(kShortcutName1);
409 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 403 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
410 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 404 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
411 *test_properties_, 405 *test_properties_,
412 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 406 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
413 string16 shortcut1_name( 407 string16 shortcut1_name(
414 string16(kShortcutName1).append(installer::kLnkExt)); 408 string16(kShortcutName1).append(installer::kLnkExt));
415 base::FilePath shortcut1_path( 409 base::FilePath shortcut1_path(
416 fake_user_desktop_.path().Append(shortcut1_name)); 410 fake_user_desktop_.path().Append(shortcut1_name));
417 ASSERT_TRUE(file_util::PathExists(shortcut1_path)); 411 ASSERT_TRUE(file_util::PathExists(shortcut1_path));
418 412
419 test_properties_->set_shortcut_name(kShortcutName2); 413 test_properties_->set_shortcut_name(kShortcutName2);
420 test_properties_->set_arguments(L"--profile-directory=\"Profile 2\""); 414 test_properties_->set_arguments(L"--profile-directory=\"Profile 2\"");
421 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 415 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
422 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 416 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
423 *test_properties_, 417 *test_properties_,
424 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 418 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
425 string16 shortcut2_name(string16(kShortcutName2).append(installer::kLnkExt)); 419 string16 shortcut2_name(string16(kShortcutName2).append(installer::kLnkExt));
426 base::FilePath shortcut2_path( 420 base::FilePath shortcut2_path(
427 fake_user_desktop_.path().Append(shortcut2_name)); 421 fake_user_desktop_.path().Append(shortcut2_name));
428 ASSERT_TRUE(file_util::PathExists(shortcut2_path)); 422 ASSERT_TRUE(file_util::PathExists(shortcut2_path));
429 423
430 ASSERT_TRUE(ShellUtil::RemoveShortcut( 424 ASSERT_TRUE(ShellUtil::RemoveShortcuts(
431 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, chrome_exe_, 425 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::CURRENT_USER,
432 ShellUtil::CURRENT_USER, NULL)); 426 chrome_exe_));
433 ASSERT_FALSE(file_util::PathExists(shortcut1_path)); 427 ASSERT_FALSE(file_util::PathExists(shortcut1_path));
434 ASSERT_FALSE(file_util::PathExists(shortcut2_path)); 428 ASSERT_FALSE(file_util::PathExists(shortcut2_path));
435 ASSERT_TRUE(file_util::PathExists(shortcut1_path.DirName())); 429 ASSERT_TRUE(file_util::PathExists(shortcut1_path.DirName()));
436 } 430 }
437 431
432 TEST_F(ShellUtilShortcutTest, UpdateChromeShortcut) {
433 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
434 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
435 *test_properties_,
436 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
437
438 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt);
439 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name));
440 ASSERT_TRUE(file_util::PathExists(shortcut_path));
441
442 base::FilePath new_exe = temp_dir_.path().Append(L"manganese.exe");
443 base::win::ShortcutProperties shortcut_properties;
444 shortcut_properties.set_target(new_exe);
445 shortcut_properties.set_working_dir(new_exe.DirName());
446
447 ASSERT_TRUE(ShellUtil::UpdateShortcuts(
448 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::CURRENT_USER,
449 chrome_exe_, shortcut_properties));
450 base::FilePath target_path;
451 ASSERT_TRUE(base::win::ResolveShortcut(shortcut_path, &target_path, NULL));
452 ASSERT_EQ(new_exe, target_path);
453 }
454
455 TEST_F(ShellUtilShortcutTest, UpdateSystemLevelChromeShortcut) {
456 test_properties_->level = ShellUtil::SYSTEM_LEVEL;
457 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
458 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
459 *test_properties_,
460 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
461
462 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt);
463 base::FilePath shortcut_path(
464 fake_common_desktop_.path().Append(shortcut_name));
465 ASSERT_TRUE(file_util::PathExists(shortcut_path));
466
467 base::FilePath new_exe = temp_dir_.path().Append(L"manganese.exe");
468 base::win::ShortcutProperties shortcut_properties;
469 shortcut_properties.set_target(new_exe);
470 shortcut_properties.set_working_dir(new_exe.DirName());
471
472 ASSERT_TRUE(ShellUtil::UpdateShortcuts(
473 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::SYSTEM_LEVEL,
474 chrome_exe_, shortcut_properties));
475 base::FilePath target_path;
476 ASSERT_TRUE(base::win::ResolveShortcut(shortcut_path, &target_path, NULL));
477 ASSERT_EQ(new_exe, target_path);
478 }
479
480 TEST_F(ShellUtilShortcutTest, UpdateMultipleChromeShortcuts) {
481 const wchar_t kShortcutName1[] = L"Chrome 1";
482 const wchar_t kShortcutName2[] = L"Chrome 2";
483
484 test_properties_->set_shortcut_name(kShortcutName1);
485 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
486 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
487 *test_properties_,
488 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
489 string16 shortcut1_name(
490 string16(kShortcutName1).append(installer::kLnkExt));
491 base::FilePath shortcut1_path(
492 fake_user_desktop_.path().Append(shortcut1_name));
493
494 test_properties_->set_shortcut_name(kShortcutName2);
495 test_properties_->set_arguments(L"--profile-directory=\"Profile 2\"");
496 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
497 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
498 *test_properties_,
499 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
500 string16 shortcut2_name(string16(kShortcutName2).append(installer::kLnkExt));
501 base::FilePath shortcut2_path(
502 fake_user_desktop_.path().Append(shortcut2_name));
503 ASSERT_TRUE(file_util::PathExists(shortcut2_path));
504
505 base::FilePath new_exe = temp_dir_.path().Append(L"manganese.exe");
506 base::win::ShortcutProperties shortcut_properties;
507 shortcut_properties.set_target(new_exe);
508 shortcut_properties.set_working_dir(new_exe.DirName());
509
510 ASSERT_TRUE(ShellUtil::UpdateShortcuts(
511 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::CURRENT_USER,
512 chrome_exe_, shortcut_properties));
513
514 base::FilePath target_path1;
515 ASSERT_TRUE(base::win::ResolveShortcut(shortcut1_path, &target_path1, NULL));
516 ASSERT_EQ(new_exe, target_path1);
517 base::FilePath target_path2;
518 ASSERT_TRUE(base::win::ResolveShortcut(shortcut2_path, &target_path2, NULL));
519 ASSERT_EQ(new_exe, target_path2);
520 }
521
438 TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) { 522 TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) {
439 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 523 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
440 ShellUtil::SHORTCUT_LOCATION_START_MENU, 524 ShellUtil::SHORTCUT_LOCATION_START_MENU,
441 dist_, *test_properties_, 525 dist_, *test_properties_,
442 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 526 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
443 test_properties_->set_shortcut_name(L"A second shortcut"); 527 test_properties_->set_shortcut_name(L"A second shortcut");
444 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 528 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
445 ShellUtil::SHORTCUT_LOCATION_START_MENU, 529 ShellUtil::SHORTCUT_LOCATION_START_MENU,
446 dist_, *test_properties_, 530 dist_, *test_properties_,
447 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 531 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
448 532
449 base::FilePath shortcut_folder( 533 base::FilePath shortcut_folder(
450 fake_start_menu_.path().Append(dist_->GetAppShortCutName())); 534 fake_start_menu_.path().Append(dist_->GetAppShortCutName()));
451 file_util::FileEnumerator file_counter(shortcut_folder, false, 535 file_util::FileEnumerator file_counter(shortcut_folder, false,
452 file_util::FileEnumerator::FILES); 536 file_util::FileEnumerator::FILES);
453 int count = 0; 537 int count = 0;
454 while (!file_counter.Next().empty()) 538 while (!file_counter.Next().empty())
455 ++count; 539 ++count;
456 EXPECT_EQ(2, count); 540 EXPECT_EQ(2, count);
457 541
458 ASSERT_TRUE(file_util::PathExists(shortcut_folder)); 542 ASSERT_TRUE(file_util::PathExists(shortcut_folder));
459 ASSERT_TRUE(ShellUtil::RemoveShortcut( 543 ASSERT_TRUE(ShellUtil::RemoveShortcuts(
460 ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_, chrome_exe_, 544 ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_, ShellUtil::CURRENT_USER,
461 ShellUtil::CURRENT_USER, NULL)); 545 chrome_exe_));
462 ASSERT_FALSE(file_util::PathExists(shortcut_folder)); 546 ASSERT_FALSE(file_util::PathExists(shortcut_folder));
463 } 547 }
464 548
465 TEST_F(ShellUtilShortcutTest, DontRemoveChromeShortcutIfPointsToAnotherChrome) { 549 TEST_F(ShellUtilShortcutTest, DontRemoveChromeShortcutIfPointsToAnotherChrome) {
466 base::ScopedTempDir other_exe_dir; 550 base::ScopedTempDir other_exe_dir;
467 ASSERT_TRUE(other_exe_dir.CreateUniqueTempDir()); 551 ASSERT_TRUE(other_exe_dir.CreateUniqueTempDir());
468 base::FilePath other_chrome_exe = 552 base::FilePath other_chrome_exe =
469 other_exe_dir.path().Append(installer::kChromeExe); 553 other_exe_dir.path().Append(installer::kChromeExe);
470 EXPECT_EQ(0, file_util::WriteFile(other_chrome_exe, "", 0)); 554 EXPECT_EQ(0, file_util::WriteFile(other_chrome_exe, "", 0));
471 555
472 test_properties_->set_target(other_chrome_exe); 556 test_properties_->set_target(other_chrome_exe);
473 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut( 557 ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
474 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, 558 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_,
475 *test_properties_, 559 *test_properties_,
476 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)); 560 ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
477 561
478 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt); 562 string16 shortcut_name(dist_->GetAppShortCutName() + installer::kLnkExt);
479 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name)); 563 base::FilePath shortcut_path(fake_user_desktop_.path().Append(shortcut_name));
480 ASSERT_TRUE(file_util::PathExists(shortcut_path)); 564 ASSERT_TRUE(file_util::PathExists(shortcut_path));
481 565
482 // The shortcut shouldn't be removed as it was installed pointing to 566 // The shortcut shouldn't be removed as it was installed pointing to
483 // |other_chrome_exe| and RemoveChromeShortcut() is being told that the 567 // |other_chrome_exe| and RemoveChromeShortcut() is being told that the
484 // removed shortcut should point to |chrome_exe_|. 568 // removed shortcut should point to |chrome_exe_|.
485 ASSERT_TRUE(ShellUtil::RemoveShortcut( 569 ASSERT_TRUE(ShellUtil::RemoveShortcuts(
486 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, chrome_exe_, 570 ShellUtil::SHORTCUT_LOCATION_DESKTOP, dist_, ShellUtil::CURRENT_USER,
487 ShellUtil::CURRENT_USER, NULL)); 571 chrome_exe_));
488 ASSERT_TRUE(file_util::PathExists(shortcut_path)); 572 ASSERT_TRUE(file_util::PathExists(shortcut_path));
489 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName())); 573 ASSERT_TRUE(file_util::PathExists(shortcut_path.DirName()));
490 } 574 }
491 575
492 TEST(ShellUtilTest, BuildAppModelIdBasic) { 576 TEST(ShellUtilTest, BuildAppModelIdBasic) {
493 std::vector<string16> components; 577 std::vector<string16> components;
494 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 578 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
495 const string16 base_app_id(dist->GetBaseAppId()); 579 const string16 base_app_id(dist->GetBaseAppId());
496 components.push_back(base_app_id); 580 components.push_back(base_app_id);
497 ASSERT_EQ(base_app_id, ShellUtil::BuildAppModelId(components)); 581 ASSERT_EQ(base_app_id, ShellUtil::BuildAppModelId(components));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 644
561 const string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ", 645 const string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ",
562 L"MZXW6YTB", L"MZXW6YTBOI"}; 646 L"MZXW6YTB", L"MZXW6YTBOI"};
563 647
564 // Run the tests, with one more letter in the input every pass. 648 // Run the tests, with one more letter in the input every pass.
565 for (int i = 0; i < arraysize(expected); ++i) { 649 for (int i = 0; i < arraysize(expected); ++i) {
566 ASSERT_EQ(expected[i], 650 ASSERT_EQ(expected[i],
567 ShellUtil::ByteArrayToBase32(test_array, i)); 651 ShellUtil::ByteArrayToBase32(test_array, i));
568 } 652 }
569 } 653 }
OLDNEW
« chrome/installer/util/shell_util.cc ('K') | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698