| Index: chrome/common/child_process_logging_mac_unittest.mm
|
| ===================================================================
|
| --- chrome/common/child_process_logging_mac_unittest.mm (revision 20096)
|
| +++ chrome/common/child_process_logging_mac_unittest.mm (working copy)
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/renderer/renderer_logging.h"
|
| +#include "chrome/common/child_process_logging.h"
|
|
|
| #import <Foundation/Foundation.h>
|
|
|
| @@ -10,7 +10,7 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "testing/platform_test.h"
|
|
|
| -typedef PlatformTest RendererLoggingTest;
|
| +typedef PlatformTest ChildProcessLoggingTest;
|
|
|
| namespace {
|
|
|
| @@ -48,9 +48,9 @@
|
| }
|
|
|
| bool VerifyDictionaryContents(const std::string &url) {
|
| - using renderer_logging::kMaxNumCrashURLChunks;
|
| - using renderer_logging::kMaxNumURLChunkValueLength;
|
| - using renderer_logging::kUrlChunkFormatStr;
|
| + using child_process_logging::kMaxNumCrashURLChunks;
|
| + using child_process_logging::kMaxNumURLChunkValueLength;
|
| + using child_process_logging::kUrlChunkFormatStr;
|
|
|
| int num_url_chunks = CountDictionaryEntries();
|
| EXPECT_TRUE(num_url_chunks <= kMaxNumCrashURLChunks);
|
| @@ -80,21 +80,21 @@
|
|
|
| } // namespace
|
|
|
| -// Call through to SetActiveRendererURLImpl using the functions from
|
| +// Call through to SetActiveURLImpl using the functions from
|
| // MockBreakpadKeyValueStore.
|
| -void SetActiveRendererURLWithMock(const GURL& url) {
|
| - using renderer_logging::SetActiveRendererURLImpl;
|
| +void SetActiveURLWithMock(const GURL& url) {
|
| + using child_process_logging::SetActiveURLImpl;
|
|
|
| SetCrashKeyValueFuncPtr setFunc = MockBreakpadKeyValueStore::SetKeyValue;
|
| ClearCrashKeyValueFuncPtr clearFunc =
|
| MockBreakpadKeyValueStore::ClearKeyValue;
|
|
|
| - SetActiveRendererURLImpl(url, setFunc, clearFunc);
|
| + SetActiveURLImpl(url, setFunc, clearFunc);
|
| }
|
|
|
| -TEST_F(RendererLoggingTest, TestUrlSplitting) {
|
| - using renderer_logging::kMaxNumCrashURLChunks;
|
| - using renderer_logging::kMaxNumURLChunkValueLength;
|
| +TEST_F(ChildProcessLoggingTest, TestUrlSplitting) {
|
| + using child_process_logging::kMaxNumCrashURLChunks;
|
| + using child_process_logging::kMaxNumURLChunkValueLength;
|
|
|
| const std::string short_url("http://abc/");
|
| std::string long_url("http://");
|
| @@ -110,29 +110,29 @@
|
|
|
| // Check that Clearing NULL URL works.
|
| MockBreakpadKeyValueStore mock;
|
| - SetActiveRendererURLWithMock(GURL());
|
| + SetActiveURLWithMock(GURL());
|
| EXPECT_EQ(mock.CountDictionaryEntries(), 0);
|
|
|
| // Check that we can set a URL.
|
| - SetActiveRendererURLWithMock(GURL(short_url.c_str()));
|
| + SetActiveURLWithMock(GURL(short_url.c_str()));
|
| EXPECT_TRUE(mock.VerifyDictionaryContents(short_url));
|
| EXPECT_EQ(mock.CountDictionaryEntries(), 1);
|
| - SetActiveRendererURLWithMock(GURL());
|
| + SetActiveURLWithMock(GURL());
|
| EXPECT_EQ(mock.CountDictionaryEntries(), 0);
|
|
|
| // Check that we can replace a long url with a short url.
|
| - SetActiveRendererURLWithMock(GURL(long_url.c_str()));
|
| + SetActiveURLWithMock(GURL(long_url.c_str()));
|
| EXPECT_TRUE(mock.VerifyDictionaryContents(long_url));
|
| - SetActiveRendererURLWithMock(GURL(short_url.c_str()));
|
| + SetActiveURLWithMock(GURL(short_url.c_str()));
|
| EXPECT_TRUE(mock.VerifyDictionaryContents(short_url));
|
| - SetActiveRendererURLWithMock(GURL());
|
| + SetActiveURLWithMock(GURL());
|
| EXPECT_EQ(mock.CountDictionaryEntries(), 0);
|
|
|
|
|
| // Check that overflow works correctly.
|
| - SetActiveRendererURLWithMock(GURL(overflow_url.c_str()));
|
| + SetActiveURLWithMock(GURL(overflow_url.c_str()));
|
| EXPECT_TRUE(mock.VerifyDictionaryContents(
|
| overflow_url.substr(0, max_num_chars_stored_in_dump)));
|
| - SetActiveRendererURLWithMock(GURL());
|
| + SetActiveURLWithMock(GURL());
|
| EXPECT_EQ(mock.CountDictionaryEntries(), 0);
|
| }
|
|
|
| Property changes on: chrome\common\child_process_logging_mac_unittest.mm
|
| ___________________________________________________________________
|
| Added: svn:eol-style
|
| + LF
|
|
|
|
|