gecko-dev/dom/clients/api
Andrew Sutherland 4d059b2890 Bug 1446225 - Ensure client id's are consistently {}-less UUIDs. r=catalinb
Our Client.id values were being normalized from "{uuid}" to "uuid", but not
our FetchEvent.clientId values.  Because nsID::Parse accepts both forms,
this was not being caught by any tests.

Although there are ServiceWorker WPT tests that verify consistency of
returned Client.id values across multiple matchAll invocations (ex:
client-id.https.html), there are no tests that compare Client.id with
FetchEvent.clientId.  All the tests largely use Clients.get() to verify
correctness/round-tripping.  I looked into adding WPT tests, but we
quickly run into the test logistics problem where it's preferable to
avoid adding tests that involve effectively global state.

So, this patch:
- Changes Clients::Get() to explicitly treat client id's that start with a
  "{" as invalid.  This causes existing FetchEvent.clientId-related WPT
  tests to fail, as we would hope.
- Duplicates the client id normalization logic that strips {} for the
  FetchEvent.clientId to its point of origin in
  ContinueDispatchFetchEventRunnable::Run.
- Augments our dom/serviceworkers/test/test_match_all_client_properties.html
  test, which has been enforcing {}-less UUIDs for a while, to also test
  FetchEvent.clientId to verify it conforms.  I added some comments to the
  test files too.

--HG--
extra : rebase_source : dd6d07ea880eb2c3115d8810ea246b4469ad5f96
2018-03-22 11:33:13 -04:00
..
Client.cpp Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Client.h
ClientDOMUtil.h Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Clients.cpp Bug 1446225 - Ensure client id's are consistently {}-less UUIDs. r=catalinb 2018-03-22 11:33:13 -04:00
Clients.h
moz.build Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00