OLD | NEW |
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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 TEST_F('HistoryWebUIRealBackendTest', 'basic', function() { | 780 TEST_F('HistoryWebUIRealBackendTest', 'basic', function() { |
781 // Check that there are two days of entries, and three entries in total. | 781 // Check that there are two days of entries, and three entries in total. |
782 assertEquals(2, document.querySelectorAll('.day').length); | 782 assertEquals(2, document.querySelectorAll('.day').length); |
783 assertEquals(3, document.querySelectorAll('.entry').length); | 783 assertEquals(3, document.querySelectorAll('.entry').length); |
784 | 784 |
785 testDone(); | 785 testDone(); |
786 }); | 786 }); |
787 | 787 |
788 TEST_F('HistoryWebUIRealBackendTest', 'atLeastOneFocusable', function() { | 788 TEST_F('HistoryWebUIRealBackendTest', 'atLeastOneFocusable', function() { |
789 var results = document.querySelectorAll('#results-display [tabindex="0"]'); | 789 var results = document.querySelectorAll('#results-display [tabindex="0"]'); |
790 expectEquals(1, results.length); | 790 expectGE(results.length, 1); |
791 testDone(); | 791 testDone(); |
792 }); | 792 }); |
793 | 793 |
794 TEST_F('HistoryWebUIRealBackendTest', 'deleteRemovesEntry', function() { | 794 TEST_F('HistoryWebUIRealBackendTest', 'deleteRemovesEntry', function() { |
795 assertTrue(historyModel.deletingHistoryAllowed); | 795 assertTrue(historyModel.deletingHistoryAllowed); |
796 | 796 |
797 var visit = document.querySelector('.entry').visit; | 797 var visit = document.querySelector('.entry').visit; |
798 visit.titleLink.focus(); | 798 visit.titleLink.focus(); |
799 assertEquals(visit.titleLink, document.activeElement); | 799 assertEquals(visit.titleLink, document.activeElement); |
800 | 800 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 | 997 |
998 // The "Remove from history" drop-down item should be disabled. | 998 // The "Remove from history" drop-down item should be disabled. |
999 var removeVisit = $('remove-visit'); | 999 var removeVisit = $('remove-visit'); |
1000 expectTrue(removeVisit.disabled); | 1000 expectTrue(removeVisit.disabled); |
1001 | 1001 |
1002 testDone(); | 1002 testDone(); |
1003 }); | 1003 }); |
1004 | 1004 |
1005 TEST_F('HistoryWebUIDeleteProhibitedTest', 'atLeastOneFocusable', function() { | 1005 TEST_F('HistoryWebUIDeleteProhibitedTest', 'atLeastOneFocusable', function() { |
1006 var results = document.querySelectorAll('#results-display [tabindex="0"]'); | 1006 var results = document.querySelectorAll('#results-display [tabindex="0"]'); |
1007 expectEquals(1, results.length); | 1007 expectGE(results.length, 1); |
1008 testDone(); | 1008 testDone(); |
1009 }); | 1009 }); |
1010 | 1010 |
1011 TEST_F('HistoryWebUIDeleteProhibitedTest', 'leftRightChangeFocus', function() { | 1011 TEST_F('HistoryWebUIDeleteProhibitedTest', 'leftRightChangeFocus', function() { |
1012 var visit = document.querySelector('.entry').visit; | 1012 var visit = document.querySelector('.entry').visit; |
1013 visit.titleLink.focus(); | 1013 visit.titleLink.focus(); |
1014 assertEquals(visit.titleLink, document.activeElement); | 1014 assertEquals(visit.titleLink, document.activeElement); |
1015 | 1015 |
1016 var right = document.createEvent('KeyboardEvent'); | 1016 var right = document.createEvent('KeyboardEvent'); |
1017 right.initKeyboardEvent('keydown', true, true, window, 'Right'); | 1017 right.initKeyboardEvent('keydown', true, true, window, 'Right'); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() { | 1113 TEST_F('HistoryWebUIWithSchemesTest', 'groupingWithSchemes', function() { |
1114 // Switch to the week view. | 1114 // Switch to the week view. |
1115 $('timeframe-controls').querySelectorAll('input')[1].click(); | 1115 $('timeframe-controls').querySelectorAll('input')[1].click(); |
1116 waitForCallback('historyResult', function() { | 1116 waitForCallback('historyResult', function() { |
1117 // Each URL should be organized under a different "domain". | 1117 // Each URL should be organized under a different "domain". |
1118 expectEquals(document.querySelectorAll('.entry').length, 4); | 1118 expectEquals(document.querySelectorAll('.entry').length, 4); |
1119 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4); | 1119 expectEquals(document.querySelectorAll('.site-domain-wrapper').length, 4); |
1120 testDone(); | 1120 testDone(); |
1121 }); | 1121 }); |
1122 }); | 1122 }); |
OLD | NEW |