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

Side by Side Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 2488293002: Disable UnblockedPopupShowsInHistoryAndOmnibox on Linux (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 switches::kDisablePopupBlocking); 329 switches::kDisablePopupBlocking);
330 GURL url( 330 GURL url(
331 embedded_test_server()->GetURL("/popup_blocker/popup-on-unload.html")); 331 embedded_test_server()->GetURL("/popup_blocker/popup-on-unload.html"));
332 ui_test_utils::NavigateToURL(browser(), url); 332 ui_test_utils::NavigateToURL(browser(), url);
333 333
334 NavigateAndCheckPopupShown(embedded_test_server()->GetURL("/popup_blocker/"), 334 NavigateAndCheckPopupShown(embedded_test_server()->GetURL("/popup_blocker/"),
335 ExpectPopup); 335 ExpectPopup);
336 } 336 }
337 337
338 // Verify that when you unblock popup, the popup shows in history and omnibox. 338 // Verify that when you unblock popup, the popup shows in history and omnibox.
339 // TODO(crbug.com/663333) Flaky on Linux.
340 #if defined(OS_LINUX)
341 #define MAYBE_UnblockedPopupShowsInHistoryAndOmnibox \
342 DISABLED_UnblockedPopupShowsInHistoryAndOmnibox
343 #else
344 #define MAYBE_UnblockedPopupShowsInHistoryAndOmnibox \
345 UnblockedPopupShowsInHistoryAndOmnibox
346 #endif
339 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, 347 IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
340 UnblockedPopupShowsInHistoryAndOmnibox) { 348 MAYBE_UnblockedPopupShowsInHistoryAndOmnibox) {
341 base::CommandLine::ForCurrentProcess()->AppendSwitch( 349 base::CommandLine::ForCurrentProcess()->AppendSwitch(
342 switches::kDisablePopupBlocking); 350 switches::kDisablePopupBlocking);
343 GURL url(embedded_test_server()->GetURL( 351 GURL url(embedded_test_server()->GetURL(
344 "/popup_blocker/popup-blocked-to-post-blank.html")); 352 "/popup_blocker/popup-blocked-to-post-blank.html"));
345 NavigateAndCheckPopupShown(url, ExpectTab); 353 NavigateAndCheckPopupShown(url, ExpectTab);
346 354
347 std::string search_string = 355 std::string search_string =
348 "data:text/html,<title>Popup Success!</title>you should not see this " 356 "data:text/html,<title>Popup Success!</title>you should not see this "
349 "message if popup blocker is enabled"; 357 "message if popup blocker is enabled";
350 358
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 706
699 wait_for_new_tab.Wait(); 707 wait_for_new_tab.Wait();
700 708
701 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); 709 ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile()));
702 ASSERT_EQ(2, browser()->tab_strip_model()->count()); 710 ASSERT_EQ(2, browser()->tab_strip_model()->count());
703 // Check that we create the background tab. 711 // Check that we create the background tab.
704 ASSERT_EQ(0, browser()->tab_strip_model()->active_index()); 712 ASSERT_EQ(0, browser()->tab_strip_model()->active_index());
705 } 713 }
706 714
707 } // namespace 715 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698