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 // This file simulates a typical foreground process of an offline-capable | 5 // This file simulates a typical foreground process of an offline-capable |
6 // authoring application. When in an "offline" state, simulated user actions | 6 // authoring application. When in an "offline" state, simulated user actions |
7 // are recorded for later playback in an IDB data store. When in an "online" | 7 // are recorded for later playback in an IDB data store. When in an "online" |
8 // state, the recorded actions are drained from the store (as if being sent | 8 // state, the recorded actions are drained from the store (as if being sent |
9 // to the server). | 9 // to the server). |
10 | 10 |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 var s = ''; | 265 var s = ''; |
266 while (len--) | 266 while (len--) |
267 s += Math.floor((Math.random() * 36)).toString(36); | 267 s += Math.floor((Math.random() * 36)).toString(36); |
268 return s; | 268 return s; |
269 } | 269 } |
270 | 270 |
271 window.onload = function () { | 271 window.onload = function () { |
272 log("initializing..."); | 272 log("initializing..."); |
273 initdb(); | 273 initdb(); |
274 }; | 274 }; |
OLD | NEW |