OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 void RelocateDatabase() { | 99 void RelocateDatabase() { |
100 ResetDatabase(); | 100 ResetDatabase(); |
101 temp_dir_.Rename(); | 101 temp_dir_.Rename(); |
102 SetUp(); | 102 SetUp(); |
103 } | 103 } |
104 | 104 |
105 private: | 105 private: |
106 ScopedTempDir temp_dir_; | 106 ScopedTempDir temp_dir_; |
107 scoped_ptr<CrashReportDatabase> db_; | 107 std::unique_ptr<CrashReportDatabase> db_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseTest); | 109 DISALLOW_COPY_AND_ASSIGN(CrashReportDatabaseTest); |
110 }; | 110 }; |
111 | 111 |
112 TEST_F(CrashReportDatabaseTest, Initialize) { | 112 TEST_F(CrashReportDatabaseTest, Initialize) { |
113 // Initialize the database for the first time, creating it. | 113 // Initialize the database for the first time, creating it. |
114 ASSERT_TRUE(db()); | 114 ASSERT_TRUE(db()); |
115 | 115 |
116 Settings* settings = db()->GetSettings(); | 116 Settings* settings = db()->GetSettings(); |
117 | 117 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 // Deleting and the creating another report causes an empty database to be | 581 // Deleting and the creating another report causes an empty database to be |
582 // loaded. Make sure this is handled. | 582 // loaded. Make sure this is handled. |
583 | 583 |
584 CrashReportDatabase::Report report2; | 584 CrashReportDatabase::Report report2; |
585 CreateCrashReport(&report2); | 585 CreateCrashReport(&report2); |
586 } | 586 } |
587 | 587 |
588 } // namespace | 588 } // namespace |
589 } // namespace test | 589 } // namespace test |
590 } // namespace crashpad | 590 } // namespace crashpad |
OLD | NEW |