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

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 1 month 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 | Annotate | Revision Log
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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 content::TitleWatcher title_watcher(tab, expected_title); 1637 content::TitleWatcher title_watcher(tab, expected_title);
1638 1638
1639 GURL url = ui_test_utils::GetTestUrl( 1639 GURL url = ui_test_utils::GetTestUrl(
1640 base::FilePath().AppendASCII("printing"), 1640 base::FilePath().AppendASCII("printing"),
1641 base::FilePath().AppendASCII("npapi_plugin.html")); 1641 base::FilePath().AppendASCII("npapi_plugin.html"));
1642 ui_test_utils::NavigateToURL(browser(), url); 1642 ui_test_utils::NavigateToURL(browser(), url);
1643 1643
1644 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 1644 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
1645 1645
1646 // Now get the region of the plugin before the find bar is shown. 1646 // Now get the region of the plugin before the find bar is shown.
1647 HWND hwnd = 1647 HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()->
1648 tab->GetView()->GetNativeView()->GetDispatcher()->GetAcceleratedWidget(); 1648 GetAcceleratedWidget();
1649 HWND child = NULL; 1649 HWND child = NULL;
1650 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); 1650 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
1651 1651
1652 RECT region_before, region_after; 1652 RECT region_before, region_after;
1653 int result = GetWindowRgnBox(child, &region_before); 1653 int result = GetWindowRgnBox(child, &region_before);
1654 ASSERT_EQ(result, SIMPLEREGION); 1654 ASSERT_EQ(result, SIMPLEREGION);
1655 1655
1656 // Create a new tab and open the find bar there. 1656 // Create a new tab and open the find bar there.
1657 chrome::NewTab(browser()); 1657 chrome::NewTab(browser());
1658 browser()->tab_strip_model()->ActivateTabAt(1, true); 1658 browser()->tab_strip_model()->ActivateTabAt(1, true);
(...skipping 19 matching lines...) Expand all
1678 ASSERT_EQ(result, SIMPLEREGION); 1678 ASSERT_EQ(result, SIMPLEREGION);
1679 bool rects_equal = 1679 bool rects_equal =
1680 region_before.left == region_after.left && 1680 region_before.left == region_after.left &&
1681 region_before.top == region_after.top && 1681 region_before.top == region_after.top &&
1682 region_before.right == region_after.right && 1682 region_before.right == region_after.right &&
1683 region_before.bottom == region_after.bottom; 1683 region_before.bottom == region_after.bottom;
1684 ASSERT_FALSE(rects_equal); 1684 ASSERT_FALSE(rects_equal);
1685 } 1685 }
1686 1686
1687 #endif 1687 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/aura/tabs/dock_info_auralinux.cc ('k') | chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698