| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/macros.h" |
| 6 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 7 #include "base/strings/string_piece.h" | 8 #include "base/strings/string_piece.h" |
| 8 #include "components/keyed_service/core/dependency_graph.h" | 9 #include "components/keyed_service/core/dependency_graph.h" |
| 9 #include "components/keyed_service/core/dependency_node.h" | 10 #include "components/keyed_service/core/dependency_node.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "third_party/re2/src/re2/re2.h" | 12 #include "third_party/re2/src/re2/re2.h" |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 class DependencyGraphTest : public testing::Test {}; | 16 class DependencyGraphTest : public testing::Test {}; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 for (const char* name : names) { | 208 for (const char* name : names) { |
| 208 SCOPED_TRACE(testing::Message("name=") << name); | 209 SCOPED_TRACE(testing::Message("name=") << name); |
| 209 std::string graph_str = | 210 std::string graph_str = |
| 210 graph.DumpAsGraphviz("Test", base::Bind(&NodeNameProvider, name)); | 211 graph.DumpAsGraphviz("Test", base::Bind(&NodeNameProvider, name)); |
| 211 base::StringPiece dumped_name(LocateNodeNameInGraph(graph_str)); | 212 base::StringPiece dumped_name(LocateNodeNameInGraph(graph_str)); |
| 212 EXPECT_TRUE(IsValidDotId(dumped_name)) << "dumped_name=" << dumped_name; | 213 EXPECT_TRUE(IsValidDotId(dumped_name)) << "dumped_name=" << dumped_name; |
| 213 } | 214 } |
| 214 } | 215 } |
| 215 | 216 |
| 216 } // namespace | 217 } // namespace |
| OLD | NEW |