OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/child_process_logging.h" | 5 #include "chrome/common/child_process_logging.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #import <Foundation/Foundation.h> | 10 #import <Foundation/Foundation.h> |
11 | 11 |
12 #include "base/debug/crash_logging.h" | 12 #include "base/debug/crash_logging.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "testing/platform_test.h" | 16 #include "testing/platform_test.h" |
17 | 17 |
18 typedef PlatformTest ChildProcessLoggingTest; | 18 typedef PlatformTest ChildProcessLoggingTest; |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Class to mock breakpad's setkeyvalue/clearkeyvalue functions needed for | 22 // Class to mock breakpad's setkeyvalue/clearkeyvalue functions needed for |
23 // SetActiveRendererURLImpl. | 23 // SetActiveRendererURLImpl. |
24 // The Keys are stored in a static dictionary and methods are provided to | 24 // The Keys are stored in a static dictionary and methods are provided to |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 EXPECT_EQ(0u, mock.CountDictionaryEntries()); | 135 EXPECT_EQ(0u, mock.CountDictionaryEntries()); |
136 | 136 |
137 | 137 |
138 // Check that overflow works correctly. | 138 // Check that overflow works correctly. |
139 SetActiveURLWithMock(GURL(overflow_url.c_str())); | 139 SetActiveURLWithMock(GURL(overflow_url.c_str())); |
140 EXPECT_TRUE(mock.VerifyDictionaryContents( | 140 EXPECT_TRUE(mock.VerifyDictionaryContents( |
141 overflow_url.substr(0, max_num_chars_stored_in_dump))); | 141 overflow_url.substr(0, max_num_chars_stored_in_dump))); |
142 SetActiveURLWithMock(GURL()); | 142 SetActiveURLWithMock(GURL()); |
143 EXPECT_EQ(0u, mock.CountDictionaryEntries()); | 143 EXPECT_EQ(0u, mock.CountDictionaryEntries()); |
144 } | 144 } |
OLD | NEW |