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

Unified Diff: content/browser/renderer_host/routing_id_issuer_unittest.cc

Issue 1019913002: Revert of Add RoutingIDIssuer to help track routing id issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « content/browser/renderer_host/routing_id_issuer.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/routing_id_issuer_unittest.cc
diff --git a/content/browser/renderer_host/routing_id_issuer_unittest.cc b/content/browser/renderer_host/routing_id_issuer_unittest.cc
deleted file mode 100644
index da1e528d6ad2d15879d94f219b4482f518aa0e8d..0000000000000000000000000000000000000000
--- a/content/browser/renderer_host/routing_id_issuer_unittest.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/browser/renderer_host/routing_id_issuer.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace content {
-namespace {
-
-const int kMangler = 5;
-
-class RoutingIDIssuerTest : public testing::Test {};
-
-TEST_F(RoutingIDIssuerTest, IssueNext) {
- scoped_ptr<RoutingIDIssuer> target =
- RoutingIDIssuer::CreateWithMangler(kMangler);
- int id0 = target->IssueNext();
- int id1 = target->IssueNext();
- EXPECT_EQ(id0 + 1, id1);
-}
-
-TEST_F(RoutingIDIssuerTest, IsProbablyValid) {
- scoped_ptr<RoutingIDIssuer> proper =
- RoutingIDIssuer::CreateWithMangler(kMangler);
- scoped_ptr<RoutingIDIssuer> foreign =
- RoutingIDIssuer::CreateWithMangler(kMangler + 1);
-
- EXPECT_FALSE(proper->IsProbablyValid(kMangler));
-
- int proper_id = proper->IssueNext();
- int foreign_id = foreign->IssueNext();
- EXPECT_TRUE(proper->IsProbablyValid(proper_id));
- EXPECT_TRUE(foreign->IsProbablyValid(foreign_id));
- EXPECT_FALSE(proper->IsProbablyValid(foreign_id));
- EXPECT_FALSE(foreign->IsProbablyValid(proper_id));
-}
-
-} // namespace
-} // namespace contnet
« no previous file with comments | « content/browser/renderer_host/routing_id_issuer.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698