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

Unified Diff: chrome/browser/ui/views/location_bar/star_view_browsertest.cc

Issue 73523002: Fix windowed NPAPI plugins appearing under dialogs when DWM compositing is disabled and the tab swi… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/star_view_browsertest.cc
===================================================================
--- chrome/browser/ui/views/location_bar/star_view_browsertest.cc (revision 235307)
+++ chrome/browser/ui/views/location_bar/star_view_browsertest.cc (working copy)
@@ -90,7 +90,14 @@
IN_PROC_BROWSER_TEST_F(StarViewTestNoDWM, WindowedNPAPIPluginHidden) {
browser()->profile()->GetPrefs()->SetBoolean(prefs::kPluginsAlwaysAuthorize,
true);
- LOG(ERROR) << "1";
+
+ // First switch to a new tab and back, to also test a scenario where we
+ // stopped watching the root window.
+ ui_test_utils::NavigateToURLWithDisposition(
+ browser(), GURL("about:blank"), NEW_FOREGROUND_TAB,
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
+ browser()->tab_strip_model()->ActivateTabAt(0, true);
+
// First load the page and wait for the NPAPI plugin's window to display.
string16 expected_title(ASCIIToUTF16("ready"));
content::WebContents* tab =
@@ -101,16 +108,13 @@
base::FilePath().AppendASCII("printing"),
base::FilePath().AppendASCII("npapi_plugin.html"));
ui_test_utils::NavigateToURL(browser(), url);
- LOG(ERROR) << "2";
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
- LOG(ERROR) << "3";
// Now get the region of the plugin before the star view is shown.
HWND hwnd = tab->GetView()->GetNativeView()->GetDispatcher()->host()->
GetAcceleratedWidget();
HWND child = NULL;
EnumChildWindows(hwnd, EnumerateChildren,reinterpret_cast<LPARAM>(&child));
- LOG(ERROR) << "4";
RECT region_before, region_after;
int result = GetWindowRgnBox(child, &region_before);
@@ -124,16 +128,13 @@
scoped_refptr<content::MessageLoopRunner> runner =
new content::MessageLoopRunner;
- LOG(ERROR) << "5";
// Verify that clicking once shows the bookmark bubble.
ui_test_utils::MoveMouseToCenterAndPress(
star_view,
ui_controls::LEFT,
ui_controls::DOWN | ui_controls::UP,
runner->QuitClosure());
- LOG(ERROR) << "6";
runner->Run();
- LOG(ERROR) << "7";
EXPECT_TRUE(BookmarkBubbleView::IsShowing());
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698