diff options
Diffstat (limited to 'chrome/browser/extensions/extension_browsertests_misc.cc')
-rw-r--r-- | chrome/browser/extensions/extension_browsertests_misc.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc index 4ede48d..9076447 100644 --- a/chrome/browser/extensions/extension_browsertests_misc.cc +++ b/chrome/browser/extensions/extension_browsertests_misc.cc @@ -614,8 +614,11 @@ static TabContents* WindowOpenHelper(Browser* browser, const GURL& start_url, L"window.domAutomationController.send(true);", &result); EXPECT_TRUE(result); - // Now the current tab should be the new tab. - TabContents* newtab = browser->GetSelectedTabContents(); + // Now the active tab in last active window should be the new tab. + Browser* last_active_browser = BrowserList::GetLastActive(); + EXPECT_TRUE(last_active_browser); + TabContents* newtab = last_active_browser->GetSelectedTabContents(); + EXPECT_TRUE(newtab); GURL expected_url = start_url.Resolve(newtab_url); if (!newtab->controller().GetLastCommittedEntry() || newtab->controller().GetLastCommittedEntry()->url() != expected_url) |