test(tizen): realign wgt exit-signal harness slice after #162 stage-owner edit

The v4-exit-signal-phase3 tests eval a hardcoded LINE RANGE out of tizen/js/app.js
(harness(TIZEN, 663, 697)). The #162 stage-owner fix inserted ~19 lines above that
block, so the slice no longer captured the crash/pagehide handlers and the three B/wgt
tests failed. Re-point the range to 682-716 (block content unchanged, verified identical).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
ScreenTinker 2026-07-10 12:12:30 -05:00
parent f7e1b4dc69
commit 570f7919e0

View file

@ -53,18 +53,18 @@ test('B/player IDEMPOTENT: crash then pagehide -> only crashed (crash not relabe
// ============ PART B — .wgt classification (real source, lines 663-697) ============
const TIZEN = path.join(__dirname, '../../tizen/js/app.js');
test('B/wgt CRASH: error/rejection -> crashed (socket AND beacon; server dedups)', () => {
const h = harness(TIZEN, 663, 697); h.fire('error', { error: { message: 'boom' } });
const h = harness(TIZEN, 682, 716); h.fire('error', { error: { message: 'boom' } });
assert.equal(h.beacons[0].reason, 'crashed');
assert.equal(h.socketSends[0].reason, 'crashed'); assert.equal(h.socketSends[0].ev, 'device:exit');
});
test('B/wgt NO-MISCLASSIFY: resource error is not a crash', () => {
const h = harness(TIZEN, 663, 697); h.fire('error', { target: { src: 'x.png' } });
const h = harness(TIZEN, 682, 716); h.fire('error', { target: { src: 'x.png' } });
assert.equal(h.beacons.length, 0); assert.equal(h.socketSends.length, 0);
});
test('B/wgt CLEAN-CLOSE: pagehide(false) -> clean_exit; BACKGROUNDING pagehide(true) -> NO exit', () => {
let h = harness(TIZEN, 663, 697); h.fire('pagehide', { persisted: false });
let h = harness(TIZEN, 682, 716); h.fire('pagehide', { persisted: false });
assert.equal(h.beacons[0].reason, 'clean_exit');
h = harness(TIZEN, 663, 697); h.fire('pagehide', { persisted: true });
h = harness(TIZEN, 682, 716); h.fire('pagehide', { persisted: true });
assert.equal(h.beacons.length, 0, 'suspend must NOT emit clean_exit');
assert.equal((h.handlers['visibilitychange'] || []).length, 0, 'no visibilitychange in the exit block');
});