Commit ee5572d9 authored by finnur's avatar finnur Committed by Commit bot

Revert of Add new test: DownloadTest.TestMultipleDownloadsBubble (patchset #2...

Revert of Add new test: DownloadTest.TestMultipleDownloadsBubble (patchset #2 id:40001 of https://codereview.chromium.org/976823002/)

Reason for revert:
New test added is flaky. Sorry. :)
https://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20%281%29/builds/21829

[ RUN      ] DownloadTest.TestMultipleDownloadsBubble
[3840:2828:0303/224822:WARNING:data_reduction_proxy_config.cc(240)] SPDY proxy OFF at startup
HTTP server started on http://127.0.0.1:54250...
sending server_data: {"host": "127.0.0.1", "port": 54250} (36 bytes)
c:\b\build\slave\win_x64_builder\build\src\chrome\browser\download\download_browsertest.cc(2974): error: Value of: mock_bubble_view->IsVisible()
Actual: false
Expected: true

Original issue's description:
> Add new test: DownloadTest.TestMultipleDownloadsBubble
>
> This ensures that both infobars and bubbles are tested by creating both
> DownloadTest.TestMultipleDownloadsInfobar and DownloadTest.
> TestMultipleDownloadsBubble. The correct UI (infobar or bubble) is
> forced with a switch.
>
> BUG=438758
>
> Committed: https://crrev.com/ff5eb76821e76cb6c90b940249caf3d748e6fbc0
> Cr-Commit-Position: refs/heads/master@{#318987}

TBR=asanka@chromium.org,felt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=438758

Review URL: https://codereview.chromium.org/977863002

Cr-Commit-Position: refs/heads/master@{#319037}
parent 3bbe0ce7
......@@ -56,10 +56,7 @@
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/website_settings/mock_permission_bubble_view.h"
#include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/url_constants.h"
......@@ -2895,10 +2892,6 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, TestMultipleDownloadsInfobar) {
ASSERT_TRUE(test_server()->Start());
// Ensure that infobars are being used instead of bubbles.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePermissionsBubbles);
// Create a downloads observer.
scoped_ptr<content::DownloadTestObserver> downloads_observer(
CreateWaiter(browser(), 2));
......@@ -2939,51 +2932,6 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, TestMultipleDownloadsInfobar) {
DownloadItem::COMPLETE));
}
IN_PROC_BROWSER_TEST_F(DownloadTest, TestMultipleDownloadsBubble) {
#if defined(OS_WIN) && defined(USE_ASH)
// Disable this test in Metro+Ash for now (http://crbug.com/262796).
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kAshBrowserTests))
return;
#endif
#if defined(OS_ANDROID) || defined(OS_IOS)
// Permission bubbles are not supported on mobile.
return;
#endif
ASSERT_TRUE(test_server()->Start());
// Enable permision bubbles.
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnablePermissionsBubbles);
// Create a downloads observer.
scoped_ptr<content::DownloadTestObserver> downloads_observer(
CreateWaiter(browser(), 2));
MockPermissionBubbleView* mock_bubble_view = new MockPermissionBubbleView();
PermissionBubbleManager::FromWebContents(
browser()->tab_strip_model()->GetActiveWebContents())->
SetView(mock_bubble_view);
mock_bubble_view->SetBrowserTest(true);
ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
browser(),
test_server()->GetURL("files/downloads/download-a_zip_file.html"), 1);
ASSERT_TRUE(mock_bubble_view->IsVisible());
mock_bubble_view->Accept();
ASSERT_FALSE(mock_bubble_view->IsVisible());
// Waits for the download to complete.
downloads_observer->WaitForFinished();
EXPECT_EQ(2u, downloads_observer->NumDownloadsSeenInState(
DownloadItem::COMPLETE));
browser()->tab_strip_model()->GetActiveWebContents()->Close();
delete mock_bubble_view;
}
IN_PROC_BROWSER_TEST_F(DownloadTest, DownloadTest_Renaming) {
ASSERT_TRUE(test_server()->Start());
GURL url(test_server()->GetURL("files/downloads/a_zip_file.zip"));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment