| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 static_cast<WebContentsImpl*>(shell()->web_contents()); | 728 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 729 RenderFrameHost* main_frame = web_contents->GetMainFrame(); | 729 RenderFrameHost* main_frame = web_contents->GetMainFrame(); |
| 730 | 730 |
| 731 set_min_screenshot_interval(0); | 731 set_min_screenshot_interval(0); |
| 732 screenshot_manager()->Reset(); | 732 screenshot_manager()->Reset(); |
| 733 ExecuteSyncJSFunction(main_frame, "use_replace_state()"); | 733 ExecuteSyncJSFunction(main_frame, "use_replace_state()"); |
| 734 screenshot_manager()->WaitUntilScreenshotIsReady(); | 734 screenshot_manager()->WaitUntilScreenshotIsReady(); |
| 735 // history.replaceState shouldn't capture a screenshot | 735 // history.replaceState shouldn't capture a screenshot |
| 736 EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); | 736 EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); |
| 737 screenshot_manager()->Reset(); | 737 screenshot_manager()->Reset(); |
| 738 web_contents->GetController().Reload(true); | 738 web_contents->GetController().Reload(ReloadType::NORMAL, true); |
| 739 WaitForLoadStop(web_contents); | 739 WaitForLoadStop(web_contents); |
| 740 // reloading the page shouldn't capture a screenshot | 740 // reloading the page shouldn't capture a screenshot |
| 741 // TODO (mfomitchev): currently broken. Uncomment when | 741 // TODO (mfomitchev): currently broken. Uncomment when |
| 742 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_page | 742 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_page |
| 743 // is populated properly when reloading the page. | 743 // is populated properly when reloading the page. |
| 744 //EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); | 744 //EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); |
| 745 screenshot_manager()->Reset(); | 745 screenshot_manager()->Reset(); |
| 746 ExecuteSyncJSFunction(main_frame, "use_push_state()"); | 746 ExecuteSyncJSFunction(main_frame, "use_push_state()"); |
| 747 screenshot_manager()->WaitUntilScreenshotIsReady(); | 747 screenshot_manager()->WaitUntilScreenshotIsReady(); |
| 748 // pushing a state shouldn't capture a screenshot | 748 // pushing a state shouldn't capture a screenshot |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 details = dispatcher->OnEventFromSource(&release); | 1126 details = dispatcher->OnEventFromSource(&release); |
| 1127 ASSERT_FALSE(details.dispatcher_destroyed); | 1127 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1128 WaitAFrame(); | 1128 WaitAFrame(); |
| 1129 | 1129 |
| 1130 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1130 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1131 EXPECT_FALSE(tracker.overscroll_completed()); | 1131 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1132 } | 1132 } |
| 1133 } | 1133 } |
| 1134 | 1134 |
| 1135 } // namespace content | 1135 } // namespace content |
| OLD | NEW |