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 "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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // because testing used the old FocusManager which did some | 558 // because testing used the old FocusManager which did some |
559 // different (osbolete) processing. TODO(sadrul) to figure out | 559 // different (osbolete) processing. TODO(sadrul) to figure out |
560 // how this test should work that mimics production code a bit | 560 // how this test should work that mimics production code a bit |
561 // better. | 561 // better. |
562 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, | 562 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, |
563 DISABLED_ContentWindowReparent) { | 563 DISABLED_ContentWindowReparent) { |
564 ASSERT_NO_FATAL_FAILURE( | 564 ASSERT_NO_FATAL_FAILURE( |
565 StartTestWithPage("files/overscroll_navigation.html")); | 565 StartTestWithPage("files/overscroll_navigation.html")); |
566 | 566 |
567 scoped_ptr<aura::Window> window(new aura::Window(NULL)); | 567 scoped_ptr<aura::Window> window(new aura::Window(NULL)); |
568 window->Init(ui::LAYER_NOT_DRAWN); | 568 window->Init(aura::WINDOW_LAYER_NOT_DRAWN); |
569 | 569 |
570 WebContentsImpl* web_contents = | 570 WebContentsImpl* web_contents = |
571 static_cast<WebContentsImpl*>(shell()->web_contents()); | 571 static_cast<WebContentsImpl*>(shell()->web_contents()); |
572 ExecuteSyncJSFunction(web_contents->GetRenderViewHost(), "navigate_next()"); | 572 ExecuteSyncJSFunction(web_contents->GetRenderViewHost(), "navigate_next()"); |
573 EXPECT_EQ(1, GetCurrentIndex()); | 573 EXPECT_EQ(1, GetCurrentIndex()); |
574 | 574 |
575 aura::Window* content = web_contents->GetView()->GetContentNativeView(); | 575 aura::Window* content = web_contents->GetView()->GetContentNativeView(); |
576 gfx::Rect bounds = content->GetBoundsInRootWindow(); | 576 gfx::Rect bounds = content->GetBoundsInRootWindow(); |
577 aura::test::EventGenerator generator(content->GetRootWindow(), content); | 577 aura::test::EventGenerator generator(content->GetRootWindow(), content); |
578 generator.GestureScrollSequence( | 578 generator.GestureScrollSequence( |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 10); | 659 10); |
660 base::string16 actual_title = title_watcher.WaitAndGetTitle(); | 660 base::string16 actual_title = title_watcher.WaitAndGetTitle(); |
661 EXPECT_EQ(expected_title, actual_title); | 661 EXPECT_EQ(expected_title, actual_title); |
662 | 662 |
663 EXPECT_EQ(2, GetCurrentIndex()); | 663 EXPECT_EQ(2, GetCurrentIndex()); |
664 EXPECT_TRUE(controller.CanGoBack()); | 664 EXPECT_TRUE(controller.CanGoBack()); |
665 EXPECT_FALSE(controller.CanGoForward()); | 665 EXPECT_FALSE(controller.CanGoForward()); |
666 } | 666 } |
667 | 667 |
668 } // namespace content | 668 } // namespace content |
OLD | NEW |