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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 2741313002: Renamed WasWithinSamePage to WasWithinSameDocument. (Closed)
Patch Set: Addressed review comments Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « content/browser/security_exploit_browsertest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 screenshot_manager()->Reset(); 699 screenshot_manager()->Reset();
700 ExecuteSyncJSFunction(main_frame, "use_replace_state()"); 700 ExecuteSyncJSFunction(main_frame, "use_replace_state()");
701 screenshot_manager()->WaitUntilScreenshotIsReady(); 701 screenshot_manager()->WaitUntilScreenshotIsReady();
702 // history.replaceState shouldn't capture a screenshot 702 // history.replaceState shouldn't capture a screenshot
703 EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); 703 EXPECT_FALSE(screenshot_manager()->screenshot_taken_for());
704 screenshot_manager()->Reset(); 704 screenshot_manager()->Reset();
705 web_contents->GetController().Reload(ReloadType::NORMAL, true); 705 web_contents->GetController().Reload(ReloadType::NORMAL, true);
706 WaitForLoadStop(web_contents); 706 WaitForLoadStop(web_contents);
707 // reloading the page shouldn't capture a screenshot 707 // reloading the page shouldn't capture a screenshot
708 // TODO (mfomitchev): currently broken. Uncomment when 708 // TODO (mfomitchev): currently broken. Uncomment when
709 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_page 709 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_document
710 // is populated properly when reloading the page. 710 // is populated properly when reloading the page.
711 //EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); 711 // EXPECT_FALSE(screenshot_manager()->screenshot_taken_for());
712 screenshot_manager()->Reset(); 712 screenshot_manager()->Reset();
713 ExecuteSyncJSFunction(main_frame, "use_push_state()"); 713 ExecuteSyncJSFunction(main_frame, "use_push_state()");
714 screenshot_manager()->WaitUntilScreenshotIsReady(); 714 screenshot_manager()->WaitUntilScreenshotIsReady();
715 // pushing a state shouldn't capture a screenshot 715 // pushing a state shouldn't capture a screenshot
716 // TODO (mfomitchev): currently broken. Uncomment when 716 // TODO (mfomitchev): currently broken. Uncomment when
717 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_page 717 // FrameHostMsg_DidCommitProvisionalLoad_Params.was_within_same_document
718 // is populated properly when pushState is used. 718 // is populated properly when pushState is used.
719 //EXPECT_FALSE(screenshot_manager()->screenshot_taken_for()); 719 // EXPECT_FALSE(screenshot_manager()->screenshot_taken_for());
720 } 720 }
721 721
722 // TODO(sadrul): This test is disabled because it reparents in a way the 722 // TODO(sadrul): This test is disabled because it reparents in a way the
723 // FocusController does not support. This code would crash in 723 // FocusController does not support. This code would crash in
724 // a production build. It only passed prior to this revision 724 // a production build. It only passed prior to this revision
725 // because testing used the old FocusManager which did some 725 // because testing used the old FocusManager which did some
726 // different (osbolete) processing. TODO(sadrul) to figure out 726 // different (osbolete) processing. TODO(sadrul) to figure out
727 // how this test should work that mimics production code a bit 727 // how this test should work that mimics production code a bit
728 // better. 728 // better.
729 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, 729 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 details = dispatcher->OnEventFromSource(&release); 1096 details = dispatcher->OnEventFromSource(&release);
1097 ASSERT_FALSE(details.dispatcher_destroyed); 1097 ASSERT_FALSE(details.dispatcher_destroyed);
1098 WaitAFrame(); 1098 WaitAFrame();
1099 1099
1100 EXPECT_LT(0, tracker.num_overscroll_updates()); 1100 EXPECT_LT(0, tracker.num_overscroll_updates());
1101 EXPECT_FALSE(tracker.overscroll_completed()); 1101 EXPECT_FALSE(tracker.overscroll_completed());
1102 } 1102 }
1103 } 1103 }
1104 1104
1105 } // namespace content 1105 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/security_exploit_browsertest.cc ('k') | content/common/frame_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698