Index: content/browser/frame_host/frame_tree_unittest.cc |
diff --git a/content/browser/frame_host/frame_tree_unittest.cc b/content/browser/frame_host/frame_tree_unittest.cc |
index bed8617c7511f12ef8be1ed5849a3bc00fce451f..8936bfa2d5492fb5dce22f6b06fc777dabcf1ba6 100644 |
--- a/content/browser/frame_host/frame_tree_unittest.cc |
+++ b/content/browser/frame_host/frame_tree_unittest.cc |
@@ -22,7 +22,6 @@ |
#include "testing/gtest/include/gtest/gtest.h" |
namespace content { |
- |
namespace { |
// Appends a description of the structure of the frame tree to |result|. |
@@ -103,8 +102,6 @@ |
DISALLOW_COPY_AND_ASSIGN(TreeWalkingWebContentsLogger); |
}; |
-} // namespace |
- |
class FrameTreeTest : public RenderViewHostImplTestHarness { |
protected: |
// Prints a FrameTree, for easy assertions of the tree hierarchy. |
@@ -126,18 +123,17 @@ |
std::string no_children_node("no children node"); |
std::string deep_subtree("node with deep subtree"); |
- int process_id = root->current_frame_host()->GetProcess()->GetID(); |
ASSERT_EQ("1: []", GetTreeState(frame_tree)); |
// Simulate attaching a series of frames to build the frame tree. |
- frame_tree->AddFrame(root, process_id, 14, std::string()); |
- frame_tree->AddFrame(root, process_id, 15, std::string()); |
- frame_tree->AddFrame(root, process_id, 16, std::string()); |
- |
- frame_tree->AddFrame(root->child_at(0), process_id, 244, std::string()); |
- frame_tree->AddFrame(root->child_at(1), process_id, 255, no_children_node); |
- frame_tree->AddFrame(root->child_at(0), process_id, 245, std::string()); |
+ frame_tree->AddFrame(root, 14, std::string()); |
+ frame_tree->AddFrame(root, 15, std::string()); |
+ frame_tree->AddFrame(root, 16, std::string()); |
+ |
+ frame_tree->AddFrame(root->child_at(0), 244, std::string()); |
+ frame_tree->AddFrame(root->child_at(1), 255, no_children_node); |
+ frame_tree->AddFrame(root->child_at(0), 245, std::string()); |
ASSERT_EQ("1: [14: [244: [], 245: []], " |
"15: [255 'no children node': []], " |
@@ -145,19 +141,18 @@ |
GetTreeState(frame_tree)); |
FrameTreeNode* child_16 = root->child_at(2); |
- frame_tree->AddFrame(child_16, process_id, 264, std::string()); |
- frame_tree->AddFrame(child_16, process_id, 265, std::string()); |
- frame_tree->AddFrame(child_16, process_id, 266, std::string()); |
- frame_tree->AddFrame(child_16, process_id, 267, deep_subtree); |
- frame_tree->AddFrame(child_16, process_id, 268, std::string()); |
+ frame_tree->AddFrame(child_16, 264, std::string()); |
+ frame_tree->AddFrame(child_16, 265, std::string()); |
+ frame_tree->AddFrame(child_16, 266, std::string()); |
+ frame_tree->AddFrame(child_16, 267, deep_subtree); |
+ frame_tree->AddFrame(child_16, 268, std::string()); |
FrameTreeNode* child_267 = child_16->child_at(3); |
- frame_tree->AddFrame(child_267, process_id, 365, std::string()); |
- frame_tree->AddFrame(child_267->child_at(0), process_id, 455, std::string()); |
- frame_tree->AddFrame(child_267->child_at(0)->child_at(0), process_id, 555, |
+ frame_tree->AddFrame(child_267, 365, std::string()); |
+ frame_tree->AddFrame(child_267->child_at(0), 455, std::string()); |
+ frame_tree->AddFrame(child_267->child_at(0)->child_at(0), 555, std::string()); |
+ frame_tree->AddFrame(child_267->child_at(0)->child_at(0)->child_at(0), 655, |
std::string()); |
- frame_tree->AddFrame(child_267->child_at(0)->child_at(0)->child_at(0), |
- process_id, 655, std::string()); |
// Now that's it's fully built, verify the tree structure is as expected. |
ASSERT_EQ("1: [14: [244: [], 245: []], " |
@@ -232,18 +227,5 @@ |
activity.GetLog()); |
} |
-// Ensure that frames are not added to the tree, if the process passed in |
-// is different than the process of the parent node. |
-TEST_F(FrameTreeTest, FailAddFrameWithWrongProcessId) { |
- FrameTree* frame_tree = contents()->GetFrameTree(); |
- FrameTreeNode* root = frame_tree->root(); |
- int process_id = root->current_frame_host()->GetProcess()->GetID(); |
- |
- ASSERT_EQ("1: []", GetTreeState(frame_tree)); |
- |
- // Simulate attaching a frame from mismatched process id. |
- ASSERT_FALSE(frame_tree->AddFrame(root, process_id + 1, 1, std::string())); |
- ASSERT_EQ("1: []", GetTreeState(frame_tree)); |
-} |
- |
+} // namespace |
} // namespace content |