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

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

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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/web_contents/web_contents_view_aura.cc ('k') | ui/aura/BUILD.gn » ('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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 // because testing used the old FocusManager which did some 755 // because testing used the old FocusManager which did some
756 // different (osbolete) processing. TODO(sadrul) to figure out 756 // different (osbolete) processing. TODO(sadrul) to figure out
757 // how this test should work that mimics production code a bit 757 // how this test should work that mimics production code a bit
758 // better. 758 // better.
759 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, 759 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest,
760 DISABLED_ContentWindowReparent) { 760 DISABLED_ContentWindowReparent) {
761 ASSERT_NO_FATAL_FAILURE( 761 ASSERT_NO_FATAL_FAILURE(
762 StartTestWithPage("files/overscroll_navigation.html")); 762 StartTestWithPage("files/overscroll_navigation.html"));
763 763
764 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 764 scoped_ptr<aura::Window> window(new aura::Window(NULL));
765 window->Init(aura::WINDOW_LAYER_NOT_DRAWN); 765 window->Init(ui::LAYER_NOT_DRAWN);
766 766
767 WebContentsImpl* web_contents = 767 WebContentsImpl* web_contents =
768 static_cast<WebContentsImpl*>(shell()->web_contents()); 768 static_cast<WebContentsImpl*>(shell()->web_contents());
769 ExecuteSyncJSFunction(web_contents->GetMainFrame(), "navigate_next()"); 769 ExecuteSyncJSFunction(web_contents->GetMainFrame(), "navigate_next()");
770 EXPECT_EQ(1, GetCurrentIndex()); 770 EXPECT_EQ(1, GetCurrentIndex());
771 771
772 aura::Window* content = web_contents->GetContentNativeView(); 772 aura::Window* content = web_contents->GetContentNativeView();
773 gfx::Rect bounds = content->GetBoundsInRootWindow(); 773 gfx::Rect bounds = content->GetBoundsInRootWindow();
774 ui::test::EventGenerator generator(content->GetRootWindow(), content); 774 ui::test::EventGenerator generator(content->GetRootWindow(), content);
775 generator.GestureScrollSequence( 775 generator.GestureScrollSequence(
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 EXPECT_TRUE(web_contents->should_normally_be_visible()); 881 EXPECT_TRUE(web_contents->should_normally_be_visible());
882 } 882 }
883 883
884 // Ensure that SnapToPhysicalPixelBoundary() is called on WebContentsView parent 884 // Ensure that SnapToPhysicalPixelBoundary() is called on WebContentsView parent
885 // change. This is a regression test for http://crbug.com/388908. 885 // change. This is a regression test for http://crbug.com/388908.
886 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, WebContentsViewReparent) { 886 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, WebContentsViewReparent) {
887 ASSERT_NO_FATAL_FAILURE( 887 ASSERT_NO_FATAL_FAILURE(
888 StartTestWithPage("files/overscroll_navigation.html")); 888 StartTestWithPage("files/overscroll_navigation.html"));
889 889
890 scoped_ptr<aura::Window> window(new aura::Window(NULL)); 890 scoped_ptr<aura::Window> window(new aura::Window(NULL));
891 window->Init(aura::WINDOW_LAYER_NOT_DRAWN); 891 window->Init(ui::LAYER_NOT_DRAWN);
892 892
893 RenderWidgetHostViewAura* rwhva = 893 RenderWidgetHostViewAura* rwhva =
894 static_cast<RenderWidgetHostViewAura*>( 894 static_cast<RenderWidgetHostViewAura*>(
895 shell()->web_contents()->GetRenderWidgetHostView()); 895 shell()->web_contents()->GetRenderWidgetHostView());
896 rwhva->ResetHasSnappedToBoundary(); 896 rwhva->ResetHasSnappedToBoundary();
897 EXPECT_FALSE(rwhva->has_snapped_to_boundary()); 897 EXPECT_FALSE(rwhva->has_snapped_to_boundary());
898 window->AddChild(shell()->web_contents()->GetNativeView()); 898 window->AddChild(shell()->web_contents()->GetNativeView());
899 EXPECT_TRUE(rwhva->has_snapped_to_boundary()); 899 EXPECT_TRUE(rwhva->has_snapped_to_boundary());
900 } 900 }
901 901
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 details = dispatcher->OnEventFromSource(&release); 1138 details = dispatcher->OnEventFromSource(&release);
1139 ASSERT_FALSE(details.dispatcher_destroyed); 1139 ASSERT_FALSE(details.dispatcher_destroyed);
1140 WaitAFrame(); 1140 WaitAFrame();
1141 1141
1142 EXPECT_LT(0, tracker.num_overscroll_updates()); 1142 EXPECT_LT(0, tracker.num_overscroll_updates());
1143 EXPECT_FALSE(tracker.overscroll_completed()); 1143 EXPECT_FALSE(tracker.overscroll_completed());
1144 } 1144 }
1145 } 1145 }
1146 1146
1147 } // namespace content 1147 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | ui/aura/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698