gecko-dev/testing/web-platform/tests
Boris Chiou 029fb647e7 Bug 1545309 - Run ResizeObserver eventloop test after loading successfully. r=dholbert
In test0(), we use the callback of `requestAnimationFrame` to know in which
eventloop (i.e. `Tick()`) we are. However, we may not trigger the callback
of `requestAnimationFrame` if we are not visible. This is an optimization
in Bug 1145439.

Detail:
We use `Document::ShouldThrottleFrameRequests()` to check if we should throttle
the frame requests in the current `Tick()`. This function returns true if we
didn't get painted during the last paint, so we are not visible, so throttle
the frame requests. Note that because we have to paint this document at least
once to unthrottle it, we will drop one `requestAnimationFrame` frame when a
document that previously wasn't visible scrolls into view.

Therefore, we should make sure we got the first paint before running test0().
Using onload is not perfect, but we don't have other better choose for now.

Differential Revision: https://phabricator.services.mozilla.com/D29772

--HG--
extra : moz-landing-system : lando
2019-05-06 22:53:09 +00:00
..
.github Bug 1535813 [wpt PR 15781] - Use GitHub actions for building manifest, a=testonly 2019-04-24 11:30:57 +01:00
.well-known Bug 1534692 - Part 1: Stop using |global|, and fix a typo ('param' should have been 'args') in mock-idp.js r=jib 2019-03-29 18:37:29 +00:00
2dcontext Bug 1539650 [wpt PR 16084] - Extend canvas getContextAttributes WPTest, a=testonly 2019-04-24 11:31:38 +01:00
accelerometer Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
accname
acid Bug 1533859 [wpt PR 15677] - Fix Acid2 to take the screenshot after it loads, a=testonly 2019-04-01 14:43:01 +01:00
ambient-light Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
animation-worklet Bug 1535516 [wpt PR 15767] - Handle inactive timelines for main-thread worklet animations., a=testonly 2019-04-24 11:30:36 +01:00
annotation-model Bug 1541545 [wpt PR 15952] - Consolidate .gitignore files under the root., a=testonly 2019-04-24 11:30:48 +01:00
annotation-protocol Bug 1541545 [wpt PR 15952] - Consolidate .gitignore files under the root., a=testonly 2019-04-24 11:30:48 +01:00
annotation-vocab Bug 1541545 [wpt PR 15952] - Consolidate .gitignore files under the root., a=testonly 2019-04-24 11:30:48 +01:00
apng
appmanifest
audio-output Bug 1532522 [wpt PR 15621] - Mark MediaDevices-related interfaces as SecureContext, a=testonly 2019-04-01 14:42:34 +01:00
background-fetch Bug 1538609 [wpt PR 16020] - [Background Fetch] Add web platform tests for match., a=testonly 2019-04-24 11:19:29 +01:00
BackgroundSync
battery-status Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
beacon Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
bluetooth Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
clear-site-data
client-hints Bug 1526640 [wpt PR 15202] - Implement Sec-CH-Lang, a=testonly 2019-04-01 14:42:12 +01:00
clipboard-apis Bug 1538145 [wpt PR 15986] - Reland "Async Clipboard Tests: Use quotes as per style guide.", a=testonly 2019-04-24 11:19:04 +01:00
common Bug 1535520 [wpt PR 15769] - HTML: named objects of navigated documents, a=testonly 2019-04-24 11:31:44 +01:00
compat Bug 1523562 [wpt PR 14999] - [css-ui][compat] Move and update appearance cssom test, a=testonly 2019-02-07 21:50:53 +00:00
conformance-checkers Bug 1535813 [wpt PR 15781] - Use GitHub actions for building manifest, a=testonly 2019-04-24 11:30:57 +01:00
console
content-security-policy Bug 1537730 [wpt PR 15864] - Add reporting.idl as a dep for CSP idlharness.js tests, a=testonly 2019-04-24 11:31:48 +01:00
cookie-store Bug 1513138 [wpt PR 14444] - Cookie Store: Test cross-origin frames + service workers., a=testonly 2019-02-07 21:49:37 +00:00
cookies Bug 1549389 - Fix the expected value of attribute0023 wpt test; r=baku 2019-05-08 08:47:25 +00:00
core-aam
cors Bug 1541558 [wpt PR 16048] - CORS/XHR: mark Client Hints tentative, a=testonly 2019-04-24 11:30:51 +01:00
credential-management
css Bug 1494100 Part 3 - Implement "contain:size" for ColumnSetWrapperFrame. r=dholbert 2019-05-08 22:58:39 +00:00
custom-elements Bug 1317658 part 2. Pass enough information to bindings' GetDesiredProto to allow it to return the prototype the spec says it should. r=edgar 2019-04-26 15:55:59 +00:00
device-memory Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
docs Bug 1538390 [wpt PR 16015] - Fix typo in docs/_writing-tests/testdriver.md, a=testonly 2019-04-24 11:19:15 +01:00
dom Bug 1540028 [wpt PR 16099] - Catch more exceptions in Document-createElement-namespace, a=testonly 2019-04-24 11:31:35 +01:00
domparsing Bug 1535765 [wpt PR 15779] - XMLSerializer: Keep redundant but harmless default namespace declarations, a=testonly 2019-04-01 14:43:21 +01:00
domxpath Bug 973341 [wpt PR 15266] - [Gecko Bug 973341] XPath evaluate() fails if reusing an iterator result., a=testonly 2019-02-26 12:05:06 +00:00
dpub-aam
dpub-aria
editing Bug 1547869 - Make IsCommandEnabled() of HTML editor command classes return false if given editor is TextEditor r=smaug 2019-05-03 02:15:18 +00:00
element-timing Bug 1540738 [wpt PR 15936] - [ElementTiming] Mimic FCP++ rect computations, a=testonly 2019-04-24 11:31:37 +01:00
encoding Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
encrypted-media Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
entries-api
event-timing Bug 1539880 [wpt PR 16090] - Revert "Fix external/wpt/event-timing/event-timing-onloadobserve.html to be more deterministic", a=testonly 2019-04-24 11:31:28 +01:00
eventsource Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
feature-policy Bug 1535863 [wpt PR 15792] - [ FeaturePolicy ] 'sandbox' vs 'allow' attributes, a=testonly 2019-04-24 11:31:54 +01:00
fetch Bug 1541670 [wpt PR 16148] - Send Sec-Fetch-User only for user-activated, navigational requests., a=testonly 2019-05-03 18:30:27 +01:00
FileAPI Bug 1539533 [wpt PR 16070] - Mark FileAPI/url/url-format.any.js slow, a=testonly 2019-04-24 11:30:55 +01:00
fonts Bug 1532572 [wpt PR 15627] - Unset the executable bit of non-executable files, a=testonly 2019-04-01 14:42:32 +01:00
fullscreen Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
gamepad Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
generic-sensor Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
geolocation-API Bug 1509772 [wpt PR 14227] - Remove the timeout in async_test for missing tests, a=testonly 2018-12-11 15:49:54 +00:00
geolocation-sensor Bug 1523562 [wpt PR 14827] - Feature Policy JS API Update: Add document.featurePolicy.features, a=testonly 2019-02-07 21:51:02 +00:00
graphics-aam
gyroscope Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
hr-time Bug 1512574 [wpt PR 14409] - Remove test-level assert property from tests, a=testonly 2018-12-14 13:54:42 +00:00
html Bug 1548731 - part3 : modify wpt 'track-mode.html'. r=smaug 2019-05-07 18:01:44 +00:00
html-longdesc
html-media-capture Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
idle-detection Bug 1539463 [wpt PR 16033] - [idle] Add a threshold minimum of 60 seconds in IdleDetector, a=testonly 2019-04-24 11:30:54 +01:00
imagebitmap-renderingcontext Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
images Bug 1526329 [wpt PR 15076] - Add fyi logos, a=testonly 2019-02-14 11:38:22 +00:00
import-maps Bug 1538300 [wpt PR 15919] - [Import Maps] Apply inline-script CSP checks to import maps, a=testonly 2019-04-24 11:18:43 +01:00
IndexedDB Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
inert
infrastructure Bug 1540022 [wpt PR 16098] - [testdriver.js] Improve test coverage, a=testonly 2019-04-24 11:31:39 +01:00
input-device-capabilities
input-events Bug 998941 - Update web platform tests for InputEvent.data and InputEvent.dataTransfer r=smaug 2019-02-19 06:34:21 +00:00
interfaces Bug 1548773: Remove support for typemustmatch r=bzbarsky 2019-05-05 14:41:59 +00:00
intersection-observer Bug 1526260 [wpt PR 15175] - [IntersectionObserver] Upstream V2 tests to wpt, a=testonly 2019-03-16 12:12:37 +00:00
js Bug 1527319 [wpt PR 15333] - [js] Remove invalid tests for JavaScript built-ins, a=testonly 2019-04-24 11:31:15 +01:00
keyboard-lock
keyboard-map
kv-storage Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
layout-stability Bug 1528204 [wpt PR 15368] - [LayoutStability] Move layout tests to WPT, a=testonly 2019-03-16 12:12:38 +00:00
lifecycle Bug 1539515 [wpt PR 16065] - Fix the lack of damage tracking for root layer position changes in BGPT., a=testonly 2019-04-24 11:30:55 +01:00
loading Bug 1509790 [wpt PR 14230] - Fix CSSPreloadScanner to avoid missing rules (reland), a=testonly 2018-12-11 15:49:49 +00:00
longtask-timing Bug 1529818 [wpt PR 15492] - LongTasks: fix sibling layout test, a=testonly 2019-03-16 12:13:18 +00:00
magnetometer Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
mathml Bug 1539571 [wpt PR 16075] - Add tests for creating mfrac children dynamically, a=testonly 2019-04-24 11:30:58 +01:00
media
media-capabilities Bug 1526316 [wpt PR 15009] - MediaCapabilities: Add "transmission" type., a=testonly 2019-02-14 11:38:21 +00:00
media-source Bug 1538433 [wpt PR 15991] - MSE: Fix mediasource-changetype-play to work with MseBufferByPts, a=testonly 2019-04-24 11:30:34 +01:00
mediacapture-depth Bug 1538342 [wpt PR 15926] - [getUserMedia] Revert obsolete depthNear, depthFar, focalLengthX, focalLengthY., a=testonly 2019-04-24 11:18:54 +01:00
mediacapture-fromelement Bug 1514241 - Remove Chrome-specific dependency and modernize. r=jib 2018-12-17 13:56:05 +00:00
mediacapture-image Bug 1532522 [wpt PR 15621] - Mark MediaDevices-related interfaces as SecureContext, a=testonly 2019-04-01 14:42:34 +01:00
mediacapture-record Bug 1523562 [wpt PR 14809] - MediaRecorder: Upstream some moarrrr web_tests to WPT, a=testonly 2019-02-07 21:50:17 +00:00
mediacapture-streams Bug 1335740 - Update wpt & mochitests to work w/[SecureContext] navigator.mediaDevices. r=pehrsons 2019-04-30 15:20:53 +00:00
mediasession
mimesniff Bug 1454984 [wpt PR 10525] - Parsing Content-Type, a=testonly 2018-12-11 15:49:52 +00:00
mixed-content Bug 1531345 [wpt PR 15538] - [WPT] Move common.js from {referrer-policy,mixed-content} to common/security-features, a=testonly 2019-03-16 12:13:28 +00:00
mst-content-hint
navigation-timing Bug 1534886 [wpt PR 15746] - [Navigation timing] Make sure unloadEvent is only exposed when all redirects pass TAO, a=testonly 2019-04-01 14:43:24 +01:00
netinfo
network-error-logging Bug 1530812 [wpt PR 15495] - Add signed exchange reporting error test cases, a=testonly 2019-03-16 12:13:20 +00:00
notifications Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
offscreen-canvas Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
old-tests
orientation-event Bug 1538286 [wpt PR 15939] - Restrict the rest manual tests to secure origins, a=testonly 2019-04-24 11:18:39 +01:00
orientation-sensor Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
origin-policy Bug 1528967 [wpt PR 15462] - [Origin Policy] Implement error reporting via Reporting API, a=testonly 2019-04-01 14:42:39 +01:00
page-visibility
paint-timing Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
payment-handler Bug 1526848 [wpt PR 14952] - Remove two uses of dedicated-workers.idl, a=testonly 2019-02-26 12:05:17 +00:00
payment-method-basic-card Bug 1538459 [wpt PR 15995] - Fix a bunch of bugs 🤦‍♂️, a=testonly 2019-04-24 11:19:21 +01:00
payment-method-id Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
payment-request Bug 1541630 [wpt PR 16142] - Use step_timeout() to force spin the EventLoop, a=testonly 2019-04-24 11:31:45 +01:00
performance-timeline Bug 1547087 - Fix arguments to PerformanceObserver.observe in wpt test 2019-04-25 23:50:48 +00:00
permissions
picture-in-picture Bug 1534865 [wpt PR 15743] - Add experimental :picture-in-picture CSS pseudo-class, a=testonly 2019-04-24 11:31:31 +01:00
pointerevents Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
pointerlock Bug 1534874 [wpt PR 15745] - Automate some pointerlock wpt, a=testonly 2019-04-01 14:43:26 +01:00
portals Bug 1532558 [wpt PR 15626] - Portals: Add checks for failure scenarios for activate(), a=testonly 2019-04-24 11:30:37 +01:00
preload Bug 1540979 [wpt PR 16127] - Remove .tentative mark from preload-imagesrcset tests, a=testonly 2019-04-24 11:31:39 +01:00
presentation-api Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
priority-hints
proximity Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
push-api
quirks Bug 1528145 [wpt PR 15380] - Quirks: percentage height quirk does not apply to flex/grid, a=testonly 2019-04-24 11:31:52 +01:00
referrer-policy Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
remote-playback
reporting Bug 1529156 [wpt PR 15305] - Add testdriver support for generate_test_report WebDriver command., a=testonly 2019-03-16 12:13:09 +00:00
requestidlecallback Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
resize-observer Bug 1545309 - Run ResizeObserver eventloop test after loading successfully. r=dholbert 2019-05-06 22:53:09 +00:00
resource-timing Bug 1535814 [wpt PR 15782] - [resource-timing] Add TAO null check tests and make sure they pass, a=testonly 2019-04-01 14:43:42 +01:00
resources Bug 1541545 [wpt PR 15952] - Consolidate .gitignore files under the root., a=testonly 2019-04-24 11:30:48 +01:00
screen-capture Bug 1532522 [wpt PR 15621] - Mark MediaDevices-related interfaces as SecureContext, a=testonly 2019-04-01 14:42:34 +01:00
screen-orientation Bug 1534117 [wpt PR 15705] - Screen Orientation: active lock orientation algorithm tests, a=testonly 2019-04-24 11:30:43 +01:00
scroll-animations Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
secure-contexts
selection Bug 1535931 [wpt PR 15812] - Selection and document.open(), a=testonly 2019-04-01 14:43:36 +01:00
serial Bug 1516736 [wpt PR 14686] - [serial] Implement feature policy checks, a=testonly 2019-02-26 12:05:13 +00:00
server-timing
service-workers Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
shadow-dom Bug 1541519 [wpt PR 16047] - [shadow-dom] Fix flakiness of untriaged/html-elements-in-shadow-trees/html-forms/test-003.html, a=testonly 2019-04-24 11:30:44 +01:00
shape-detection Bug 1535435 [wpt PR 15761] - Upstream shapedetection tests to WPT, a=testonly 2019-04-24 11:18:03 +01:00
signed-exchange Bug 1535692 [wpt PR 15777] - SignedExchange: Add wpts to test interactions with appcache, a=testonly 2019-04-24 11:18:41 +01:00
speech-api Bug 1534583 [wpt PR 15732] - Added test for charLength field in SpeechSynthesisEvent-constructor, a=testonly 2019-04-01 14:43:55 +01:00
storage Bug 1514436 [wpt PR 14531] - Reland "Add quota usage details tests for all other storage backends.", a=testonly 2019-02-07 21:50:57 +00:00
streams Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
subresource-integrity Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
svg Bug 1547619 - Fix :-moz-svg-use-shadow-tree-root pseudo-class. r=violet 2019-04-29 08:04:22 +00:00
svg-aam
tools Bug 1546481 - Let wpt test servers listen at localhost r=jgraham 2019-05-07 09:04:58 +00:00
touch-events
trusted-types Bug 1533781 [wpt PR 15654] - [trusted types] TrustedTypes.isXXX should accept any paramter., a=testonly 2019-04-01 14:42:44 +01:00
uievents Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
upgrade-insecure-requests Bug 1531345 [wpt PR 15538] - [WPT] Move common.js from {referrer-policy,mixed-content} to common/security-features, a=testonly 2019-03-16 12:13:28 +00:00
url Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
user-timing Bug 1523562 [wpt PR 14867] - Ensure that all PerformanceObserver.supportedEntryTypes are observable, a=testonly 2019-02-07 21:50:39 +00:00
vibration Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
visual-viewport Bug 1477610 - Wait for the load event before running viewport-unscaled-size-iframe.html. r=hiro 2019-05-09 03:57:08 +00:00
wai-aria
wake-lock Bug 1535905 [wpt PR 15803] - [wake-lock] Adapted the rest tests to latest spec, a=testonly 2019-04-01 14:43:42 +01:00
wasm Bug 1536231 [wpt PR 15833] - Add a timing test for WebAssembly.instantiateStreaming., a=testonly 2019-04-01 14:43:45 +01:00
web-animations Bug 1536688 - Allow animating the 'all' property from Web Animations; r=emilio 2019-04-26 00:47:40 +00:00
web-locks Bug 1523562 [wpt PR 15016] - Add assert descriptions to Web Locks test to aid debugging, a=testonly 2019-02-07 21:50:55 +00:00
web-nfc Bug 1536204 [wpt PR 15832] - Fix web-nfc code error., a=testonly 2019-04-01 14:43:41 +01:00
web-share Bug 1523562 [wpt PR 14967] - WebShare: canShare() method in Level 2, a=testonly 2019-02-07 21:50:49 +00:00
webaudio Bug 1530178 - Fix audiobuffer-copy-channel.html to allow copyFromChannel/copyToChannel wth an offset of n on an array that is n elements long. r=karlt 2019-05-02 09:24:57 +00:00
webauthn Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
WebCryptoAPI Bug 1510941 [wpt PR 14291] - [WebCryptoAPI] Remove race condition, a=testonly 2018-12-14 13:54:49 +00:00
webdriver Bug 1548773: Remove support for typemustmatch r=bzbarsky 2019-05-05 14:41:59 +00:00
webgl Bug 1528741 [wpt PR 15411] - Mark WebGL idlharness tests as slow, a=testonly 2019-03-16 12:12:50 +00:00
WebIDL Bug 1317658 part 2. Pass enough information to bindings' GetDesiredProto to allow it to return the prototype the spec says it should. r=edgar 2019-04-26 15:55:59 +00:00
webmessaging Merge mozilla-inbound to mozilla-central. a=merge 2019-04-02 00:55:55 +03:00
webmidi
webrtc Bug 1546981: Remove duplicate test-case, and remove an error suppression it caused. r=jib 2019-05-02 19:11:07 +00:00
webrtc-identity Bug 1534692 - Part 7: Make RTCPeerConnection-getIdentityAssertion.sub use https, and fix bugs in the test. r=jib 2019-03-29 18:40:57 +00:00
webrtc-quic Bug 1541470 [wpt PR 16028] - Don't mark RTCQuicStream.https.html wpt as slow, a=testonly 2019-04-24 11:30:32 +01:00
webrtc-stats Bug 1523562 [wpt PR 14983] - Make webrtc-stats idlharness.js test depend on webrtc, a=testonly 2019-02-07 21:51:05 +00:00
websockets Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
webstorage Bug 1536187 [wpt PR 14798] - Remove inactive reviewers, a=testonly 2019-04-01 14:43:38 +01:00
webusb Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
webvr Bug 1523562 [wpt PR 14827] - Feature Policy JS API Update: Add document.featurePolicy.features, a=testonly 2019-02-07 21:51:02 +00:00
webvtt Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
webxr Bug 1538140 [wpt PR 15954] - Remove XRView.viewMatrix, a=testonly 2019-04-24 11:19:01 +01:00
workers Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
worklets Bug 1523562 [wpt PR 14774] - [wpt/upgrade-insecure-requests] Add worker/worklet tests, a=testonly 2019-02-07 21:50:08 +00:00
x-frame-options
xhr Bug 1532639 [wpt PR 15630] - Add <meta name=timeout content=long> to WPT in SlowTests, a=testonly 2019-04-24 11:19:30 +01:00
xhtml Bug 1539742 - Notify of appends to the right document when parsing into an already-adopted node. r=bzbarsky 2019-03-29 09:55:10 +00:00
.azure-pipelines.yml Bug 1540284 [wpt PR 16108] - [Azure Pipelines] Run scheduled runs of Safari stable, a=testonly 2019-04-24 11:31:36 +01:00
.codecov.yml
.gitignore Bug 1541545 [wpt PR 15952] - Consolidate .gitignore files under the root., a=testonly 2019-04-24 11:30:48 +01:00
.gitmodules
.mailmap Bug 1527461 [wpt PR 15353] - Add .mailmap to map people to their current names, a=testonly 2019-02-26 12:05:32 +00:00
.pyup.yml
.taskcluster.yml Bug 1540306 [wpt PR 16110] - Don't use HEAD or FETCH_HEAD to checkout specific revisions. (#16066), a=testonly 2019-04-24 11:31:24 +01:00
check_stability.ini Bug 1512004 [wpt PR 14354] - Implement --affected in wpt run and use it on Taskcluster, a=testonly 2018-12-14 13:54:44 +00:00
CODEOWNERS Bug 1526581 [wpt PR 15249] - CODEOWNERS cleanup, a=testonly 2019-02-26 12:05:02 +00:00
CONTRIBUTING.md
LICENSE
LICENSE.md
lint.whitelist Bug 1539664 [wpt PR 16085] - Fix lint failures on master, a=testonly 2019-04-24 11:31:06 +01:00
README.md
serve.py
server-side.md
testharness_runner.html
update-built-tests.sh
wpt
wpt.py

The web-platform-tests Project IRC chat

The web-platform-tests Project is a W3C-coordinated attempt to build a cross-browser testsuite for the Web-platform stack. Writing tests in a way that allows them to be run in all browsers gives browser projects confidence that they are shipping software that is compatible with other implementations, and that later implementations will be compatible with their implementations. This in turn gives Web authors/developers confidence that they can actually rely on the Web platform to deliver on the promise of working across browsers and devices without needing extra layers of abstraction to paper over the gaps left by specification editors and implementors.

Setting Up the Repo

Clone or otherwise get https://github.com/web-platform-tests/wpt.

Note: because of the frequent creation and deletion of branches in this repo, it is recommended to "prune" stale branches when fetching updates, i.e. use git pull --prune (or git fetch -p && git merge).

Running the Tests

The tests are designed to be run from your local computer. The test environment requires Python 2.7+ (but not Python 3.x).

On Windows, be sure to add the Python directory (c:\python2x, by default) to your %Path% Environment Variable, and read the Windows Notes section below.

To get the tests running, you need to set up the test domains in your hosts file.

The necessary content can be generated with ./wpt make-hosts-file; on Windows, you will need to precede the prior command with python or the path to the Python binary (python wpt make-hosts-file).

For example, on most UNIX-like systems, you can setup the hosts file with:

./wpt make-hosts-file | sudo tee -a /etc/hosts

And on Windows (this must be run in a PowerShell session with Administrator privileges):

python wpt make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append

If you are behind a proxy, you also need to make sure the domains above are excluded from your proxy lookups.

Running Tests Manually

The test server can be started using

./wpt serve

On Windows: You will need to precede the prior command with python or the path to the python binary.

python wpt serve

This will start HTTP servers on two ports and a websockets server on one port. By default the web servers start on ports 8000 and 8443 and the other ports are randomly-chosen free ports. Tests must be loaded from the first HTTP server in the output. To change the ports, create a config.json file in the wpt root directory, and add port definitions of your choice e.g.:

{
  "ports": {
    "http": [1234, "auto"],
    "https":[5678]
  }
}

After your hosts file is configured, the servers will be locally accessible at:

http://web-platform.test:8000/
https://web-platform.test:8443/ *

*See Trusting Root CA

Running Tests Automatically

Tests can be run automatically in a browser using the run command of the wpt script in the root of the checkout. This requires the hosts file setup documented above, but you must not have the test server already running when calling wpt run. The basic command line syntax is:

./wpt run product [tests]

On Windows: You will need to precede the prior command with python or the path to the python binary.

python wpt run product [tests]

where product is currently firefox or chrome and [tests] is a list of paths to tests. This will attempt to automatically locate a browser instance and install required dependencies. The command is very configurable; for example to specify a particular binary use wpt run --binary=path product. The full range of options can be see with wpt run --help and wpt run --wptrunner-help.

Not all dependencies can be automatically installed; in particular the certutil tool required to run https tests with Firefox must be installed using a system package manager or similar.

On Debian/Ubuntu certutil may be installed using:

sudo apt install libnss3-tools

And on macOS with homebrew using:

brew install nss

On other platforms, download the firefox archive and common.tests.tar.gz archive for your platform from Mozilla CI.

Then extract certutil[.exe] from the tests.tar.gz package and libnss3[.so|.dll|.dynlib] and put the former on your path and the latter on your library path.

Command Line Tools

The wpt command provides a frontend to a variety of tools for working with and running web-platform-tests. Some of the most useful commands are:

  • wpt serve - For starting the wpt http server
  • wpt run - For running tests in a browser
  • wpt lint - For running the lint against all tests
  • wpt manifest - For updating or generating a MANIFEST.json test manifest
  • wpt install - For installing the latest release of a browser or webdriver server on the local machine.

Submodules

Some optional components of web-platform-tests (test components from third party software and pieces of the CSS build system) are included as submodules. To obtain these components run the following in the root of your checkout:

git submodule update --init --recursive

Prior to commit 39d07eb01fab607ab1ffd092051cded1bdd64d78 submodules were required for basic functionality. If you are working with an older checkout, the above command is required in all cases.

When moving between a commit prior to 39d07eb and one after it git may complain

$ git checkout master
error: The following untracked working tree files would be overwritten by checkout:
[…]

...followed by a long list of files. To avoid this error, remove the resources and tools directories before switching branches:

$ rm -r resources/ tools/
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'

When moving in the opposite direction, i.e. to a commit that does have submodules, you will need to git submodule update, as above. If git throws an error like:

fatal: No url found for submodule path 'resources/webidl2/test/widlproc' in .gitmodules
Failed to recurse into submodule path 'resources/webidl2'
fatal: No url found for submodule path 'tools/html5lib' in .gitmodules
Failed to recurse into submodule path 'resources'
Failed to recurse into submodule path 'tools'

...then remove the tools and resources directories, as above.

Windows Notes

On Windows wpt commands must be prefixed with python or the path to the python binary (if python is not in your %PATH%).

python wpt [command]

Alternatively, you may also use Bash on Ubuntu on Windows in the Windows 10 Anniversary Update build, then access your windows partition from there to launch wpt commands.

Please make sure git and your text editor do not automatically convert line endings, as it will cause lint errors. For git, please set git config core.autocrlf false in your working tree.

Certificates

By default pre-generated certificates for the web-platform.test domain are provided in tools/certs. If you wish to generate new certificates for any reason it's possible to use OpenSSL when starting the server, or starting a test run, by providing the --ssl-type=openssl argument to the wpt serve or wpt run commands.

If you installed OpenSSL in such a way that running openssl at a command line doesn't work, you also need to adjust the path to the OpenSSL binary. This can be done by adding a section to config.json like:

"ssl": {"openssl": {"binary": "/path/to/openssl"}}

On Windows using OpenSSL typically requires installing an OpenSSL distribution. Shining Light provide a convenient installer that is known to work, but requires a little extra setup, i.e.:

Run the installer for Win32_OpenSSL_v1.1.0b (30MB). During installation, change the default location for where to Copy OpenSSL Dlls from the System directory to the /bin directory.

After installation, ensure that the path to OpenSSL (typically, this will be C:\OpenSSL-Win32\bin) is in your %Path% Environment Variable. If you forget to do this part, you will most likely see a 'File Not Found' error when you start wptserve.

Finally, set the path value in the server configuration file to the default OpenSSL configuration file location. To do this create a file called config.json. Then add the OpenSSL configuration below, ensuring that the key ssl/openssl/base_conf_path has a value that is the path to the OpenSSL config file (typically this will be C:\\OpenSSL-Win32\\bin\\openssl.cfg):

{
  "ssl": {
    "type": "openssl",
    "encrypt_after_connect": false,
    "openssl": {
      "openssl_binary": "openssl",
      "base_path: "_certs",
      "force_regenerate": false,
      "base_conf_path": "C:\\OpenSSL-Win32\\bin\\openssl.cfg"
    },
  },
}

Trusting Root CA

To prevent browser SSL warnings when running HTTPS tests locally, the web-platform-tests Root CA file cacert.pem in tools/certs must be added as a trusted certificate in your OS/browser.

NOTE: The CA should not be installed in any browser profile used outside of tests, since it may be used to generate fake certificates. For browsers that use the OS certificate store, tests should therefore not be run manually outside a dedicated OS instance (e.g. a VM). To avoid this problem when running tests in Chrome or Firefox use wpt run, which disables certificate checks and therefore doesn't require the root CA to be trusted.

Publication

The master branch is automatically synced to http://w3c-test.org/.

Pull requests are automatically mirrored except those that modify sensitive resources (such as .py). The latter require someone with merge access to comment with "LGTM" or "w3c-test:mirror" to indicate the pull request has been checked.

Finding Things

Each top-level directory matches the shortname used by a standard, with some exceptions. (Typically the shortname is from the standard's corresponding GitHub repository.)

For some of the specifications, the tree under the top-level directory represents the sections of the respective documents, using the section IDs for directory names, with a maximum of three levels deep.

So if you're looking for tests in HTML for "The History interface", they will be under html/browsers/history/the-history-interface/.

Various resources that tests depend on are in common, images, and fonts.

Branches

In the vast majority of cases the only upstream branch that you should need to care about is master. If you see other branches in the repository, you can generally safely ignore them.

Contributing

Save the Web, Write Some Tests!

Absolutely everyone is welcome (and even encouraged) to contribute to test development, so long as you fulfill the contribution requirements detailed in the Contributing Guidelines. No test is too small or too simple, especially if it corresponds to something for which you've noted an interoperability bug in a browser.

The way to contribute is just as usual:

  • Fork this repository (and make sure you're still relatively in sync with it if you forked a while ago).
  • Create a branch for your changes: git checkout -b topic.
  • Make your changes.
  • Run the lint script described below.
  • Commit locally and push that to your repo.
  • Send in a pull request based on the above.

Issues with web-platform-tests

If you spot an issue with a test and are not comfortable providing a pull request per above to fix it, please file a new issue. Thank you!

Lint tool

We have a lint tool for catching common mistakes in test files. You can run it manually by starting the lint executable from the root of your local web-platform-tests working directory like this:

./wpt lint

The lint tool is also run automatically for every submitted pull request, and reviewers will not merge branches with tests that have lint errors, so you must fix any errors the lint tool reports.

In the unusual case of error reports for things essential to a certain test or that for other exceptional reasons shouldn't prevent a merge of a test, update and commit the lint.whitelist file in the web-platform-tests root directory to suppress the error reports.

For more details, see the lint-tool documentation.

Adding command-line scripts ("tools" subdirs)

Sometimes you may want to add a script to the repository that's meant to be used from the command line, not from a browser (e.g., a script for generating test files). If you want to ensure (e.g., for security reasons) that such scripts won't be handled by the HTTP server, but will instead only be usable from the command line, then place them in either:

  • the tools subdir at the root of the repository, or

  • the tools subdir at the root of any top-level directory in the repository which contains the tests the script is meant to be used with

Any files in those tools directories won't be handled by the HTTP server; instead the server will return a 404 if a user navigates to the URL for a file within them.

If you want to add a script for use with a particular set of tests but there isn't yet any tools subdir at the root of a top-level directory in the repository containing those tests, you can create a tools subdir at the root of that top-level directory and place your scripts there.

For example, if you wanted to add a script for use with tests in the notifications directory, create the notifications/tools subdir and put your script there.

Test Review

We can sometimes take a little while to go through pull requests because we have to go through all the tests and ensure that they match the specification correctly. But we look at all of them, and take everything that we can.

META.yml files are used only to indicate who should be notified of pull requests. If you are interested in receiving notifications of proposed changes to tests in a given directory, feel free to add yourself to the META.yml file. Anyone with expertise in the specification under test can approve a pull request. In particular, if a test change has already been adequately reviewed "upstream" in another repository, it can be pushed here without any further review by supplying a link to the upstream review.

Search filters to find things to review:

Getting Involved

If you wish to contribute actively, you're very welcome to join the public-test-infra@w3.org mailing list (low traffic) by signing up to our mailing list. The mailing list is archived.

Join us on irc #testing (irc.w3.org, port 6665). The channel is archived.

Documentation