| 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 // A test application for the RLZ library. | 5 // A test application for the RLZ library. |
| 6 // | 6 // |
| 7 // These tests should not be executed on the build server: | 7 // These tests should not be executed on the build server: |
| 8 // - They assert for the failed cases. | 8 // - They assert for the failed cases. |
| 9 // - They modify machine state (registry). | 9 // - They modify machine state (registry). |
| 10 // | 10 // |
| 11 // These tests require write access to HKLM and HKCU. | 11 // These tests require write access to HKLM and HKCU. |
| 12 // | 12 // |
| 13 // The "GGLA" brand is used to test the normal code flow of the code, and the | 13 // The "GGLA" brand is used to test the normal code flow of the code, and the |
| 14 // "TEST" brand is used to test the supplementary brand code code flow. | 14 // "TEST" brand is used to test the supplementary brand code code flow. |
| 15 | 15 |
| 16 #include "base/eintr_wrapper.h" | 16 #include "base/posix/eintr_wrapper.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 #include "rlz/lib/rlz_lib.h" | 22 #include "rlz/lib/rlz_lib.h" |
| 23 #include "rlz/lib/rlz_value_store.h" | 23 #include "rlz/lib/rlz_value_store.h" |
| 24 #include "rlz/test/rlz_test_helpers.h" | 24 #include "rlz/test/rlz_test_helpers.h" |
| 25 | 25 |
| 26 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 int mkdir_result = mkdir(rlz_lib::testing::RlzPlistFilenameStr().c_str(), | 884 int mkdir_result = mkdir(rlz_lib::testing::RlzPlistFilenameStr().c_str(), |
| 885 0500); | 885 0500); |
| 886 ASSERT_EQ(0, mkdir_result); | 886 ASSERT_EQ(0, mkdir_result); |
| 887 | 887 |
| 888 rlz_lib::SupplementaryBranding branding("TEST"); | 888 rlz_lib::SupplementaryBranding branding("TEST"); |
| 889 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, | 889 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, |
| 890 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); | 890 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); |
| 891 } | 891 } |
| 892 | 892 |
| 893 #endif | 893 #endif |
| OLD | NEW |