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 "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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 content::TitleWatcher title_watcher(tab, expected_title); | 1576 content::TitleWatcher title_watcher(tab, expected_title); |
1577 | 1577 |
1578 GURL url = ui_test_utils::GetTestUrl( | 1578 GURL url = ui_test_utils::GetTestUrl( |
1579 base::FilePath().AppendASCII("printing"), | 1579 base::FilePath().AppendASCII("printing"), |
1580 base::FilePath().AppendASCII("npapi_plugin.html")); | 1580 base::FilePath().AppendASCII("npapi_plugin.html")); |
1581 ui_test_utils::NavigateToURL(browser(), url); | 1581 ui_test_utils::NavigateToURL(browser(), url); |
1582 | 1582 |
1583 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 1583 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
1584 | 1584 |
1585 // Now get the region of the plugin before the find bar is shown. | 1585 // Now get the region of the plugin before the find bar is shown. |
1586 HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()-> | 1586 HWND hwnd = |
1587 GetAcceleratedWidget(); | 1587 tab->GetView()->GetNativeView()->GetHost()->GetAcceleratedWidget(); |
1588 HWND child = NULL; | 1588 HWND child = NULL; |
1589 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); | 1589 EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child)); |
1590 | 1590 |
1591 RECT region_before, region_after; | 1591 RECT region_before, region_after; |
1592 int result = GetWindowRgnBox(child, ®ion_before); | 1592 int result = GetWindowRgnBox(child, ®ion_before); |
1593 ASSERT_EQ(result, SIMPLEREGION); | 1593 ASSERT_EQ(result, SIMPLEREGION); |
1594 | 1594 |
1595 // Create a new tab and open the find bar there. | 1595 // Create a new tab and open the find bar there. |
1596 chrome::NewTab(browser()); | 1596 chrome::NewTab(browser()); |
1597 browser()->tab_strip_model()->ActivateTabAt(1, true); | 1597 browser()->tab_strip_model()->ActivateTabAt(1, true); |
(...skipping 19 matching lines...) Expand all Loading... |
1617 ASSERT_EQ(result, SIMPLEREGION); | 1617 ASSERT_EQ(result, SIMPLEREGION); |
1618 bool rects_equal = | 1618 bool rects_equal = |
1619 region_before.left == region_after.left && | 1619 region_before.left == region_after.left && |
1620 region_before.top == region_after.top && | 1620 region_before.top == region_after.top && |
1621 region_before.right == region_after.right && | 1621 region_before.right == region_after.right && |
1622 region_before.bottom == region_after.bottom; | 1622 region_before.bottom == region_after.bottom; |
1623 ASSERT_FALSE(rects_equal); | 1623 ASSERT_FALSE(rects_equal); |
1624 } | 1624 } |
1625 | 1625 |
1626 #endif | 1626 #endif |
OLD | NEW |