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

Side by Side Diff: chrome/test/data/webui/history_browsertest.js

Issue 395023002: a11y/options: Fix initial tab focus bug on supervised user history page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 6 years, 5 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 | « chrome/browser/resources/history/history.js ('k') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GEN('#include "chrome/test/data/webui/history_ui_browsertest.h"'); 5 GEN('#include "chrome/test/data/webui/history_ui_browsertest.h"');
6 6
7 /** @const */ var TOTAL_RESULT_COUNT = 160; 7 /** @const */ var TOTAL_RESULT_COUNT = 160;
8 /** @const */ var WAIT_TIMEOUT = 200; 8 /** @const */ var WAIT_TIMEOUT = 200;
9 9
10 /** 10 /**
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 * history database and displayed in the UI. 770 * history database and displayed in the UI.
771 */ 771 */
772 TEST_F('HistoryWebUIRealBackendTest', 'basic', function() { 772 TEST_F('HistoryWebUIRealBackendTest', 'basic', function() {
773 // Check that there are two days of entries, and three entries in total. 773 // Check that there are two days of entries, and three entries in total.
774 assertEquals(2, document.querySelectorAll('.day').length); 774 assertEquals(2, document.querySelectorAll('.day').length);
775 assertEquals(3, document.querySelectorAll('.entry').length); 775 assertEquals(3, document.querySelectorAll('.entry').length);
776 776
777 testDone(); 777 testDone();
778 }); 778 });
779 779
780 TEST_F('HistoryWebUIRealBackendTest', 'atLeastOneFocusable', function() {
781 assertEquals(1, document.querySelectorAll('[tabindex="0"]').length);
782 testDone();
783 });
784
780 /** 785 /**
781 * Test individual deletion of history entries. 786 * Test individual deletion of history entries.
782 */ 787 */
783 TEST_F('HistoryWebUIRealBackendTest', 'singleDeletion', function() { 788 TEST_F('HistoryWebUIRealBackendTest', 'singleDeletion', function() {
784 // Deletes the history entry represented by |entryElement|, and calls callback 789 // Deletes the history entry represented by |entryElement|, and calls callback
785 // when the deletion is complete. 790 // when the deletion is complete.
786 var removeEntry = function(entryElement, callback) { 791 var removeEntry = function(entryElement, callback) {
787 var dropDownButton = entryElement.querySelector('.drop-down'); 792 var dropDownButton = entryElement.querySelector('.drop-down');
788 var removeMenuItem = $('remove-visit'); 793 var removeMenuItem = $('remove-visit');
789 794
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 expectTrue(removeVisit.disabled); 860 expectTrue(removeVisit.disabled);
856 861
857 // Attempting to remove items anyway should fail. 862 // Attempting to remove items anyway should fail.
858 historyModel.removeVisitsFromHistory(historyModel.visits_, function () { 863 historyModel.removeVisitsFromHistory(historyModel.visits_, function () {
859 // The callback is only called on success. 864 // The callback is only called on success.
860 testDone([false, 'Delete succeeded even though it was prohibited.']); 865 testDone([false, 'Delete succeeded even though it was prohibited.']);
861 }); 866 });
862 waitForCallback('deleteFailed', testDone); 867 waitForCallback('deleteFailed', testDone);
863 }); 868 });
864 869
870 TEST_F('HistoryWebUIDeleteProhibitedTest', 'atLeastOneFocusable', function() {
871 assertEquals(1, document.querySelectorAll('[tabindex="0"]').length);
872 testDone();
873 });
874
865 /** 875 /**
866 * Fixture for History WebUI testing IDN. 876 * Fixture for History WebUI testing IDN.
867 * @extends {BaseHistoryWebUITest} 877 * @extends {BaseHistoryWebUITest}
868 * @constructor 878 * @constructor
869 */ 879 */
870 function HistoryWebUIIDNTest() {} 880 function HistoryWebUIIDNTest() {}
871 881
872 HistoryWebUIIDNTest.prototype = { 882 HistoryWebUIIDNTest.prototype = {
873 __proto__: BaseHistoryWebUITest.prototype, 883 __proto__: BaseHistoryWebUITest.prototype,
874 884
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() { 936 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() {
927 // Switch to the week view. 937 // Switch to the week view.
928 $('timeframe-filter-week').click(); 938 $('timeframe-filter-week').click();
929 waitForCallback('historyResult', function() { 939 waitForCallback('historyResult', function() {
930 // Each URL should be organized under a different "domain". 940 // Each URL should be organized under a different "domain".
931 expectEquals(document.querySelectorAll('.entry').length, 4); 941 expectEquals(document.querySelectorAll('.entry').length, 4);
932 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4); 942 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4);
933 testDone(); 943 testDone();
934 }); 944 });
935 }); 945 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698