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

Unified Diff: chrome/test/data/webui/md_history/history_supervised_user_test.js

Issue 2478773002: [MD History] Disable menu button when history deletion is disabled. (Closed)
Patch Set: rebase Created 4 years, 1 month 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/md_history/list_container.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_history/history_supervised_user_test.js
diff --git a/chrome/test/data/webui/md_history/history_supervised_user_test.js b/chrome/test/data/webui/md_history/history_supervised_user_test.js
index 2d5ab81c4e9a8bc734a9481e8768ecbea7b8f362..1e407fb5e95488cc4a70a53f2594abde8fee1ac9 100644
--- a/chrome/test/data/webui/md_history/history_supervised_user_test.js
+++ b/chrome/test/data/webui/md_history/history_supervised_user_test.js
@@ -6,26 +6,26 @@ cr.define('md_history.history_supervised_user_test', function() {
function registerTests() {
suite('history-list supervised-user', function() {
var app;
- var element;
+ var historyList;
var toolbar;
var TEST_HISTORY_RESULTS;
suiteSetup(function() {
- app = $('history-app');
- element = app.$['history'].$['infinite-list'];
- toolbar = app.$['toolbar'];
TEST_HISTORY_RESULTS =
[createHistoryEntry('2016-03-15', 'https://www.google.com')];
});
setup(function() {
+ app = replaceApp();
+ historyList = app.$['history'].$['infinite-list'];
+ toolbar = app.$['toolbar'];
app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS);
});
test('checkboxes disabled for supervised user', function() {
return PolymerTest.flushTasks().then(function() {
var items =
- Polymer.dom(element.root).querySelectorAll('history-item');
+ Polymer.dom(historyList.root).querySelectorAll('history-item');
MockInteractions.tap(items[0].$['checkbox']);
@@ -34,19 +34,19 @@ cr.define('md_history.history_supervised_user_test', function() {
});
test('deletion disabled for supervised user', function() {
-
// Make sure that removeVisits is not being called.
registerMessageCallback('removeVisits', this, function (toBeRemoved) {
- assertTrue(false);
+ assertNotReached();
});
- element.historyData_[0].selected = true;
+ historyList.historyData_[0].selected = true;
toolbar.onDeleteTap_();
});
- teardown(function() {
- element.historyData_ = [];
- element.searchedTerm = '';
+ test('remove history menu button disabled', function() {
+ var listContainer = app.$['history'];
+ listContainer.$.sharedMenu.get();
+ assertTrue(listContainer.$$('#menuRemoveButton').disabled);
});
});
}
« no previous file with comments | « chrome/browser/resources/md_history/list_container.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698