Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5433)

Unified Diff: chrome/common/child_process_logging_mac_unittest.mm

Issue 149305: Add the page url to plugin crashes to aid debugging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/common/child_process_logging_mac.mm ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698