Chromium Code Reviews| 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 "content/test/web_contents_observer_sanity_checker.h" | 5 #include "content/test/web_contents_observer_sanity_checker.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 120 CHECK(false) | 120 CHECK(false) |
| 121 << "RenderFrameHostChanged called with old host that did not exist:" | 121 << "RenderFrameHostChanged called with old host that did not exist:" |
| 122 << Format(old_host); | 122 << Format(old_host); |
| 123 } | 123 } |
| 124 CHECK(!HasAnyChildren(old_host)) | 124 CHECK(!HasAnyChildren(old_host)) |
| 125 << "All children should be detached before a parent is detached."; | 125 << "All children should be detached before a parent is detached."; |
| 126 } | 126 } |
| 127 | 127 |
| 128 EnsureStableParentValue(new_host); | 128 EnsureStableParentValue(new_host); |
| 129 if (new_host->GetParent()) { | 129 if (new_host->GetParent()) { |
| 130 AssertRenderFrameExists(new_host->GetParent()); | 130 // |
| 131 //AssertRenderFrameExists(new_host->GetParent()); | |
|
nyquist
2017/02/01 07:10:04
It looks from the comments in the test code that t
jam
2017/02/01 15:31:04
Ooops, thanks fixed.
| |
| 131 CHECK(current_hosts_.count(GetRoutingPair(new_host->GetParent()))) | 132 CHECK(current_hosts_.count(GetRoutingPair(new_host->GetParent()))) |
| 132 << "Parent of frame being committed must be current."; | 133 << "Parent of frame being committed must be current."; |
| 133 } | 134 } |
| 134 | 135 |
| 135 GlobalRoutingID routing_pair = GetRoutingPair(new_host); | 136 GlobalRoutingID routing_pair = GetRoutingPair(new_host); |
| 136 bool host_exists = !current_hosts_.insert(routing_pair).second; | 137 bool host_exists = !current_hosts_.insert(routing_pair).second; |
| 137 if (host_exists) { | 138 if (host_exists) { |
| 138 CHECK(false) | 139 CHECK(false) |
| 139 << "RenderFrameHostChanged called more than once for routing pair:" | 140 << "RenderFrameHostChanged called more than once for routing pair:" |
| 140 << Format(new_host); | 141 << Format(new_host); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 if (live_routes_.count(entry.first)) | 407 if (live_routes_.count(entry.first)) |
| 407 return true; | 408 return true; |
| 408 if (current_hosts_.count(entry.first)) | 409 if (current_hosts_.count(entry.first)) |
| 409 return true; | 410 return true; |
| 410 } | 411 } |
| 411 } | 412 } |
| 412 return false; | 413 return false; |
| 413 } | 414 } |
| 414 | 415 |
| 415 } // namespace content | 416 } // namespace content |
| OLD | NEW |