Commit Graph

814 Commits

Author SHA1 Message Date
Andrey Lushnikov
5c7c45f0aa
chore(coverage): fix coverage for events (#4787)
We used to track API Coverage for public events, but this was regressed in the refactoring that
introduced `//lib/Events.js`.

This patch:
- Brings back API Coverage for events
- Combines all coverage-generated tests into a single one. This way
we can generate less data for flakiness dashboard.
2019-08-01 16:09:50 -07:00
Andrey Lushnikov
e252dcf200
chore(flakiness): Flakiness Dashboard fixes (#4788)
- fix `FLAKINESS_DASHBOARD_BUILD_URL` to point to a task instead of a build
- do not pretty-print `dashboard.json` when serializing flakiness results
- filter out 'COVERAGE' test(s) so that they don't add up to `dashboard.json` payload. These are useless
- validate certain important options of flakiness dashboard
- more logging to STDOUT to actually say which repo and what branch is getting used
- enhance commit message with a build URL
- use a more compact format for JSON. For 100 runs of 700 tests it yields 21MB json instead of 23MB.
- bump default builds number to 100
2019-08-01 16:09:02 -07:00
Yury Semikhatsky
e2db16f898 fix(tests): make eval test resilient to error format (#4793)
Make eval test resilient to variations in error message format between browsers.This will make the test pass without alternations in WebKit as well as Crhrome and Firefox.
2019-08-01 14:18:35 -07:00
Andrey Lushnikov
932c8cbe9a
chore: introduce initial version of flakiness dashboard (#4781)
This patch introduces a dashboard that records test results and
uploads them to https://github.com/aslushnikov/puppeteer-flakiness-dashboard

Since many bots might push results in parallel, each bot pushes
results to its own git branch.

FlakinessDashboard also generates a simple README.md with a flakiness
summary. If this proves to be not enough, we can build a website that
fetches flakiness data and renders it nicely.
2019-07-31 22:23:50 -07:00
Yury Semikhatsky
1b4a0302fc fix(test): make sure selection is not empty before running copy command (#4772)
If current selection is empty document.execCommand('copy') may return false in some browsers (e.g. WebKit based ones).
2019-07-30 13:19:56 -07:00
Joel Einbinder
7a607469df fix(tests): background page tests should wait for the page (#4769) 2019-07-29 14:09:34 -07:00
Andrey Lushnikov
ea28cccfe0 feat(page): introduce file chooser interception (#4653)
This patch introduces a page.waitForFileChooser() method
that adds a watchdog to wait for file chooser dialogs.

This lets Puppeteer users to capture file chooser requests
and fulfill/cancel them if necessary.

Fixes #2946
2019-07-22 21:30:49 -07:00
Yury Semikhatsky
2abaac10aa fix(launcher): make dumpio and pipe options work together (#4727)
Don't ignore stdout and stderr when using pipe for remote debugging and dumpio is true. In that case puppeteer process connects to the stdout/stderr streams of the child process and it will not hang.
2019-07-18 16:42:11 -07:00
Andrey Lushnikov
835e8849fd
feat(testrunner): add new testrunner options (#4718)
This patch adds new TestRunner options:
- `disableTimeoutWhenInspectorIsEnabled` - disable test timeout if
  testrunner detects enabled inspector.
- `breakOnFailure` - if testrunner should terminate test running on
  first test failure
2019-07-17 10:32:37 -07:00
Andrey Lushnikov
ad1802188d
fix(launcher): disable component extensions (#4704)
Chrome has a set of component extensions - e.g. CryptoTokenExtension
that helps with 2FA.

These extensions are loaded regardless of the `--disable-extensions`
flag we already pass. To disable these extensions, we need to pass additional
`--disable-component-extensions-with-background-pages` flag.

Fix #4300
2019-07-15 17:54:42 -07:00
Yury Semikhatsky
a39d553511 fix(tests): Get TLS version from Node instead of hardcoding it (#4700) 2019-07-14 18:33:31 -07:00
Andrey Lushnikov
62733a20d7
fix(connection): bump websocket max received message size to 256Mb (#4571)
This is the max message size that DevTools can emit over the DevTools
protocol: https://cs.chromium.org/chromium/src/content/browser/devtools/devtools_http_handler.cc?type=cs&q=kSendBufferSizeForDevTools&sq=package:chromium&g=0&l=83

Test is failing on firefox since Firefox crashes when allocating 100Mb string.

Fix #4543
2019-06-14 01:05:09 -07:00
Andrey Lushnikov
8df0b3ec3b
fix(network): allow fulfilling requests with status code 422 (#4566)
Migration onto fetch domain (2265974ce5)
changed the way we generate status texts: instead of relying on build-in
list of statuses, we tried to rely upon the [Chromium implementation](https://cs.chromium.org/chromium/src/net/http/http_status_code_list.h?sq=package:chromium&g=0).

Puppeteer's list is much more exhaustive - let's keep it.

Fix #4454
2019-06-10 17:39:58 -07:00
Joel Einbinder
b2f94909a1 fix(eval): be able to throw protocol like errors (#4551) 2019-06-10 17:35:40 -07:00
Andrey Lushnikov
6a50888d34
fix(firefox): fix missing awaits in mouse.click (#4561)
This applies the same fix we used on the Chrome-side and adds a test.

Fix #4536
2019-06-10 16:53:38 -07:00
Andrey Lushnikov
90df69cf77
fix(page): do evaluations with one roundtrip (#4539)
This patch teaches page.evaluate to do 1 hop instead of 2 hops.
As a result, things such as `page.select` will not throw an
unfortunate exception when they schedule a navigation.

Fix #4537
2019-06-07 13:46:43 -07:00
Andrey Lushnikov
15804d111a
test: remove debug console.log (#4522) 2019-06-04 16:27:36 -07:00
Andrey Lushnikov
78d5106dd9
feat(chromium): roll Chromium to r665405 (#4516)
* feat(chromium): roll Chromium to r665405

This roll includes:
- https://crrev.com/665226 - DevTools: make interception respect cross-process frame boundaries

This fixes page loading with dynamic OOPIFs - test is added.

Fix #4442

* fix lint
2019-06-04 11:03:15 -07:00
Andrey Lushnikov
d221c02c13
test: add test to verify fetching of dataURL requests (#4233) 2019-05-31 17:11:55 -07:00
Andrey Lushnikov
015e330815
test: add oopif tests (#4495)
Reference #2548
2019-05-29 16:49:44 -07:00
Andrey Lushnikov
76b24e64e8
feat(chromium): roll Chromium to r662092 (#4462)
This roll includes:
- [inspector_protocol:8ec18cf](8ec18cf088) Support STRING16 in the template when converting CBOR map keys
to protocol::Value.
- [inspector_protocol:37518ac](37518ac421) fix parsing of the last ASCII character

This fixes protocol handling of UTF8 in both V8 and Chromium.

Fixes #4443.
2019-05-22 21:21:45 +03:00
Andreas Tolfsen
cbecfba0af test: convert license text file to LF line endings (#4438)
See #4320 (comment).

Should fix the checkout problems on Unix file systems.
2019-05-21 23:11:25 +03:00
Darío Kondratiuk
bad98baf70 fix(test): browser.disconnect should not be awaited (#4446)
browser.disconnect does not return a promise
2019-05-21 17:26:04 +03:00
Jake Causon
90a1032300 fix(network): stringify response headers for intercepted requests (#4436)
Stringifying the headers was the behaviour before v1.15

References #4379
2019-05-20 11:05:32 +03:00
Sergio M
60249e0bc2 fix: Page.setContent working with unicode strings (#4433)
Fix `page.setContent` with unicode strings that exceeds the range of a 8-bit byte.

This patch implements decoding part of the [MDN's solution #4 for the "unicode problem"](https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#Solution_4_%E2%80%93_escaping_the_string_before_encoding_it).

Since we rely on node.js buffer to encode into base64, we don't have troubles with base64 encoding, so it is left as-is.

Fixes #4424
2019-05-18 17:15:16 +03:00
Andrey Lushnikov
3f23bb022e
test: add failing evaluation test with utf8 (#4444)
References #4443
2019-05-18 14:05:28 +03:00
Andrey Lushnikov
8a1c2495c0
test: add SVG clicking test (#4432)
Someone had concerns that pptr's clicking doesn't work with SVG.

Make sure Puppeteer's clicking does.
2019-05-18 12:49:55 +03:00
Joel Einbinder
a3cb16308c feat: root option in page.accessibility.snapshot() (#4318)
Going from `AXNode` -> `ElementHandle` is turning out to be controversial.

This patch instead adds a way to go from `ElementHandle` -> `AXNode`. If the API looks good, I'll add it into Firefox as well.

References #3641
2019-05-09 23:39:42 -07:00
Andrey Lushnikov
b3027a6e16
test(page): make sure exposeFunction works with complex args (#4411) 2019-05-09 18:02:46 -07:00
Joel Einbinder
1516e0df21 feat(workers): create workers from service workers and shared workers (#4397)
This allows users to easily evaluate javascript inside service workers and shared workers by creating a Worker object for them.
2019-05-09 17:29:18 -07:00
Andrey Lushnikov
ef24c69c62
fix(tracing): start without options (#4388) 2019-05-09 17:15:33 -07:00
Tony Brix
511dcf9d32 feat(browser): Add browser.isConnected() (#4403)
Add `browser.isConnected()` to the public api to be able to tell when the browser is connected

fixes https://github.com/smooth-code/jest-puppeteer/pull/237#issuecomment-490260041
2019-05-09 16:24:52 -07:00
Andrey Lushnikov
13f73b5b3a
feat(chromium): roll Chromium to r656675 (#4389)
This roll includes:
- https://chromium-review.googlesource.com/c/v8/v8/+/1569425 - [debug] Introduce GetCreationContext to debug API

Fix #4263
2019-05-06 00:22:18 -07:00
Andrey Lushnikov
1de9906260
test: add cookie tests (#4365) 2019-04-30 00:35:41 -07:00
Andrey Lushnikov
27c9f754b1
fix(page): teach page.setContent to work with tricky content (#4366)
Fix #4364
2019-04-30 00:35:05 -07:00
Andrey Lushnikov
e2e6b88934
feat(chromium): roll Chromium to r654752 (#4358)
This roll includes:
- https://crrev.com/653809 - FrameLoader: ignore failing provisional loads entirely
- https://crrev.com/654750 - DevTools: make sure Network.requestWillBeSent is emitted on time for sync xhrs

The FrameLoader patch is the reason behind the test change. It's
actually desirable to fail frame navigation if the frame detaches - and
that's consistent with Firefox.

Fixes #4337
2019-04-28 20:19:01 -07:00
Andrey Lushnikov
f3db28c94b
test: add failing test for request interception with sync XHRs (#4350)
`Network.requestWillBeSent` is not issued for the redirect inside
sync XHRs.

References #4337.
2019-04-26 16:28:15 -07:00
Andrey Lushnikov
770411be9d
test: verify overriding postdata and method on navigation (#4317)
References #4309
2019-04-19 18:22:30 -07:00
Andrey Lushnikov
e3abb0aa32
feat(puppeteer): introduce puppeteer.errors and puppeteer.devices (#4312)
These getters are introduced as a more convenient substitute for
a `require('puppeteer/Errors')` and
`require('puppeteer/DeviceDescriptors')`.

This way we can make cross-browser story nicer - a single require
of `puppeteer` or `puppeteer-firefox` fully defines Puppeteer
environment.
2019-04-19 15:33:06 -07:00
Darío Kondratiuk
dde55b0257 test: Make intervention test Edge friendly (#4314)
All tests are green when running against [Microsoft Edge Insider](https://www.microsoftedgeinsider.com/en-us/), except this test.

Edge returns `https://to-be-replaced.invalid/feature/5718547946799104` instead of `https://www.chromestatus.com/feature/5718547946799104`

I think that checking for `feature/5718547946799104` is a small test and will do the job for both browsers.

```
$env:CHROME = "C:\Program Files (x86)\Microsoft\Edge Dev\Application\msedge.exe"; node
.\test.js
```
2019-04-19 11:29:29 -07:00
Andrey Lushnikov
0c4d53b293
test: add a test for queryObjects with navigation (#4303)
References #4263
2019-04-18 10:03:06 -07:00
Andrey Lushnikov
a8ffdad76e
feat(chromium): roll Chromium to r650583 (#4284)
This roll includes:
- https://crrev.com/650583 - DevTools: fix DOM.getContentQuads for a
  corner case

Fixes #4281.
2019-04-13 00:28:58 -07:00
Andrey Lushnikov
145e8680b1
test: add failing test for clicking certain elements (#4282)
References #4281
2019-04-13 00:10:48 -04:00
Andrey Lushnikov
8f8e77492d
test: split out request interception tests (#4278) 2019-04-11 21:33:01 -04:00
Andrey Lushnikov
5ee21d97e7
fix(page): intersect content quads with viewport (#4277)
In certain cases inline element children might be positioned
outside of viewport.

In this case, we should intersect all content quads with viewport
before we pick one to click into.

Fixes #4274.
2019-04-11 21:11:20 -04:00
Andrey Lushnikov
20988775bf
fix: gracefully handle multiple contexts for secondary DOM World (#4276)
In case of multiple sessions to the same target, there's a race between
sessions to create a secondary isolated world. As a result, we might
end up having 2 execution contexts created for the needs of the
secondary isolated world.

This patch starts handling this race gracefully: instead of crashing,
we can use either of the execution contexts and ignore the rest.

Notably, the same race condition might happen if page reloads itself
in-between the calls to `page.addEvaluateOnNewDocument` and
`page.createIsolatedWorld`.

Fixes #4197.
2019-04-11 16:26:18 -04:00
Andrey Lushnikov
19606a3b79
fix: cache disabling should stick when toggling request interception (#4260)
This patch:
- refactors `NetworkManager`/`FrameManager` so that they enable all the
relevant domains themselves. This is a preparation for OOPIF support and
migration onto fetch domain.
- moves `networkManager` ownership into `FrameManager`. This way it's clear who owns what.
- stops enabling Security domain: it saves quite some traffic over
websocket since it no longer sends annoying "SecurityStateChanged" events.
Instead, use `Security.setIgnoreCertificateErrors` method.
- consolidates network cache state in network manager. This even fixes a
bug with caching and request interception interop.
2019-04-10 00:42:42 -04:00
Joseph Arhar
fd0f58e9c2 fix: Use new requestId for interception request matching (#4248)
Fix #3471
2019-04-08 14:17:57 -07:00
Andrey Lushnikov
9d31068225
feat(chromium): roll Chromium to r648643 (#4256)
This roll includes:
- https://crrev.com/648335 -
[DevTools] Send DevTools request ID through URLLoader
- https://crrev.com/648360 -
[DevTools] Add renderer request ID to requestIntercepted

References #3471
2019-04-08 12:11:35 -07:00
Darío Kondratiuk
72866e9467 test: Change cookies unsecure test title (#4187)
I think we wanted to say "HTTP Website" there.
2019-03-20 11:36:27 -07:00
Andrey Lushnikov
60567575d2
test: make sure frames are reported from-inside shadow DOM (#4167)
References #4163.
2019-03-15 21:01:36 -07:00
Vse Mozhet Byt
854b1c0912 feat(executioncontext): support bigints transferring (#4016)
Refs: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UnserializableValue
2019-03-15 10:20:48 -07:00
Andrey Lushnikov
3511a35fa4
test: fix fixtures test when run with env DUMPIO=1 (#4123)
The DUMPIO env variable is propagated to a spawned process
and results in unfortunate stdout.
2019-03-13 16:26:28 -07:00
Andrey Lushnikov
6474b3ffe0
test: ensure Page.setBypassCSP works with iFrames (#4155) 2019-03-11 17:56:32 -07:00
Andrey Lushnikov
42351c7fe5
feat(firefox): Implement header overrides in request interception (#4142)
This patch makes sure header overrides in request interception are
functioning as expected.

Drive-by: teach test server to use utf-8 charset header for text files.
2019-03-08 14:26:13 -08:00
Darío Kondratiuk
5d6535ca0c test: Fix should fire for fetches test (#4139)
The code in "should fire for fetches" was copy of "should fire for iframes"
I bet the test was supposed to use a fetch there.
2019-03-08 08:59:07 -08:00
Andrey Lushnikov
87a8d744e6
test: add a failing test that tries to click a fixed button in an iframe (#4130)
References #4110
2019-03-06 18:46:40 -08:00
Andrey Lushnikov
1623bef264
test: improve test coverage for Request.continue (#4096)
Drive-by: add clarification to docs/api.md regarding
chaning "URL".

References #4030
2019-03-05 14:57:15 -08:00
Joel Einbinder
f32d77e074 test: check if the executable path is an exact match (#4117)
References #4102
2019-03-04 23:46:14 -08:00
Joel Einbinder
ba5f94d2b0 test: disable flaky cookies test (#4112)
References #4111
2019-03-04 18:18:54 -08:00
Andrey Lushnikov
9db09fe7e9
test: add test to validate redirecting in request.respond (#4106) 2019-03-04 17:16:04 -08:00
Andrey Lushnikov
c68df320f8
test: add failing test for bad request interception (#4108)
References #3973
2019-03-04 17:09:23 -08:00
Joel Einbinder
a6d8ecce6f fix(firefox): keyboard tests (#4082) 2019-02-27 15:13:17 -08:00
Andrey Lushnikov
e8a49633d9
test: cleanup tests (#4078)
- move Connection test into CDPSession.spec.js
- remove a nasty test that was reaching into implementation details
2019-02-26 20:36:55 -08:00
Andrey Lushnikov
9ef23b1754
feat(firefox): implement cookies api (#4076)
This patch implements `page.setCookie()`, `page.deleteCookie()` and
`page.cookies()` and doubles the test coverage for cookies so that
we can feel safer on cross-browser compatibility.
2019-02-26 16:24:30 -08:00
Joel Einbinder
03d06f54d6 feat(firefox): page.accessibility.snapshot() (#4071) 2019-02-25 21:57:33 -08:00
Andrey Lushnikov
f21486fa1b
feat(firefox): implement Page.touchscreen (#4070) 2019-02-25 15:36:38 -08:00
Andrey Lushnikov
3541b894f5
test: split out all chromium-specific tests into chromiumonly.spec.js (#4068) 2019-02-25 12:51:06 -08:00
Andrey Lushnikov
77a4ea505e
test: split out fixture tests and make them work with FF (#4067)
Drive-By: give Puppeteer-Firefox its own copy of DeviceDescriptors.
2019-02-25 12:40:17 -08:00
Andrey Lushnikov
4ecbd91e4b
refactor(firefox): migrate onto ExecutionContext events (#4064)
Juggler now has Runtime domain that emits Execution Context events
"ExecutionContextCreated" and "ExecutionContextDestroyed".
2019-02-24 23:07:24 -08:00
Andrey Lushnikov
56dafd7424
feat: support Response.buffer(), Response.json() and Response.text() (#4063)
This patch:
- implements Response.buffer() and other methods
- splits out relevant tests into a separate test suites
- implements `testServer.enableGzip()` method to optionally gzip
  certain routes in tests
- adds tests to make sure `Response.text()` returns expected results
  for binary and compressed responses.
2019-02-24 19:31:35 -08:00
Andrey Lushnikov
3bea5d6017
feat(firefox): implement browserContext.overridePermissions (#4060) 2019-02-22 23:59:32 -08:00
Andrey Lushnikov
f1a14fec5b
feat(firefox): support elementHandle.uploadFile (#4058)
Fixes #3762
2019-02-22 17:22:46 -08:00
Andrey Lushnikov
1315dc8234
feat(firefox): support Page.emualteMedia (#4056) 2019-02-22 14:04:40 -08:00
Andrey Lushnikov
5c818368a5
feat(firefox): implement page.exposeFunction (#4052) 2019-02-22 00:04:25 -08:00
Andrey Lushnikov
7d39aca93c
test: split out test for "text" option of ElementHandle.press (#4051) 2019-02-21 15:56:53 -08:00
Andrey Lushnikov
ed984ac479
chore(firefox): kill original puppeteer-firefox tests (#4047)
When we started working on Puppeteer-Firefox, we forked original
Puppeteer testsuite.

This patch concludes the effort to merge testsuites back together.

Fixes #3889
2019-02-21 13:10:15 -08:00
Andrey Lushnikov
fbf91cca98
test(firefox): move AX tests to Chrome-only (#4042)
Let's not focus on AX for now for Firefox.
2019-02-21 10:07:13 -08:00
Andrey Lushnikov
a0fd2ce3fd
fix(firefox): enable more tests (#4037)
Further align Puppeteer-Firefox implementation with Puppeteer to
pass more tests.
2019-02-19 22:36:02 -08:00
Andrey Lushnikov
03c542a6c1
feat(firefox): implement missing launcher options (#4036)
This patch implements `puppeteer.defaultArgs()` and also missing
options, such as `ignoreDefaultArgs`.
2019-02-19 22:08:09 -08:00
Andrey Lushnikov
719ee5af3d
feat(firefox): support page.setExtraHTTPHeaders (#4035) 2019-02-19 15:22:12 -08:00
Andrey Lushnikov
c118b208fa
feat(firefox): basic request interception support (#4034)
This patch implements `page.setRequestInterception`, `page.continue`
and `page.abort` methods.
2019-02-19 14:51:56 -08:00
Andrey Lushnikov
3b180923a6
refactor(firefox): migrate onto Juggler flatten protocol (#4033)
Juggler now implements the same "flatten" protocol as CDP.
This patch:

* copies `Connection.js` from original Puppeteer (with a few renames, e.g. `CDPSesssion` -> `JugglerSession`).
* migrates code to support protocol-level sessions
2019-02-19 13:20:39 -08:00
Andrey Lushnikov
4a4793a5e1
feat(firefox): support Browser.target() (#4028)
Support browser target.

Drive-by: switch over to a more devtools'ish protocol:

- use `targetId` instead of `pageId` everywhere
- use target events instead of tab events
2019-02-17 10:23:48 -08:00
Andrey Lushnikov
ea482c4751
fix(firefox): properly cleanup networkmanager (#4024) 2019-02-15 23:34:01 -08:00
Andrey Lushnikov
9782f9c827
fix(firefox): add test to make sure remote browser can be closed (#4023) 2019-02-15 18:26:14 -08:00
Andrey Lushnikov
c35821a1a1
feat(firefox): switch over to WebSocket and support multiclient (#4022)
- switch transport from TCP to WS (yay!)
- implemenet `puppeter.connect()`, `browser.disconnect()`, `'disconnected'`
event and `browser.wsEndpoint()`
2019-02-15 17:57:48 -08:00
Andrey Lushnikov
e0d4a5d2ec
fix(firefox): track frame detachment in navigation watchdog (#4008) 2019-02-14 00:06:30 -08:00
Andrey Lushnikov
247733b879
fix(firefox): enable more firefox tests (#4007) 2019-02-13 23:59:38 -08:00
Andrey Lushnikov
e8f044c3be
fix(firefox): enable a bunch of evaluation tests (#4006) 2019-02-13 23:41:53 -08:00
Andrey Lushnikov
6350cf0892
fix(firefox): report more console messages (including warnings) (#4005) 2019-02-13 23:22:45 -08:00
Andrey Lushnikov
0b40d04b99
feat(firefox): support running beforeunload hooks when closing (#4003) 2019-02-13 22:16:12 -08:00
Andrey Lushnikov
e3b76b2beb
feat(firefox): support consoleMessage.location() (#4002) 2019-02-13 19:56:56 -08:00
Andrey Lushnikov
2275c3c0c8
fix(firefox): properly round clip when doing element screenshots (#4001)
Do clipping the same way we do it in Chromium.
2019-02-13 19:47:14 -08:00
Andrey Lushnikov
670d758dfe
feat(firefox): support "referer" option in Page.goto (#4000) 2019-02-13 13:49:05 -08:00
Andrey Lushnikov
fbf36438e8
feat(firefox): support Request.postData (#3999) 2019-02-13 13:11:50 -08:00
Andrey Lushnikov
13224a761e
feat(firefox): support Response.securityDetails() (#3997) 2019-02-13 11:56:51 -08:00
Andrey Lushnikov
57e7f12fbc
test: split out tests for security details (#3996)
This adds missing test coverage for security details and
re-generates our self-signed ceritificate to have meaningful
issuer and subject name.
2019-02-13 11:35:49 -08:00
Andrey Lushnikov
31ae1d6d15
feat(firefox) support Request.headers() & Response.headers() (#3993) 2019-02-13 00:55:56 -08:00
Andrey Lushnikov
89d0f1e1e7
feat(firefox): implement frame.goto / frame.waitForNavigation (#3992)
Some corner cases regarding iframes being detached during navigation
are not yet supported.
2019-02-12 20:10:53 -08:00
Andrey Lushnikov
f0fba56ea3
test: split out Response.fromCache/fromServiceWorker (#3990) 2019-02-12 19:59:54 -08:00
Andrey Lushnikov
1890dc04ba
feat(firefox): Page.waitForRequest/Page.waitForResponse (#3989)
Drive-by: refactor `Request.frame()` tests into a separate test suite.
2019-02-12 19:10:14 -08:00
Andrey Lushnikov
afb9355b15
feat(firefox): basic support for Network (#3988)
This patch introduces basic Request and Response events for
page. It also teaches navigation methods, e.g. `page.goto` to return
navigation response.
2019-02-12 17:38:48 -08:00
Joel Einbinder
fb9d4049d8 test(mouse): add failing for test for mobile + cross process navigation (#3951) 2019-02-11 14:00:06 -08:00
Andrey Lushnikov
b82cc150d1
feat(firefox): support Page.setJavascriptEnabled (#3970)
This patch implements:
- Page.setJavascriptEnabled
- Page.setCacheEnabled
2019-02-08 20:57:16 -08:00
Andrey Lushnikov
edb6f62824
feat(firefox): support page.setDefaultNavigationTimeout (#3969)
This patch supports:
- page.setDefaultNavigationTimeout
- page.setDefaultTimeout
2019-02-08 20:37:14 -08:00
Andrey Lushnikov
fc18a79e99
feat(firefox): support Page.setUserAgent method (#3968) 2019-02-08 19:53:27 -08:00
Andrey Lushnikov
1ce578b787
chore(test): remove the server.EMPTY_PAGE2 asset (#3967)
Firefox used to have a bug that prevented adding iframes with the
same URL as main frame. In this case, we used the EMPTY_PAGE2
so that it doesn't clash with top-level EMPTY_PAGE.

The bug seems to be fixed after we rolled onto a fresh Firefox;
there's no more need for this test asset.
2019-02-08 19:24:40 -08:00
Andrey Lushnikov
cfefd611b8
feat(firefox): support target.opener() and page.on('popup') (#3966) 2019-02-08 19:21:54 -08:00
Andrey Lushnikov
0cf6ab68e7
feat(firefox): support page.browserContext() (#3965) 2019-02-08 18:58:40 -08:00
Andrey Lushnikov
a9875359aa
feat(firefox): implement execution contexts (#3962) 2019-02-08 17:15:52 -08:00
Andrey Lushnikov
0bb657cb26
chore(test): remove --firefox-status flag from tests (#3956)
The [IsPuppeteerFirefoxReady?](https://aslushnikov.github.io/ispuppeteerfirefoxready/)
website now has its own script to compute test and api coverage.
2019-02-08 13:29:13 -08:00
Andrey Lushnikov
6b18e8cef5
feat(firefox): introduce async stacks for Puppeteer-Firefox (#3948)
This patch refactors Puppeteer-Firefox code to declare public
API in `/lib/api.js` and use it to setup async stack hooks
over the public API method calls.
2019-02-07 15:18:43 -08:00
Andrey Lushnikov
addd7f4c6a
chore(testrunner): introduce verbose mode (#3946) 2019-02-07 13:17:29 -08:00
Andrey Lushnikov
76eecde823
chore(test): remove stray console.log (#3943) 2019-02-07 08:14:05 -08:00
Andrey Lushnikov
609e763381
test(firefox): enable screenshot tests for Firefox (#3942)
References #3889
2019-02-07 07:59:14 -08:00
Andrey Lushnikov
49e8704ba8
test(firefox): enable more tests on Puppeteer-Firefox (#3937)
References #3889
2019-02-07 07:15:19 -08:00
Andrey Lushnikov
6887ad881a
chore: further unify Puppeteer-Firefox tests with Puppeteer (#3931)
This patch:
* unifies assets between tests
* enables a few puppeteer tests on Puppeteer-Firefox

Drive-by: beautify failing output of `expect.toEqual` matcher.

References #3889
2019-02-06 13:49:14 -08:00
Andrey Lushnikov
14fb3e38db
chore(firefox): mark all Puppeteer tests that are failing on FF (#3924)
This patch:
- introduces new testRunner methods `addTestDSL` and `addSuiteDSL`
  to add annotated test / suite.
- introduces new test/suite declaration methods: `it_fails_ffox` and
  `describe_fails_ffox`. These are equal to `it`/`describe` for chromium
  tests and to `xit`/`xdescribe` for firefox.
- marks all unsupported tests with `it_fails_ffox`
- adds a new command-line flag `'--firefox-status'` to `//test/test.js`.
  This flag dumps current amount of tests that are intentionally skipped
  for Firefox.

End goal: get rid of all `it_fails_ffox` and `describe_fails_ffox`
tests.

Drive-By: remove cookie tests  "afterEach" hook that was removing
cookies - it's not needed any more since every test is run in a
designated browser context.

References #3889
2019-02-05 22:32:41 -08:00
Andrey Lushnikov
86783c2495
chore(firefox): run all tests without "UnhandledPromiseRejection" error (#3922)
This aligns all Puppeteer tests so that they never throw the
"UnhandledPromiseRejection" when run with Puppeteer-Firefox.

With this patch, the `npm run funit` passes 275 of 460 Puppeteer tests.

References #3889.
2019-02-05 19:49:47 -08:00
Andrey Lushnikov
a210dd7ee2
chore(testrunner): show 5 slowest tests on CI (#3919)
Show top slowest tests on CI.

Drive-by: some facelifting for the test reporter.
2019-02-05 15:28:35 -08:00
Andrey Lushnikov
00bcecbf72
chore: increase test timeout to 20 seconds on Appveyour (#3918)
Looks like Appveyour is indeed slow; try giving it more time
to run tests.

Drive-by: support TIMEOUT env variable for Puppeteer tests.
2019-02-05 13:38:56 -08:00
Andrey Lushnikov
28087c291f
feat(firefox): support ElementHandle.contentFrame() (#3917) 2019-02-05 13:29:49 -08:00
Andrey Lushnikov
dd8bd6dcb1
test(firefox): support Puppeteer-Firefox specific env variables (#3907)
This patch:
- adds support to `FFOX` env variable for Puppeteer testsuite
- install Firefox preferences when running tests with custom firefox
  executable

References #3889
2019-02-05 13:17:02 -08:00
Andrey Lushnikov
69c434af75
test(firefox): further unify Puppeteer-Firefox and Puppeteer tests (#3894)
This patch:
- changes Puppeteer-Firefox plumbing of defaultBrowserOptions to align
  with the way we do it for Puppeteer.
- plumbs puppeeteer-dependent Errors and DeviceDescriptors down to every
  test.
- unifies a few tests between Puppeteer-Firefox and Puppeteer.

**Note:** in future, we should expose errors as `puppeteer.errors` and
device descriptors as `puppeteer.devices` to make it easy to pass around
Puppeteer/Puppeteer-Firefox instance.

References #3889.
2019-02-02 18:49:12 -07:00
Andrey Lushnikov
47fbb117f5
test(firefox): add more Puppeteer-Firefox tests to Puppeteer (#3892)
References #3889
2019-02-02 12:55:15 -07:00
Andrey Lushnikov
b5e53fdbf4
test(firefox): add puppeteer-firefox unique evaluation tests (#3891)
References #3889
2019-02-01 18:40:40 -08:00
Andrey Lushnikov
6bb0350b4d
test(firefox): introduce vendor-specific specs (#3890)
Certain Puppeteer methods do expose the inner browser - e.g.
`browser.version()` depends on the browser we run.

Split out these tests into a vendor-specific test suites.

References #3889
2019-02-01 17:55:12 -08:00
Andrey Lushnikov
84fe6014e9
chore(firefox): run Puppeteer-Firefox against Puppeteer tests (#3888)
Introduce a `npm run funit` script that runs puppeteer tests
against Puppeteer-Firefox.

Next steps:
- bring Puppeteer-Firefox unique tests to Puppeteer
- skip failing tests and run Puppeteer-Firefox on CI
- work through tests to pass them all with Puppeteer-Firefox
2019-02-01 17:04:19 -08:00
Andrey Lushnikov
a2f1e2774a
fix: ignore console messages from destroyed execution contexts (#3866)
Fix #3865
2019-01-30 16:19:02 -08:00
Andrey Lushnikov
a064a6341b
feat(page): introduce page.setDefaultTimeout (#3854)
Method `page.setDefaultTimeout` overrides default 30 seconds timeout
for all `page.waitFor*` methods, including navigation and waiting
for selectors.

Fix #3319.
2019-01-28 17:16:12 -08:00
Andrey Lushnikov
55432f88e9
fix(page): execute frame.waitFor{Selector,XPath} in secondary world (#3856)
This patch starts executing frame.waitForSelector and frame.waitForXPath
in secondary world. As a result, websites that mutate page global
context (e.g. removing global MutationObserver) don't break Puppeteer's
behavior.

Fixes #609
2019-01-28 12:24:27 -08:00
Andrey Lushnikov
2061dd4718
fix(page): teach waitForSelector to return null (#3846)
`page.waitForSelector` should return `null` if waiting for `hidden:
true` and there's no matching node in DOM.

Before this patch, `page.waitForSelector` would return some JSHandle
pointing to boolean value.
2019-01-28 14:24:53 -05:00
Andrey Lushnikov
62da2366c6
chore: introduce //lib/api.js (#3835)
Introduce `//lib/api.js` that declares a list of publicly exposed
classes.

The `//lib/api.js` list superceedes dynamic `helper.tracePublicAPI()` calls
and is used in the following places:
- [ASYNC STACKS]: generate "async stacks" for publicy exposed API in `//index.js`
- [COVERAGE]: move coverage support from `//lib/helper` to `//test/utils`
- [DOCLINT]: get rid of 'exluded classes' hardcoded list

This will help us to re-use our coverage and doclint infrastructure
for Puppeteer-Firefox.

Drive-By: it turns out we didn't run coverage for `SecurityDetails`
class, so we lack coverage for a few methods there. These are excluded
for now, sanity tests will be added in a follow-up.
2019-01-25 23:21:14 -05:00
Andrey Lushnikov
1a7995558f
chore(test): prepare tests to be run with Puppeteer-Firefox (#3833)
This patch aligns Puppeteer testing infrastructure with the approach
we use in Puppeteer-Firefox.

This patch:
- makes all tests accept Puppeteer object as a function argument
  rather than require it statically. This way we can pass either
  Puppeteer or Puppeteer-Firefox to drive tests.
- renames the `puppeteer.spec.js` into `launcher.spec.js`. The
  `puppeteer.spec.js` is now the entry point for all cross-browsers
  tests.
2019-01-24 01:04:42 -05:00
Andrey Lushnikov
fb710120e9
feat(page): use secondary world to drive clicks (#3828)
References #2671
2019-01-22 23:24:14 -05:00
Andrey Lushnikov
678b8e85ad
fix(page): use secondary DOMWorld to drive page.select() (#3809)
This patch starts creating secondary DOMWorld for every connected
page and switches `page.select()` to run inside the secondary world.

Fix #3327.
2019-01-22 17:55:33 -05:00
Linus Unnebäck
9fb89e1bbc test: Add test for waitForFunction with cross-process navigation (#3826) 2019-01-22 13:21:18 -05:00
Andrey Lushnikov
9fd4b67d0c
fix(requestinterception): filter out "intervention" header (#3814)
Fixes #3798
2019-01-20 00:02:13 -05:00
Andrey Lushnikov
489be90c75
test: move tracing tests to one-per-browser (#3781)
Tracing is working on a per-browser level, not per-page. In order
to paralellize these tests effectively and properly, each should run
a designated browser.
2019-01-15 16:39:30 -08:00
Joel Einbinder
91c4501cc6 test(coverage): add failing test for skipping all debugger statements (#3779) 2019-01-15 14:49:57 -08:00
Joel Einbinder
4e1e2fb701 fix(screenshot): round the clip dimensions (#3778) 2019-01-15 14:34:31 -08:00
Andrey Lushnikov
04fbbd7cf0
fix(network): relax request matching heuristic (#3775)
Drop requirement for matching "origin" and "content-type" headers
in requests and request interceptions. This way javascript redirects
that use form submission start working.

Fix #3684.
2019-01-15 11:37:53 -08:00
Andrey Lushnikov
9083c111ca
fix(frames): make sure evaluation does not hang in detached iframes (#3770)
Fix #3261
2019-01-14 17:23:53 -08:00
Brian Schiller
7fabf32172 feat(executioncontext): warn on nested js handle (#3591)
ExecutionContext.evaluateHandle accepts arguments that are either
serializable, or JSHandles. A potential confusion is that it *does not*
accept arguments that *contain* JSHandles.

This patch adds a log message warning when it encounters that situation.

Fixes #3562
2019-01-14 14:30:50 -08:00
Andrey Lushnikov
d346cb57b4
chore: cleanup puppeteer.connect({browserURL}) (#3766)
This patch:
- renames `browserUrl` into `browserURL`
- cleans up some code
- adds tests for error handling

References #3537
2019-01-14 14:30:03 -08:00
Łukasz Fiszer
15af75f9a2 feat(launcher): add browserUrl option to puppeteer.connect (#3558)
The `browserURL` option allows to connect to a browser that exposed it's remote debugging protocol on a known port.

Fixes #3537
2019-01-14 13:23:34 -08:00
Joel Einbinder
96adedf54f fix(screenshots): throw on 0x0 screenshots (#3756)
Fix #2672
2019-01-11 15:24:43 -08:00
Andrey Lushnikov
0505c81b52
test: add test for multiline waittask (#3753)
References #3723
2019-01-10 21:41:09 -08:00
Andrey Lushnikov
89fc2adff5
fix(page): consoleMessage.location() should work with workers (#3752)
This patch:
- refactors consoleMessage.location() implementation to
make it work for workers
- re-writes tests to avoid 5 second delay
2019-01-10 18:05:28 -08:00
Tom P
0c867631b0 feat(page): introduce consoleMessage.location() (#3365)
This patch adds a new consoleMessage.location() method that returns console message origins.

Fixes #3029
2019-01-10 16:51:13 -08:00
Andrey Lushnikov
16fc28bf06
test: make sure headful browser closes with beforeuload page (#3751)
This was fixed upstream at https://crrev.com/618425

Fixes #3673
2019-01-10 14:05:43 -08:00
Andrey Lushnikov
1899e7931c
feat: enable Network Service by default (#3738)
References #3471.
2019-01-09 15:47:08 -08:00
Andrey Lushnikov
3d82465f66
fix(page): fix repetitative setContent calls (#3666)
Fix #3665.
2018-12-13 13:33:42 -08:00
Andrey Lushnikov
8aaca4eb1e
feat(page): introduce "Popup" event (#3661)
This patch adds a new "popup" event for page.
"Popup" event is fired whenever page opens another page with
given opener.
2018-12-12 17:09:42 -08:00
Andrey Lushnikov
c90392bdf5
feat: introduce page.browserContext() (#3655) 2018-12-12 15:08:31 -08:00
Andrey Lushnikov
6656519560
test: split out dialog tests (#3586) 2018-11-20 20:18:57 -08:00
Andrey Lushnikov
309cbe625f
test: split out navigation tests (#3585) 2018-11-20 20:09:25 -08:00
Andrey Lushnikov
d61916b53e
test: split out evaluation tests (#3584) 2018-11-20 19:59:59 -08:00
Andrey Lushnikov
e83918987a
test: split input tests into keyboard, mouse and touchscreen (#3583) 2018-11-20 19:43:07 -08:00
Andrey Lushnikov
25f4f26851
test: extract clicking tests (#3582) 2018-11-20 19:34:57 -08:00
Andrey Lushnikov
a181bdde31
test: split out emulation tests (#3581) 2018-11-20 19:17:56 -08:00
Andrey Lushnikov
a5b1978190
test: split out waittask tests (#3580) 2018-11-20 18:57:28 -08:00
Andrey Lushnikov
e5830d1199
test: split queryselector tests into separate file (#3579) 2018-11-20 18:45:37 -08:00
Andrey Lushnikov
aa9fb82f14
test: split screenshot tests into separate file (#3578) 2018-11-20 18:32:42 -08:00
Andrey Lushnikov
927d0f443b
feat(page): support waitUntil option for page.setContent (#3557)
This patch teaches `page.setContent` to await resources in
the new document.

**NOTE**: This patch changes behavior: currently, `page.setContent`
awaits the `"domcontentloaded"` event; with this patch, we can now await
other lifecycle events, and switched default to the `"load"` event.

The change is justified since current behavior made `page.setContent`
unusable for its main designated usecases, pushing our client
to use [dataURL workaround](https://github.com/GoogleChrome/puppeteer/issues/728#issuecomment-334301491).

Fixes #728
2018-11-20 15:32:46 -08:00
Andrey Lushnikov
e2e43bc23d
fix(page): navigating 11 pages simultaneously should not throw warning (#3560)
NavigatorWatcher subscribes to Connection to get a `Disconnected` event,
causing us to hit the default max of 10 listeners constraint.

Technically we don't leak anything here and can safely bump
the maxListenersCount to Infinity.

However, we conveniently have `CDPSession`, and
can re-dispatch the event on it and keep the safety check in place.
2018-11-20 14:21:13 -08:00
Darío Kondratiuk
03d8746260 test(accessibility): Fix duplicated test (#3539) 2018-11-15 14:57:07 -08:00
Andrey Lushnikov
95a19c74bc
fix(page): dispatch errors into page (#3550)
Errors thrown on the node side of the `page.exposeFunction` callback
should be dispatched into the page.

Fixes #3549
2018-11-15 14:51:34 -08:00
Andrey Lushnikov
eb7bd9d7d3
test: setup sandbox on linux (#3530)
Drop all the `--no-sandbox` bits from tests and infrastructure. Instead, configure
Travis to enable user namespace clone.
2018-11-12 23:26:16 -08:00
Andrey Lushnikov
27ea226bbc
test: fix workers test (#3527) 2018-11-09 18:44:53 -08:00
Darío Kondratiuk
b9f2104f43 test(cookies): Remove duplicated test. (#3492)
We have the same test on line 130 https://github.com/GoogleChrome/puppeteer/blob/v1.10.0/test/cookies.spec.js#L130
2018-11-04 11:48:31 -08:00
Andrey Lushnikov
6b65407ab6
test: unflake cookie test on windows (#3489) 2018-11-02 13:23:44 -07:00
Joel Einbinder
9ba3261571 feat(accessibility): snapshot the accessibility tree (#3470)
This adds `page.accessibility.snapshot()`. It serializes and returns the accessibility tree for the page. By default, uninteresting nodes are filtered out of the snapshot.

fixes #2033
2018-11-01 18:54:51 -07:00
Andrey Lushnikov
eca3c6bed2
test(cookies): cookies from headful now work in headless (#3481)
This patch enables cookie test. The actual upstream patch
that fixed the issue:
- https://crrev.com/599696 - Headless: support cookie encryption

Fixes #921.
2018-11-01 18:51:56 -07:00
Andrey Lushnikov
3596c5f7e2
fix(page.evaluate): better function serialization (#3480)
References #1665
2018-11-01 16:43:21 -07:00
Andrey Lushnikov
3dd5c28f90
fix(pipe): dispatch "disconnected" event when browser is terminated (#3472) 2018-10-31 16:31:29 -07:00
Zeev Rosental
81edbbb58e fix(clicking): handle negative area results in computeQuadArea (#3413)
This patch fixes a case in which computeQuadArea calculates the area size correctly, but returns the area as a negative number.
This occurs when DOM.getContentQuads returns quads in a specific order.

E.g. the array: [ { x: 463, y: 68.5 },{ x: 437, y: 68.5 },{ x: 437, y: 94.5 },{ x: 463, y: 94.5 } ] will receive area size of -676.
2018-10-25 11:41:37 -07:00
Joel Einbinder
d025d1f959 fix(csscoverage): don't prematurely disable the CSS domain (#3418)
CSS stylesheets can still be parsed and added events emitted during the CSS.stopRuleUsageTracking call. It needs to be awaited before calling CSS.disable, otherwise the text content of those style sheets will be unavailable.
2018-10-16 16:55:17 -07:00
Joel Einbinder
0fd3bfb986 test(CSSCoverage): failing test when a stylesheet was recently added (#3400)
If nobody forces a layout, CSS coverage is inconsistent. This causes some flakes on the bots. The test in this PR fails 90% of the time on my local machine.
2018-10-12 13:49:59 -07:00
Joel Einbinder
6ac66c3547 feat: browser.waitForTarget (#3356)
This adds `browser.waitForTarget` and `browserContext.waitForTarget`. It also fixes a flaky test that was incorrectly expecting targets to appear instantly.
2018-10-09 14:16:53 -07:00
Andrey Lushnikov
8becb31754
test: add failing test for page.select (#3346)
References #3327.
2018-10-04 10:41:38 -07:00
Łukasz Usarz
842fee860b fix(page): full page screenshot when defaultViewport is null (#3306)
Fixes #3104
2018-09-27 10:50:21 -07:00
Andrey Lushnikov
85aca8e1a5
chore(testserver): prepare test server (#3294) 2018-09-24 12:46:39 -07:00
Andrey Lushnikov
4e48dfc7a1
feat(launcher): add experimental "transport" option to pptr.connect (#3265)
This patch:
- adds experimental "transport" option to pptr.connect
- uses "transport" option to make sure Puppeteer-Web works with
  Target.exposeDevToolsProtocol

Drive-by: add `browser.target()` to access browser target.
2018-09-20 11:55:23 -07:00
Andrey Lushnikov
5acf953104
feat(frame): introduce Frame.goto and Frame.waitForNavigation (#3276)
This patch introduces API to manage frame navigations.
As a drive-by, the `response.frame()` method is added as a shortcut
for `response.request().frame()`.

Fixes #2918.
2018-09-20 11:31:19 -07:00
Andrey Lushnikov
0b9d8a6271
feat: async stacks for all "async" public methods (#3262)
This patch traces all public async methods and wraps them
in a helper method that tags the sync stack trace.

Later on, if the method call throws an exception, we add
a captured stack trace to the original stack trace with the "--ASYNC--"
heading.

An example of a stack trace:

```
Error: net::ERR_ABORTED at http://localhost:8907/empty.html
    at navigate (/Users/lushnikov/prog/puppeteer/lib/Page.js:622:37)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  -- ASYNC --
    at Page.<anonymous> (/Users/lushnikov/prog/puppeteer/lib/helper.js:147:27)
    at fit (/Users/lushnikov/prog/puppeteer/test/page.spec.js:546:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)
```
2018-09-19 13:54:58 -07:00
Andrey Lushnikov
a1a211d9e7
chore: nicer stack highlight (#3259)
Highlight part of the stack that points to where the actual
test failure happened.
2018-09-17 23:22:53 +01:00
Andrey Lushnikov
d547b9d24a
fix(browser): browser closing/disconnecting should abort navigations (#3245)
Fixes #2721.
2018-09-14 19:44:54 +01:00
Łukasz Usarz
d929f7e213 fix: set JPG background to white when omitBackground option is used (#3240)
Fixes #3234
2018-09-14 11:03:33 +01:00
Andrey Lushnikov
c644a3bbd3
test: make sure zero-width screenshots don't hang (#3214)
References #2672.
2018-09-11 19:07:57 +01:00
Andrey Lushnikov
d54c7edeae
fix(page): Page.goto should properly handle historyAPI in beforeunload (#3198)
Fixes #2764.
2018-09-05 22:59:29 +01:00
Andrey Lushnikov
7f9e276733
feat(network): introduce Response.statusText() (#3193)
Fixes #317.
2018-09-05 21:03:24 +01:00
Andrey Lushnikov
1ba2b8540d
feat(network): introduce Response.remoteAddress() (#3192)
Closes #2171.
2018-09-04 20:39:59 +01:00
Andrey Lushnikov
22c0ce63ce
test: cleanup newly added test for navigation referer (#3179)
Make sure that referer that is passed as `page.goto` option doesn't
override subrequest referers.
2018-09-04 19:05:48 +01:00
Andrey Lushnikov
32c0363ade
feat(chromium): roll Chromium to r588429 (#3181)
This roll includes:
- https://crrev.com/588420 - DevTools: teach request interception to work with
  Security.setIgnoreCertificateErrors

Fixes #1159.
2018-09-04 10:04:27 +01:00
Ali Ahmad
464f3b4ca2 feat(page): Add 'referer' as a parameter to Page.goto() (#3128)
If referer is passed to the options object its value will be used as the referer instead of the value set by `Page.setExtraHTTPHeaders()`.

This is the correct way to set referer header: otherwise, the `referer` header will override all the document subrequests.

Fixes #3090.
2018-09-03 20:06:58 +01:00
Andrey Lushnikov
17029281a9
feat(page): Introduce page.setGeolocation method (#3160)
Fixes #1077
2018-08-31 18:04:12 +01:00
Andrey Lushnikov
50d6c2d3c6
feat(browsercontext): implement BrowserContext.overridePermissions (#3159)
Introduce an API to manage permissions per browser context:
- BrowserContext.overridePermissions(origin, permissions)
- BrowserContext.clearPermissionOverrides()

Fixes #846.
2018-08-30 23:36:09 +01:00
Andrey Lushnikov
df459ba6cd
feat(chromium): roll Chromium to r587164 (#3153)
This roll includes:
- https://crrev.com/584293 - DevTools: execute scripts in addScriptToEvaluateOnLoad in order
- https://crrev.com/585630 - DevTools: introduce Browser.grantPermissions
- https://crrev.com/587156 - Revert "[Base] Use background mode for ThreadPriority::BACKGROUND threads (behind feature) (reland)."

The "revert" patch fixes headless functionality on windows.

References #846.
Fixes #3106.
2018-08-30 01:02:53 +01:00