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 // |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 EXPECT_STREQ("GdbRlzValue", cgi); | 517 EXPECT_STREQ("GdbRlzValue", cgi); |
518 | 518 |
519 EXPECT_FALSE(rlz_lib::GetProductEventsAsCgi(rlz_lib::TOOLBAR_NOTIFIER, | 519 EXPECT_FALSE(rlz_lib::GetProductEventsAsCgi(rlz_lib::TOOLBAR_NOTIFIER, |
520 cgi, 2048)); | 520 cgi, 2048)); |
521 EXPECT_STREQ("", cgi); | 521 EXPECT_STREQ("", cgi); |
522 } | 522 } |
523 | 523 |
524 #if defined(OS_WIN) | 524 #if defined(OS_WIN) |
525 template<class T> | 525 template<class T> |
526 class typed_buffer_ptr { | 526 class typed_buffer_ptr { |
527 scoped_array<char> buffer_; | 527 scoped_ptr<char[]> buffer_; |
528 | 528 |
529 public: | 529 public: |
530 typed_buffer_ptr() { | 530 typed_buffer_ptr() { |
531 } | 531 } |
532 | 532 |
533 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) { | 533 explicit typed_buffer_ptr(size_t size) : buffer_(new char[size]) { |
534 } | 534 } |
535 | 535 |
536 void reset(size_t size) { | 536 void reset(size_t size) { |
537 buffer_.reset(new char[size]); | 537 buffer_.reset(new char[size]); |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 int mkdir_result = mkdir(rlz_lib::testing::RlzStoreFilenameStr().c_str(), | 883 int mkdir_result = mkdir(rlz_lib::testing::RlzStoreFilenameStr().c_str(), |
884 0500); | 884 0500); |
885 ASSERT_EQ(0, mkdir_result); | 885 ASSERT_EQ(0, mkdir_result); |
886 | 886 |
887 rlz_lib::SupplementaryBranding branding("TEST"); | 887 rlz_lib::SupplementaryBranding branding("TEST"); |
888 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, | 888 EXPECT_FALSE(rlz_lib::RecordProductEvent(rlz_lib::TOOLBAR_NOTIFIER, |
889 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); | 889 rlz_lib::IE_DEFAULT_SEARCH, rlz_lib::INSTALL)); |
890 } | 890 } |
891 | 891 |
892 #endif | 892 #endif |
OLD | NEW |