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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_interactive_test.cc

Issue 2500093003: Re-enable tabs_interactive_uitest for linux_aura (Closed)
Patch Set: add TODO Created 4 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 | chrome/browser/ui/browser_focus_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/tabs/tabs_interactive_test.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc
index db45de15b0c058da41524ffc5a61a487b2778b75..f27be7459235361d3722c8494fd75d42ec9182a8 100644
--- a/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_interactive_test.cc
@@ -12,18 +12,17 @@
#include "chrome/browser/extensions/extension_function_test_utils.h"
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_window.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
-#include "chrome/test/base/ui_test_utils.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/common/test_util.h"
-namespace api_test_utils = extensions::api_test_utils;
-namespace keys = extensions::tabs_constants;
+namespace extensions {
+
+namespace keys = tabs_constants;
namespace utils = extension_function_test_utils;
-typedef InProcessBrowserTest ExtensionTabsTest;
+using ExtensionTabsTest = InProcessBrowserTest;
// http://crbug.com/154081 for Aura specific
// http://crbug.com/179063 for other general failures on try bots.
@@ -37,6 +36,11 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, MAYBE_GetLastFocusedWindow) {
// Create a new window which making it the "last focused" window.
// Note that "last focused" means the "top" most window.
Browser* new_browser = CreateBrowser(browser()->profile());
+ ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(new_browser));
+
+ GURL url("about:blank");
+ AddTabAtIndexToBrowser(new_browser, 0, url, ui::PAGE_TRANSITION_LINK, true);
+
int focused_window_id =
extensions::ExtensionTabUtil::GetWindowId(new_browser);
@@ -75,14 +79,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryLastFocusedWindowTabs) {
CreateBrowser(browser()->profile());
Browser* focused_window = CreateBrowser(browser()->profile());
-#if defined(OS_MACOSX)
- // See BrowserWindowCocoa::Show. In tests, Browser::window()->IsActive won't
- // work unless we fake the browser being launched by the user.
- ASSERT_TRUE(ui_test_utils::ShowAndFocusNativeWindow(
- focused_window->window()->GetNativeWindow()));
-#endif
- ui_test_utils::BrowserActivationWaiter waiter(focused_window);
- waiter.WaitForActivation();
+ ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(focused_window));
GURL url("about:blank");
AddTabAtIndexToBrowser(focused_window, 0, url, ui::PAGE_TRANSITION_LINK,
@@ -137,3 +134,5 @@ IN_PROC_BROWSER_TEST_F(ExtensionTabsTest, QueryLastFocusedWindowTabs) {
IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_TabCurrentWindow) {
ASSERT_TRUE(RunExtensionTest("tabs/current_window")) << message_;
}
+
+} // namespace extensions
« no previous file with comments | « no previous file | chrome/browser/ui/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698