| OLD | NEW |
| 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 <tuple> | 5 #include <tuple> |
| 6 | 6 |
| 7 #include "base/test/test_reg_util_win.h" | 7 #include "base/test/test_reg_util_win.h" |
| 8 #include "base/win/registry.h" | 8 #include "base/win/registry.h" |
| 9 #include "chrome/install_static/install_util.h" | 9 #include "chrome/install_static/install_util.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 | 392 |
| 393 INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest, | 393 INSTANTIATE_TEST_CASE_P(Canary, ChromeElfUtilTest, |
| 394 testing::Combine(testing::Values("canary"), | 394 testing::Combine(testing::Values("canary"), |
| 395 testing::Values("user"), | 395 testing::Values("user"), |
| 396 testing::Values("single"))); | 396 testing::Values("single"))); |
| 397 INSTANTIATE_TEST_CASE_P(GoogleChrome, ChromeElfUtilTest, | 397 INSTANTIATE_TEST_CASE_P(GoogleChrome, ChromeElfUtilTest, |
| 398 testing::Combine(testing::Values("google"), | 398 testing::Combine(testing::Values("google"), |
| 399 testing::Values("user", "system"), | 399 testing::Values("user", "system"), |
| 400 testing::Values("single", "multi"))); | 400 testing::Values("single", "multi"))); |
| 401 | 401 |
| 402 // Tests the MatchPattern function in the install_static library. | |
| 403 // TODO(ananta) | |
| 404 // Move this to install_static_unittests. | |
| 405 // http://crbug.com/604923 | |
| 406 TEST(MiscUtilTest, InstallStaticMatchPattern) { | |
| 407 EXPECT_TRUE(install_static::MatchPattern(L"", L"")); | |
| 408 EXPECT_TRUE(install_static::MatchPattern(L"", L"*")); | |
| 409 EXPECT_FALSE(install_static::MatchPattern(L"", L"*a")); | |
| 410 EXPECT_FALSE(install_static::MatchPattern(L"", L"abc")); | |
| 411 EXPECT_TRUE(install_static::MatchPattern(L"Hello1234", L"He??o*1*")); | |
| 412 EXPECT_TRUE(install_static::MatchPattern(L"Foo", L"F*?")); | |
| 413 EXPECT_TRUE(install_static::MatchPattern(L"Foo", L"F*")); | |
| 414 EXPECT_FALSE(install_static::MatchPattern(L"Foo", L"F*b")); | |
| 415 EXPECT_TRUE(install_static::MatchPattern(L"abcd", L"*c*d")); | |
| 416 EXPECT_TRUE(install_static::MatchPattern(L"abcd", L"*?c*d")); | |
| 417 EXPECT_FALSE(install_static::MatchPattern(L"abcd", L"abcd*efgh")); | |
| 418 EXPECT_TRUE(install_static::MatchPattern(L"foobarabc", L"*bar*")); | |
| 419 } | |
| 420 | |
| 421 } // namespace | 402 } // namespace |
| OLD | NEW |