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

Unified Diff: chrome/browser/ui/webui/downloads_ui_browsertest.js

Issue 492323003: downloads: Don't navigate to /# when a user clicks various links on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_ui_browsertest.js
diff --git a/chrome/browser/ui/webui/downloads_ui_browsertest.js b/chrome/browser/ui/webui/downloads_ui_browsertest.js
index 1cd786a13bc26139bb8d223454e85ed99c0d0030..f8de341e9583d6f32632c212acf461028e96f1a7 100644
--- a/chrome/browser/ui/webui/downloads_ui_browsertest.js
+++ b/chrome/browser/ui/webui/downloads_ui_browsertest.js
@@ -26,7 +26,7 @@ BaseDownloadsWebUITest.prototype = {
/**
* Browse to the downloads page & call our preLoad().
*/
- browsePreload: 'chrome://downloads',
+ browsePreload: 'chrome://downloads/',
/** @override */
typedefCppFixture: 'DownloadsUIBrowserTest',
@@ -137,6 +137,14 @@ TEST_F('BaseDownloadsWebUITest', 'DeleteAllowed', function() {
testDone();
});
+// Test that clicking <a href=#> doesn't actually go to #.
+TEST_F('BaseDownloadsWebUITest', 'PoundLinkClicksDontChangeUrl', function() {
+ assertEquals(this.browsePreload, document.location.href);
+ document.querySelector('.clear-all-link').click();
+ assertEquals(this.browsePreload, document.location.href);
+ testDone();
+});
+
/**
* Fixture for Downloads WebUI testing when deletions are prohibited.
* @extends {BaseDownloadsWebUITest}
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698