| 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 1e407fb5e95488cc4a70a53f2594abde8fee1ac9..4ac385a0429859b0d0b16e2f52866104a8f0f94a 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
|
| @@ -2,55 +2,48 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -cr.define('md_history.history_supervised_user_test', function() {
|
| - function registerTests() {
|
| - suite('history-list supervised-user', function() {
|
| - var app;
|
| - var historyList;
|
| - var toolbar;
|
| - var TEST_HISTORY_RESULTS;
|
| -
|
| - suiteSetup(function() {
|
| - 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(historyList.root).querySelectorAll('history-item');
|
| -
|
| - MockInteractions.tap(items[0].$['checkbox']);
|
| -
|
| - assertFalse(items[0].selected);
|
| - });
|
| - });
|
| -
|
| - test('deletion disabled for supervised user', function() {
|
| - // Make sure that removeVisits is not being called.
|
| - registerMessageCallback('removeVisits', this, function (toBeRemoved) {
|
| - assertNotReached();
|
| - });
|
| -
|
| - historyList.historyData_[0].selected = true;
|
| - toolbar.onDeleteTap_();
|
| - });
|
| -
|
| - test('remove history menu button disabled', function() {
|
| - var listContainer = app.$['history'];
|
| - listContainer.$.sharedMenu.get();
|
| - assertTrue(listContainer.$$('#menuRemoveButton').disabled);
|
| - });
|
| +suite('history-list supervised-user', function() {
|
| + var app;
|
| + var historyList;
|
| + var toolbar;
|
| + var TEST_HISTORY_RESULTS;
|
| +
|
| + suiteSetup(function() {
|
| + 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(historyList.root).querySelectorAll('history-item');
|
| +
|
| + MockInteractions.tap(items[0].$['checkbox']);
|
| +
|
| + assertFalse(items[0].selected);
|
| });
|
| - }
|
| - return {
|
| - registerTests: registerTests
|
| - };
|
| + });
|
| +
|
| + test('deletion disabled for supervised user', function() {
|
| + // Make sure that removeVisits is not being called.
|
| + registerMessageCallback('removeVisits', this, function (toBeRemoved) {
|
| + assertNotReached();
|
| + });
|
| +
|
| + historyList.historyData_[0].selected = true;
|
| + toolbar.onDeleteTap_();
|
| + });
|
| +
|
| + test('remove history menu button disabled', function() {
|
| + var listContainer = app.$['history'];
|
| + listContainer.$.sharedMenu.get();
|
| + assertTrue(listContainer.$$('#menuRemoveButton').disabled);
|
| + });
|
| });
|
|
|