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

Side by Side Diff: chrome/test/data/webui/md_history/browser_service_test.js

Issue 2627263002: MD History: Remove unnecessary namespacing from tests (part 2) (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/test/data/webui/md_history/history_drawer_test.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 cr.define('md_history.browser_service_test', function() { 5 suite('BrowserService', function() {
6 function registerTests() { 6 test('makes correct call to removeVisits', function(done) {
7 suite('BrowserService', function() { 7 registerMessageCallback('removeVisits', this, function(toRemove) {
8 assertEquals('http://www.example.com', toRemove[0].url);
9 assertEquals('https://en.wikipedia.org', toRemove[1].url);
10 assertEquals(1234, toRemove[0].timestamps[0]);
11 assertEquals(5678, toRemove[1].timestamps[0]);
12 done();
13 });
8 14
9 test('makes correct call to removeVisits', function(done) { 15 toDelete = [
16 createHistoryEntry(1234, 'http://www.example.com'),
17 createHistoryEntry(5678, 'https://en.wikipedia.org')
18 ];
10 19
11 registerMessageCallback('removeVisits', this, function(toRemove) { 20 md_history.BrowserService.getInstance().deleteItems(toDelete);
12 assertEquals('http://www.example.com', toRemove[0].url); 21 });
13 assertEquals('https://en.wikipedia.org', toRemove[1].url);
14 assertEquals(1234, toRemove[0].timestamps[0]);
15 assertEquals(5678, toRemove[1].timestamps[0]);
16 done();
17 });
18 22
19 toDelete = [ 23 teardown(function() {
20 createHistoryEntry(1234, 'http://www.example.com'), 24 registerMessageCallback('removeVisits', this, undefined);
21 createHistoryEntry(5678, 'https://en.wikipedia.org') 25 });
22 ];
23
24 md_history.BrowserService.getInstance().deleteItems(toDelete);
25 });
26
27 teardown(function() {
28 registerMessageCallback('removeVisits', this, undefined);
29 });
30
31 });
32 }
33 return {
34 registerTests: registerTests
35 };
36 }); 26 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/md_history/history_drawer_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698