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

Side by Side Diff: chrome/browser/download/download_browsertest.cc

Issue 7051030: Disable crashing DownloadTest.BrowserCloseAfterDownload test. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 months 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 | Annotate | Revision Log
« 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/test/test_file_util.h" 10 #include "base/test/test_file_util.h"
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 L"", 1314 L"",
1315 L"window.domAutomationController.send(window.webui_responded_);", 1315 L"window.domAutomationController.send(window.webui_responded_);",
1316 &webui_responded)); 1316 &webui_responded));
1317 EXPECT_TRUE(webui_responded); 1317 EXPECT_TRUE(webui_responded);
1318 } 1318 }
1319 1319
1320 // Test for crbug.com/12745. This tests that if a download is initiated from 1320 // Test for crbug.com/12745. This tests that if a download is initiated from
1321 // a chrome:// page that has registered and onunload handler, the browser 1321 // a chrome:// page that has registered and onunload handler, the browser
1322 // will be able to close. 1322 // will be able to close.
1323 // After several correct executions, this test starts failing on the build 1323 // After several correct executions, this test starts failing on the build
1324 // bots and then continues to fail consistently. http://crbug.com/82278 1324 // bots and then continues to fail consistently.
1325 IN_PROC_BROWSER_TEST_F(DownloadTest, FAILS_BrowserCloseAfterDownload) { 1325 // As of 2011/05/22, it's crashing, so it is getting disabled.
1326 // http://crbug.com/82278
1327 IN_PROC_BROWSER_TEST_F(DownloadTest, DISABLED_BrowserCloseAfterDownload) {
1326 GURL downloads_url(chrome::kAboutFlagsURL); 1328 GURL downloads_url(chrome::kAboutFlagsURL);
1327 FilePath file(FILE_PATH_LITERAL("download-test1.lib")); 1329 FilePath file(FILE_PATH_LITERAL("download-test1.lib"));
1328 GURL download_url(URLRequestMockHTTPJob::GetMockUrl(file)); 1330 GURL download_url(URLRequestMockHTTPJob::GetMockUrl(file));
1329 1331
1330 ui_test_utils::NavigateToURL(browser(), downloads_url); 1332 ui_test_utils::NavigateToURL(browser(), downloads_url);
1331 TabContents* contents = browser()->GetSelectedTabContents(); 1333 TabContents* contents = browser()->GetSelectedTabContents();
1332 ASSERT_TRUE(contents); 1334 ASSERT_TRUE(contents);
1333 bool result = false; 1335 bool result = false;
1334 EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool( 1336 EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
1335 contents->render_view_host(), 1337 contents->render_view_host(),
1336 L"", 1338 L"",
1337 L"window.onunload = function() { var do_nothing = 0; }; " 1339 L"window.onunload = function() { var do_nothing = 0; }; "
1338 L"window.domAutomationController.send(true);", 1340 L"window.domAutomationController.send(true);",
1339 &result)); 1341 &result));
1340 EXPECT_TRUE(result); 1342 EXPECT_TRUE(result);
1341 1343
1342 DownloadAndWait(browser(), download_url, EXPECT_NO_SELECT_DIALOG); 1344 DownloadAndWait(browser(), download_url, EXPECT_NO_SELECT_DIALOG);
1343 1345
1344 ui_test_utils::WindowedNotificationObserver signal( 1346 ui_test_utils::WindowedNotificationObserver signal(
1345 NotificationType::BROWSER_CLOSED, 1347 NotificationType::BROWSER_CLOSED,
1346 Source<Browser>(browser())); 1348 Source<Browser>(browser()));
1347 browser()->CloseWindow(); 1349 browser()->CloseWindow();
1348 signal.Wait(); 1350 signal.Wait();
1349 } 1351 }
1350 1352
1351 } // namespace 1353 } // 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