Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / webui / downloads_ui_browsertest.js
index 1cd786a..4eb5bc1 100644 (file)
@@ -26,7 +26,7 @@ BaseDownloadsWebUITest.prototype = {
   /**
    * Browse to the downloads page & call our preLoad().
    */
-  browsePreload: 'chrome://downloads',
+  browsePreload: 'chrome://downloads/',
 
   /** @override */
   typedefCppFixture: 'DownloadsUIBrowserTest',
@@ -36,6 +36,12 @@ BaseDownloadsWebUITest.prototype = {
     GEN('  SetDeleteAllowed(true);');
   },
 
+  /** @override */
+  runAccessibilityChecks: true,
+
+  /** @override */
+  accessibilityIssuesAreErrors: true,
+
   /**
    * Sends TOTAL_RESULT_COUNT fake downloads to the page. This can't be called
    * in the preLoad, because it requires the global Download object to have
@@ -137,6 +143,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}