# Testing on the two MacBooks

`THE-MACHINE.md` has said "open the site on the 2010 and the 2012 MacBook" is
the most valuable thing on the list, and has said it for a while. The reason
it keeps not happening is that "test it" is not a task, it is an obligation
with no edges: you do not know when you are finished, so you do not start.

This is the same job with edges. It is about half an hour per machine, it
says what to look at and what correct looks like, and there is a place to
write down what you saw.

**Everything on this site is written to Safari 7 spec and has only ever run
in Chrome.** That is theory, not testing. Nothing below is a prediction that
something is broken; it is a list of the places where a difference would
show up first.

---

## Before you start

On the Windows machine:

```bash
python tools/serve.py --lan
```

It prints the addresses to type into the MacBooks. It is off by default
because binding to 0.0.0.0 lets anything on the same network read this
folder, which is fine at home and not fine on cafe wifi.

**If nothing loads, it is the firewall, not the site.** Allow Python on
Private networks, or add an inbound rule for TCP 8080. That is the single
most common way this attempt ends early.

Then on each Mac, open the address and work down the list.

### Which machine is which

| | 2010 MacBook Pro | 2012 MacBook Pro |
|---|---|---|
| macOS | Mavericks | High Sierra |
| Safari | 7 | 11 |
| Screen | 1280x800 | 1440x900, or Retina |

**Safari 7 is the one that matters.** Safari 11 is modern enough that most of
this will simply work. If you only have time for one machine, use the 2010.

---

## 1. The front page

Open the address. You should get the boot sequence, not the site.

**The loading bar is at the END, not the start.** On a machine that has never
booted this site the order is: the AMIBIOS POST, then the network boot, then
the operating system menu, and only then the loading screen for whichever
one you picked. Pick Pages Web and that screen is the Vista style bar; the
other two load in their own voice on their own page. A bar in front of a
menu would be backwards, because a bar means the thing you chose is
starting, so if one turns up before you have chosen anything on a first
boot, that is worth writing down.

The POST text is shown ONCE per machine, because Quick Boot is on by default
and that is what Quick Boot means here. The first load on each Mac is the
easy chance at it, so do this list in order rather than reloading part way
down it. Three things bring it back afterwards: `?post` on the end of the
address, ESC on the logo splash, and turning Quick Boot off in Setup.

Two more things can turn up uninvited and neither is a fault: a disk check
ahead of the POST, if the last boot was abandoned by closing the tab, and
`Keyboard error or no keyboard present` between the POST and the network
boot, which is a joke that fires about one visit in twelve and clears on any
key.

- [ ] The **POST screen** is the first thing on the black: grey and white
      text, the American Megatrends banner, and a memory count racing up to
      `16384MB OK`. No loading bar anywhere on it. The only green on this
      side of the boot is the block sweeping the Vista bar, and that comes
      later
- [ ] Text is **monospaced and blocky**, not a normal web font. If it looks
      like ordinary text, `fonts/vga-9x16.woff` did not load
- [ ] The **American Megatrends logo** is at the top left and STAYS there as
      the text fills in underneath. If it scrolls away, the screen is holding
      fewer rows than expected and I want to know the number
- [ ] The whole POST **fits without scrolling**. It is 38 lines
- [ ] Press **ENTER**. The network boot runs: a PXE failure, a retry, DHCP,
      a file transfer, then the hardware probe
- [ ] **Restart and watch the second boot.** The POST text should NOT come
      back. You should get the logo splash instead, which is that same Vista
      style bar with `Starting xanders.page ...` under it, and
      `Press ENTER to continue, DEL to run Setup, F12 for Boot Menu` along
      the bottom, and **DEL and F12 must both work from that screen**. This
      is the whole of round eleven and it is the thing most worth checking.
      It is also the only way a bar comes BEFORE the POST text: it is the
      firmware standing behind its own badge, not the operating system
      loading
- [ ] Press **ESC** on that splash. The POST text should appear
- [ ] The probe block near the end lists **your Mac**, and on Safari 7 some
      lines are legitimately missing. `Processors` and the locale need APIs
      that arrived in Safari 10, so a SHORTER list is correct here. A line
      reading `undefined` is not
- [ ] The **operating system menu** appears with a countdown
- [ ] Let it run out. It boots Pages Web, and NOW the **Vista style loading
      bar** runs, with `Starting Pages Web ...` under it. That is where the
      bar belongs and it is the last screen before the site

**The site itself:**

- [ ] The layout is **980px wide and centred**, with the wallpaper behind it
- [ ] The glass panels look like glass: a gradient, a bright edge, a soft
      shadow. Flat grey rectangles mean the gradients did not apply
- [ ] The **wallpaper changes** after about 45 seconds, fading rather than
      snapping
- [ ] The **scanlines** are visible over everything
- [ ] Press **Tab**. A "Skip to the content" button should appear at the top
      left. Press Enter and the focus should jump past the sidebar

---

## 2. The known risk: viewport units

This is the one thing I could not settle from here, and it is worth doing
carefully.

Safari 7 has `vh` and `vw`, but with documented bugs when they are used
inside `position: fixed`. Two places do exactly that:

- `.tty` in `css/tty.css` uses `2.2vh` and `2.2vw`
- `.osmenu` in `css/osmenu.css` used `1.75vw` and uses `2.8vmin` now, for
  the same reason the POST does: a screen with a fixed number of rows must
  not be scaled by the window's width

Both are full screen takeovers, so a failure is loud rather than subtle.

- [ ] **The terminal**: the green screen should fill the window edge to edge,
      with the text at a comfortable size. Wrong would be text far too large
      or too small, or the screen not reaching the edges
- [ ] **The operating system menu**: the same. It should look like a full
      screen NTLDR menu

If either is wrong, write down what it looks like and at what window size.
The fix is a media query or fixed pixel fallback, and it needs the number.

---

## 3. Pages 98

Restart the machine (sidebar, Site, Restart) and pick **Pages 98** from the
menu, or go straight to `pages/desktop.html`.

- [ ] The **splash** appears: a four pane flag and the words Pages 98
- [ ] The desktop is **teal** with icons down the left
- [ ] The **Start button** carries the same four pane flag as the splash
- [ ] The taskbar clock is running
- [ ] Text on this page is **MS Sans Serif**, noticeably different from the
      Aero side. If it looks like the rest of the site, `msw98ui-regular.woff`
      did not load
- [ ] Double click **Minesweeper**. It plays
- [ ] Double click **Paint**. Draw something
- [ ] Paint: **File, Save As**, give it a name, Save
- [ ] Paint: **File, Open**. Your picture is there as a thumbnail. Click it
      and it loads back
- [ ] Open **My Pictures**. Your painting is at the top, above the gifs
- [ ] Open **Display Properties**. Three switches: monitor, sound, motion.
      Each should toggle and say so
- [ ] Turn the **monitor** switch off. The scanlines go. Turn it back on
- [ ] Windows make a **sound** when they open and close. If the whole site is
      silent see section 6
- [ ] Drag a window by its title bar. Maximise it. Restore it. It should go
      back exactly where it was
- [ ] Press **Escape** with a window focused. It closes

---

## 4. The MS-DOS partition

Restart, and at the POST press **F12** (or click the F8 on screen).

- [ ] The **boot device menu** appears in a bordered box
- [ ] Click **Hard Disk** once to highlight it, then again to boot it
- [ ] MS-DOS starts. Type `HELP`
- [ ] Type `DEFRAG`. A grid of blocks moves about. This is the one to watch:
      **the blocks should be solid squares and light shaded squares**, not
      empty boxes or question marks. Those are box drawing characters and I
      have confirmed the font contains them, so a failure here means the font
      did not load rather than that it lacks the glyph
- [ ] Type `EDIT XANDERS.TXT`
- [ ] The editor: a **grey menu bar**, a **blue field**, the filename in the
      top border, a status line at the bottom
- [ ] The frame lines should be **unbroken**. Gaps between rows mean the
      row spacing is wrong, which is a bug I have already fixed once
- [ ] Type. Arrows move. Enter splits a line. Backspace joins one
- [ ] Press **Escape**. It returns to the DOS prompt, NOT out of DOS entirely
- [ ] Type `EXIT`. It hands back to the firmware, which boots the next
      device in the order
- [ ] Type `LOGIN`, then `G:`, then `DIR`. The website's own files
- [ ] `CD WALLPAPER`, `CD NATURE`, then `VIEW DANDELION.JPG`. A real
      photograph, on a text screen
- [ ] `CD \DOCS` then `TYPE README.MD`. This really is fetched from the
      server, so on Safari 7 watch for it failing where Chrome does not:
      it is the only `XMLHttpRequest` on the whole site

---

## 5. Pages Server Core

Restart and pick **Pages Server Core**.

- [ ] A Linux style init scrolls past, then a login prompt
- [ ] Type `guest` and press Enter. It drops into a demo shell
- [ ] Type `help`. A long list prints
- [ ] **Scroll up with the trackpad.** You should be able to see the top of
      that list. This was broken until recently
- [ ] Press **Shift+PageUp**. Same thing by keyboard
- [ ] Type `neofetch`. It reports the server: an ASUS board, an i5-10400,
      16GB
- [ ] Press **Tab** at the prompt after typing `serv`. It should complete to
      `services`
- [ ] Press **Tab** with the caret NOT in the prompt. The browser should move
      focus normally rather than nothing happening

**If you have Authelia running**, sign in with a real account. On Safari 7
the site cannot check a password from script, so it should hand you to the
Authelia login page rather than saying ACCESS GRANTED. **If it prints ACCESS
GRANTED and opens the shell on Safari 7, that is a bug and I want to know
immediately**, because that is a fault I fixed and it would mean the fix did
not take.

---

## 6. Sound

Sound needs a click or a keypress first on most browsers, and both Macs
predate that rule, so it may simply work from the first beep.

- [ ] The POST **beeps**
- [ ] Typing in the terminal **ticks**
- [ ] Windows on Pages 98 make a soft two note sound
- [ ] Press **Ctrl+M** anywhere. Sound toggles

If there is no sound at all, that is a fair result to record and not a
disaster. `webkitAudioContext` on Safari 7 is old enough to have gaps, and
the whole thing is wrapped so a failure is silent rather than fatal.

---

## 7. Speed, which is the real question for the 2010

The 2010 machine is the one that will feel slow if anything does.

- [ ] Does the **wallpaper crossfade** stutter?
- [ ] Does **scrolling the wallpapers page** stutter? It loads thumbnails as
      you scroll, so watch for stalls
- [ ] Does the **terminal** feel laggy while typing? It redraws the whole
      screen on every keystroke
- [ ] Does **DEFRAG** run smoothly?
- [ ] Does the **fan spin up** on any page left open?

If something is slow, the CRT filter is the first thing to try turning off,
since it is a full screen overlay. Display Properties on Pages 98, or the
sidebar panel on the Aero side.

---

## 8. Private browsing

One specific thing, quickly. Open a Private window on the 2010 Mac and load
the site.

- [ ] It loads and the boot runs

Safari 7 throws on `localStorage.setItem` in a Private window, which would
kill any script that touched it unguarded. Everything goes through
`js/store.js`, which swallows it. This checks that.

---

## What to write down

Anything that looked wrong, plus:

- the exact window size, if a layout looked off
- whether the fonts loaded, which is the single most likely difference
- whether anything felt slow, and where

A screenshot of a wrong screen is worth more than a description.

```
2010 MacBook Pro, Safari 7, Mavericks
Date:
Worked:
Did not work:
Felt slow:

2012 MacBook Pro, Safari 11, High Sierra
Date:
Worked:
Did not work:
Felt slow:
```

---

## Already fixed without a Mac

Three things were certain enough to act on without testing, so do not go
hunting for them:

- **`caret-color` is Safari 16.** It was hiding the real text caret over the
  drawn one, so both Macs would have shown two cursors in the terminal. The
  inputs are parked off screen now instead.
- **`localStorage` was unguarded** in three files. Everything goes through
  `js/store.js`.
- **The POST font is sized in `vmin`, not `vw`.** Sizing off the width while
  the height is what runs out made the row count depend on the shape of the
  window, and the badge scrolled off the top on anything wider than 16:10.

And one thing confirmed by reading the font file rather than guessing: the
VGA face genuinely contains all eight box drawing and block glyphs that
DEFRAG and the editor draw with, so if those come out wrong it is the font
failing to load, not the font lacking the character.
