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

Unified Diff: app/tree_node_model.h

Issue 1576008: Enable interactive_ui_tests (Closed)
Patch Set: include Created 10 years, 8 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 | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/tree_node_model.h
diff --git a/app/tree_node_model.h b/app/tree_node_model.h
index 0d9f2b92b1f54798de728c49561c0702934cda4f..b11bf38e3d3ed501baef76b5ad305c5905896e2e 100644
--- a/app/tree_node_model.h
+++ b/app/tree_node_model.h
@@ -82,7 +82,9 @@ class TreeNode : public TreeModelNode {
// Adds the specified child node.
virtual void Add(int index, NodeType* child) {
- DCHECK(child && index >= 0 && index <= GetChildCount());
+ DCHECK(child);
+ DCHECK_LE(0, index);
+ DCHECK_GE(GetChildCount(), index);
// If the node has a parent, remove it from its parent.
NodeType* node_parent = child->GetParent();
if (node_parent)
@@ -130,7 +132,8 @@ class TreeNode : public TreeModelNode {
return children_[index];
}
const NodeType* GetChild(int index) const {
- DCHECK(index >= 0 && index < GetChildCount());
+ DCHECK_LE(0, index);
+ DCHECK_GT(GetChildCount(), index);
return children_[index];
}
« no previous file with comments | « no previous file | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698