@param {!FakeWindow} win
(win)
| 529 | export class FakeHistory { |
| 530 | /** @param {!FakeWindow} win */ |
| 531 | constructor(win) { |
| 532 | /** @const */ |
| 533 | this.win = win; |
| 534 | |
| 535 | /** @const {!Array<!{url: string}>} */ |
| 536 | this.stack = [{url: '', state: null}]; |
| 537 | |
| 538 | /** @const {number} */ |
| 539 | this.index = 0; |
| 540 | |
| 541 | Object.defineProperty(this, 'length', { |
| 542 | get: () => this.stack.length, |
| 543 | }); |
| 544 | |
| 545 | Object.defineProperty(this, 'state', { |
| 546 | get: () => this.stack[this.index].state, |
| 547 | }); |
| 548 | } |
| 549 | |
| 550 | /** */ |
| 551 | back() { |
nothing calls this directly
no outgoing calls
no test coverage detected