OLD | NEW |
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/setup/setup_util_unittest.h" | 5 #include "chrome/installer/setup/setup_util_unittest.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 BrowserDistribution::CHROME_FRAME)); | 478 BrowserDistribution::CHROME_FRAME)); |
479 EXPECT_TRUE(chrome_frame.GetUsageStats(&usagestats)); | 479 EXPECT_TRUE(chrome_frame.GetUsageStats(&usagestats)); |
480 EXPECT_EQ(1U, usagestats); | 480 EXPECT_EQ(1U, usagestats); |
481 EXPECT_EQ(L"2.0-dev", chrome_frame.channel().value()); | 481 EXPECT_EQ(L"2.0-dev", chrome_frame.channel().value()); |
482 | 482 |
483 // Confirm that the binaries' channel no longer contains GCF. | 483 // Confirm that the binaries' channel no longer contains GCF. |
484 ASSERT_TRUE(binaries.Initialize(kSystemLevel, | 484 ASSERT_TRUE(binaries.Initialize(kSystemLevel, |
485 BrowserDistribution::CHROME_BINARIES)); | 485 BrowserDistribution::CHROME_BINARIES)); |
486 EXPECT_EQ(L"2.0-dev-multi", binaries.channel().value()); | 486 EXPECT_EQ(L"2.0-dev-multi", binaries.channel().value()); |
487 } | 487 } |
| 488 |
| 489 TEST(SetupUtilTest, ContainsUnsupportedSwitch) { |
| 490 EXPECT_FALSE(installer::ContainsUnsupportedSwitch( |
| 491 CommandLine::FromString(L"foo.exe"))); |
| 492 EXPECT_FALSE(installer::ContainsUnsupportedSwitch( |
| 493 CommandLine::FromString(L"foo.exe --multi-install --chrome"))); |
| 494 EXPECT_TRUE(installer::ContainsUnsupportedSwitch( |
| 495 CommandLine::FromString(L"foo.exe --chrome-frame"))); |
| 496 } |
OLD | NEW |