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

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

Issue 595763002: history: add a browser test for confirm dialog focus regression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@history-focus
Patch Set: better test Created 6 years, 3 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
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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 866
867 var left = document.createEvent('KeyboardEvent'); 867 var left = document.createEvent('KeyboardEvent');
868 left.initKeyboardEvent('keydown', true, true, window, 'Left'); 868 left.initKeyboardEvent('keydown', true, true, window, 'Left');
869 assertEquals('Left', left.keyIdentifier); 869 assertEquals('Left', left.keyIdentifier);
870 expectFalse(visit.dropDown.dispatchEvent(left)); 870 expectFalse(visit.dropDown.dispatchEvent(left));
871 871
872 expectEquals(visit.titleLink, document.activeElement); 872 expectEquals(visit.titleLink, document.activeElement);
873 testDone(); 873 testDone();
874 }); 874 });
875 875
876 TEST_F('HistoryWebUIRealBackendTest', 'alertOverlayHasFocus', function() {
877 document.querySelector('input[type=checkbox]').click();
878 $('remove-selected').click();
879 assert($('alertOverlay').contains(document.activeElement));
880 testDone();
881 });
882
876 /** 883 /**
877 * Fixture for History WebUI testing when deletions are prohibited. 884 * Fixture for History WebUI testing when deletions are prohibited.
878 * @extends {HistoryWebUIRealBackendTest} 885 * @extends {HistoryWebUIRealBackendTest}
879 * @constructor 886 * @constructor
880 */ 887 */
881 function HistoryWebUIDeleteProhibitedTest() {} 888 function HistoryWebUIDeleteProhibitedTest() {}
882 889
883 HistoryWebUIDeleteProhibitedTest.prototype = { 890 HistoryWebUIDeleteProhibitedTest.prototype = {
884 __proto__: HistoryWebUIRealBackendTest.prototype, 891 __proto__: HistoryWebUIRealBackendTest.prototype,
885 892
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() { 1025 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() {
1019 // Switch to the week view. 1026 // Switch to the week view.
1020 $('timeframe-filter-week').click(); 1027 $('timeframe-filter-week').click();
1021 waitForCallback('historyResult', function() { 1028 waitForCallback('historyResult', function() {
1022 // Each URL should be organized under a different "domain". 1029 // Each URL should be organized under a different "domain".
1023 expectEquals(document.querySelectorAll('.entry').length, 4); 1030 expectEquals(document.querySelectorAll('.entry').length, 4);
1024 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4); 1031 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4);
1025 testDone(); 1032 testDone();
1026 }); 1033 });
1027 }); 1034 });
OLDNEW
« chrome/browser/resources/history/history.js ('K') | « chrome/browser/resources/history/history.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698