Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "core/exported/WebViewBase.h" | 5 #include "core/exported/WebViewBase.h" |
| 6 #include "platform/testing/HistogramTester.h" | 6 #include "platform/testing/HistogramTester.h" |
| 7 #include "platform/testing/UnitTestHelpers.h" | 7 #include "platform/testing/UnitTestHelpers.h" |
| 8 #include "web/WebLocalFrameImpl.h" | 8 #include "web/WebLocalFrameImpl.h" |
| 9 #include "web/tests/sim/SimCompositor.h" | 9 #include "web/tests/sim/SimCompositor.h" |
| 10 #include "web/tests/sim/SimDisplayItemList.h" | 10 #include "web/tests/sim/SimDisplayItemList.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 296 "<iframe id='theFrame' style='position:absolute; top:205vh' sandbox>" | 296 "<iframe id='theFrame' style='position:absolute; top:205vh' sandbox>" |
| 297 "</iframe>"); | 297 "</iframe>"); |
| 298 | 298 |
| 299 CompositeFrame(); | 299 CompositeFrame(); |
| 300 | 300 |
| 301 ExpectCount(WouldLoadReason::kCreated, 1); | 301 ExpectCount(WouldLoadReason::kCreated, 1); |
| 302 ExpectCount(WouldLoadReason::k2ScreensAway, 1); | 302 ExpectCount(WouldLoadReason::k2ScreensAway, 1); |
| 303 ExpectCount(WouldLoadReason::k3ScreensAway, 1); | 303 ExpectCount(WouldLoadReason::k3ScreensAway, 1); |
| 304 ExpectTotalCount(3); | 304 ExpectTotalCount(3); |
| 305 | 305 |
| 306 main_resource->Write("<script>theFrame.style.display='none'</script>"); | 306 main_resource->Write("<script>theFrame.style.display='none'</script>"); |
|
dgrogan
2017/05/03 15:46:20
Deferred frame loading would load the document in
| |
| 307 | 307 |
| 308 CompositeFrame(); | 308 CompositeFrame(); |
| 309 | 309 |
| 310 ExpectTotalCount(6); | 310 ExpectTotalCount(3); |
| 311 | 311 |
| 312 main_resource->Write( | 312 main_resource->Write( |
| 313 "<script>document.body.appendChild(document.createElement" | 313 "<script>document.body.appendChild(document.createElement" |
| 314 "('iframe'));</script>"); | 314 "('iframe'));</script>"); |
| 315 main_resource->Finish(); | 315 main_resource->Finish(); |
| 316 | 316 |
| 317 CompositeFrame(); | 317 CompositeFrame(); |
| 318 | 318 |
| 319 ExpectCount(WouldLoadReason::kCreated, 1); | 319 ExpectCount(WouldLoadReason::kCreated, 1); |
| 320 ExpectCount(WouldLoadReason::kNoParent, 1); | 320 ExpectCount(WouldLoadReason::kNoParent, 1); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 | 491 |
| 492 ExpectCount(WouldLoadReason::kCreated, 1); | 492 ExpectCount(WouldLoadReason::kCreated, 1); |
| 493 ExpectCount(WouldLoadReason::kVisible, 1); | 493 ExpectCount(WouldLoadReason::kVisible, 1); |
| 494 ExpectCount(WouldLoadReason::k1ScreenAway, 1); | 494 ExpectCount(WouldLoadReason::k1ScreenAway, 1); |
| 495 ExpectCount(WouldLoadReason::k2ScreensAway, 1); | 495 ExpectCount(WouldLoadReason::k2ScreensAway, 1); |
| 496 ExpectCount(WouldLoadReason::k3ScreensAway, 1); | 496 ExpectCount(WouldLoadReason::k3ScreensAway, 1); |
| 497 ExpectTotalCount(5); | 497 ExpectTotalCount(5); |
| 498 } | 498 } |
| 499 | 499 |
| 500 } // namespace blink | 500 } // namespace blink |
| OLD | NEW |