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

Unified Diff: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc

Issue 3092010: One more PhishingDOMFeatureExtractorTest suppression, for the IPC channel name. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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 | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
index d3071345c102ca509bf06c3e889342e624746806..a8419633fd796938ae2e4777ac02728878f31154 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_unittest.cc
@@ -69,13 +69,7 @@ class PhishingDOMFeatureExtractorTest : public ::testing::Test,
platform_.reset(new RendererMainPlatformDelegate(*params_));
platform_->PlatformInitialize();
- // We use a new IPC channel name for each test that runs.
- // This is necessary because the renderer-side IPC channel is not
- // shut down when the RenderThread goes away, so attempting to reuse
- // the channel name gives an error (see ChildThread::~ChildThread()).
- std::string thread_name = StringPrintf(
- "phishing_dom_feature_Extractor_unittest.%d",
- next_thread_id_++);
+ std::string thread_name = GetNextThreadName();
channel_.reset(new IPC::Channel(thread_name,
IPC::Channel::MODE_SERVER, this));
ASSERT_TRUE(channel_->Connect());
@@ -206,6 +200,16 @@ class PhishingDOMFeatureExtractorTest : public ::testing::Test,
msg_loop_.Quit();
}
+ // We use a new IPC channel name for each test that runs.
+ // This is necessary because the renderer-side IPC channel is not
+ // shut down when the RenderThread goes away, so attempting to reuse
+ // the channel name gives an error (see ChildThread::~ChildThread()).
+ static std::string GetNextThreadName() {
+ return StringPrintf(
+ "phishing_dom_feature_Extractor_unittest.%d",
+ next_thread_id_++);
+ }
+
static int next_thread_id_; // incrementing counter for thread ids
static const int32 kViewId = 5; // arbitrary id for our testing view
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698