Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: qunit/tests/indexedDBBackup.js

Issue 29907589: Issue 7054 - Update the adblockpluscore dependency to 5cb695da5a40, adblockplusui to f86abf2efdfd (Closed)
Left Patch Set: Address PS3 Changes Created Dec. 6, 2018, 11:37 p.m.
Right Patch Set: Address PS12 Comment Created Jan. 8, 2019, 1:02 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « lib/whitelisting.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 "use strict"; 1 "use strict";
2 2
3 { 3 {
4 const {IndexedDBBackup} = require("../../lib/indexedDBBackup"); 4 const {IndexedDBBackup} = require("../../lib/indexedDBBackup");
5 const info = require("info"); 5 const info = require("info");
6 const {FilterStorage} = require("../../adblockpluscore/lib/filterStorage"); 6 const {filterStorage} = require("../../adblockpluscore/lib/filterStorage");
7 const {Filter} = require("../../adblockpluscore/lib/filterClasses"); 7 const {Filter} = require("../../adblockpluscore/lib/filterClasses");
8 const {Subscription, SpecialSubscription} = 8 const {Subscription, SpecialSubscription} =
9 require("../../adblockpluscore/lib/subscriptionClasses"); 9 require("../../adblockpluscore/lib/subscriptionClasses");
10 10
11 let backupDelay = 100; 11 let backupDelay = 100;
12 let subscription = Subscription.fromObject({ 12 let subscription = Subscription.fromObject({
13 title: "test", 13 title: "test",
14 url: "test.com", 14 url: "test.com",
15 homepage: "example.com", 15 homepage: "example.com",
16 lastSuccess: 8, 16 lastSuccess: 8,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ok( 77 ok(
78 saveTimes[0] - start >= backupDelay, 78 saveTimes[0] - start >= backupDelay,
79 "first write is deferred" 79 "first write is deferred"
80 ); 80 );
81 deepEqual( 81 deepEqual(
82 data.content, 82 data.content,
83 expectedFormat, 83 expectedFormat,
84 "saved data has the correct information" 84 "saved data has the correct information"
85 ); 85 );
86 86
87 FilterStorage.removeSubscription(subscription); 87 filterStorage.removeSubscription(subscription);
88 FilterStorage.removeSubscription(specialSubscription); 88 filterStorage.removeSubscription(specialSubscription);
89 } 89 }
90 }, 90 },
91 { 91 {
92 done: assert.async(), 92 done: assert.async(),
93 check(data) 93 check(data)
94 { 94 {
95 ok( 95 ok(
96 saveTimes[1] - saveTimes[0] >= backupDelay, 96 saveTimes[1] - saveTimes[0] >= backupDelay,
97 "next changes are saved after the write delay" 97 "next changes are saved after the write delay"
98 ); 98 );
(...skipping 14 matching lines...) Expand all
113 step.check(data["file:indexedDB-backup"]); 113 step.check(data["file:indexedDB-backup"]);
114 step.done(); 114 step.done();
115 }, 0); 115 }, 0);
116 }; 116 };
117 117
118 Object.defineProperty( 118 Object.defineProperty(
119 browser.storage.local, "set", 119 browser.storage.local, "set",
120 {value: mockSave, enumerable: true} 120 {value: mockSave, enumerable: true}
121 ); 121 );
122 122
123 FilterStorage.addSubscription(specialSubscription); 123 filterStorage.addSubscription(specialSubscription);
124 FilterStorage.addSubscription(subscription); 124 filterStorage.addSubscription(subscription);
125 } 125 }
126 } 126 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld