Exit course
Chapter 2 of 11 Intermediate 8 min read 3 quick checks Updated

Chromium, Gecko and WebKit: What Really Differs

On this page
  1. Three engines, many browsers
  2. Why there is no Safari for Windows
  3. Measure, do not guess
  4. The other layers: OS and browser shell
  5. Summary

Before deciding what to test, it helps to know where browser differences come from. "Chrome versus Safari" sounds like one comparison, but it is really three: a different rendering engine, a different JavaScript engine and a different browser shell, often on a different operating system. Each layer produces its own kind of bug.

Three engines, many browsers#

Engine JavaScript engine Browsers built on it
Blink (Chromium) V8 Chrome, Edge, Opera, Brave, Samsung Internet, Vivaldi
Gecko SpiderMonkey Firefox
WebKit JavaScriptCore Safari on macOS, iOS and iPadOS

Two things follow from that table.

Chrome and Edge are close, but not identical. They share Blink and V8, so a layout or JavaScript bug in one is usually in the other. They do not share the shell: Edge has its own settings, default fonts and enterprise policies, and it releases on its own schedule. Testing both is cheap insurance, but if you have to drop one, the engine coverage you lose is small.

Firefox and Safari are the ones that catch engine bugs. A suite that only runs on Chromium-based browsers tests one engine, however many browser names are in the list.

Why there is no Safari for Windows#

Apple stopped shipping Safari for Windows after version 5.1.7 in 2012. Every Safari since then runs only on Apple's own operating systems. If your users are on Safari, your tests need a Mac, an iPhone or an iPad somewhere: on your desk, in CI or in a cloud grid.

What does exist on Windows and Linux is WebKit, the engine. Playwright, for example, ships its own WebKit build for all three operating systems. It is a good early signal for Safari bugs, but it is not Safari: it is built from WebKit sources that are often ahead of what Apple has released, it lacks Safari's own features (such as its tracking prevention and Apple Pay), and on Windows it renders with Windows fonts. Treat a green WebKit run on Linux as "probably fine in Safari", and a run on real Safari on macOS as the answer.

On iPhone and iPad the rule has been even stricter: for most of the platform's history, Apple's App Store rules required every browser on iOS to use WebKit, so Chrome and Firefox on an iPhone were WebKit with a different shell. Since iOS 17.4, browsers distributed in the EU may use their own engine. Chapter 6 covers what that means for mobile testing.

Your CI runs the suite on Playwright's WebKit build on Linux and it is green. A user reports a layout bug in Safari 26 on macOS. What does that tell you?

Playwright's WebKit shares the engine with Safari, so it catches most WebKit bugs, but it is a different build on a different OS with different fonts and without Safari's shell. A Safari-only bug is exactly the case it can miss.

Measure, do not guess#

Much of what you read about browser differences is out of date. The fastest way to know is to ask the browsers. This script opens a page in a remote browser and runs a small probe in it:

import json
import os
import sys

from selenium import webdriver

PROBE = """
const box = document.createElement('div');
box.style.cssText = 'width:100px;height:100px;overflow:scroll';
document.body.appendChild(box);
return {
  userAgent: navigator.userAgent,
  hasUserAgentData: 'userAgentData' in navigator,
  scrollbarWidth: box.offsetWidth - box.clientWidth,
  dateWithSpace: String(new Date('2026-11-12 10:00')),
  hasSelector: CSS.supports('selector(:has(a))'),
};
"""

BROWSERS = {
    "chrome": (webdriver.ChromeOptions, "WIN11"),
    "edge": (webdriver.EdgeOptions, "WIN11"),
    "firefox": (webdriver.FirefoxOptions, "WIN11"),
    "safari": (webdriver.SafariOptions, "TAHOE"),
}

options_class, platform = BROWSERS[sys.argv[1]]
options = options_class()
options.browser_version = "latest"
options.platform_name = platform
options.set_capability("tb:options", {
    "key": os.environ["TB_KEY"],
    "secret": os.environ["TB_SECRET"],
    "name": f"engine probe {sys.argv[1]}",
})

driver = webdriver.Remote("https://hub.testingbot.com/wd/hub", options=options)
try:
    driver.get("https://example.com")
    print(json.dumps(driver.execute_script(PROBE), indent=2))
finally:
    driver.quit()

Run it once per browser (python probe.py safari). Chapter 4 explains the options classes and capabilities; for now, look at the results. These are from our run in November 2026:

Chrome 156, Windows 11 Edge 156, Windows 11 Firefox 158, Windows 11 Safari 26.6, macOS Tahoe
OS in the user agent Windows NT 10.0 Windows NT 10.0 Windows NT 10.0 Intel Mac OS X 10_15_7
navigator.userAgentData yes yes no no
Scrollbar width (px) 15 15 0 17
new Date('2026-11-12 10:00') valid valid valid valid
:has() selector yes yes yes yes

Each row is a lesson.

The user agent lies about the operating system. Windows 11 reports Windows NT 10.0, and Safari on an Apple silicon Mac running macOS 26 reports Intel Mac OS X 10_15_7. Browsers froze those tokens on purpose, to reduce fingerprinting. Code that parses the user agent to detect the OS or browser version will make wrong decisions, and so will tests that assert on it.

Some APIs exist in one engine only. navigator.userAgentData (User-Agent Client Hints) is a Chromium feature. A page that calls navigator.userAgentData.platform without checking throws a TypeError in Firefox and Safari, and a test suite that only runs on Chrome never notices.

The same CSS gives different widths. A box with overflow: scroll loses 15 pixels to the scrollbar in Chromium on Windows, none in Firefox on Windows 11 (which uses overlay scrollbars by default) and 17 in Safari on that Mac. Any layout that is designed to the pixel, and any test that asserts on pixel widths, behaves differently in each.

Old folklore is often wrong now. For years, new Date('2026-11-12 10:00') (a space instead of T) returned Invalid Date in Safari, and plenty of articles still say so. In all four current browsers it parses. That does not make it safe to rely on, because the format is not part of the ECMAScript standard and older Safari versions on your users' devices may still reject it, but it shows why you measure your own matrix instead of trusting a list.

A page decides whether to show the Windows download button by checking navigator.userAgent.includes('Windows NT 11'). What happens on Windows 11?

All three Windows browsers in our run reported Windows NT 10.0 on Windows 11. The token is frozen, so user agent sniffing for OS versions is unreliable in every browser, not only in one.

The other layers: OS and browser shell#

Not every difference comes from the engine. Three that regularly break tests come from the operating system and the browser around the engine:

  • Keyboard shortcuts. Select-all is Control+A on Windows and Linux and Command+A on macOS. On macOS, Control+A in a text field of Safari or Chrome moves the cursor to the start of the line instead. Chapter 3 shows a test that passes on Windows and fails on a Mac for exactly this reason.
  • Fonts. The same font-family: sans-serif is Arial on Windows, Helvetica on macOS and something else again on Linux. Text wraps at different points, so an element that fits on one line in one browser takes two in another.
  • Native form controls. Date pickers, select dropdowns, file inputs and scrollbars are drawn by the browser and the OS, not by your CSS. They look different, and they respond to keyboard input differently.

A useful habit when a test fails in one browser only: ask which layer the difference lives in. An engine difference needs a code fix or a fallback in the application. An OS or shell difference usually means the test was relying on something it should not.

You can only afford to run four configurations on every commit. Which set covers the most engines?

Option b covers Blink, Gecko and WebKit plus a mobile browser. Option a is four shells around one engine, and option c is one browser four times; both leave Firefox and Safari users untested.

Summary#

  • Three rendering engines matter: Blink, Gecko and WebKit. Browser names are not engines.
  • Safari only runs on Apple platforms. WebKit builds elsewhere are a signal, not a substitute.
  • User agent strings are frozen and misleading; feature detection is the reliable way to branch.
  • Differences come from the engine, the operating system and the browser shell. Knowing which one you are looking at tells you whether to fix the app or the test.