Skip to content

Commit

Permalink
Squashed 'playwright/' changes from 3049d99bc8..b8949166dc
Browse files Browse the repository at this point in the history
b8949166dc cherry-pick(#28198): feat(recorder): UX updates for assertion tools (#28202)
59e8f4815d chore: mark v1.40.0 (#28199)
85438edb97 test: Intl.ListFormat is working in playwright all browsers (#28178)
aec4399d8f docs: release notes for v1.40 (#28175)
25b9c4eb4a chore: do not lose error name for js errors (#28177)
4575c9a182 chore(logs): Add new log level to capture client-server message's metadata information (#28141)
80bab8afae fix(electron/android): re-add Element.prototype.checkVisibility check (#28173)
7ffcb42551 test: fix 'exposeFunction should not leak' in video mode (#28169)
0867c3ce5b feat(chromium): roll to r1091 (#28171)
1c8ceb0a02 fix(html-reporter): Include specified host and port in the logged instructions to launch the HTML report (#28144)
611badcf74 fix: setInputFiles test in driver mode (#28166)
30aa8cd904 docs(input): use web-first assertion for isChecked() (#28162)
84d1260d1a fix(recorder): inspect element when starting typing in locator editor (#28134)
bb241abaff feat(webkit): roll to r1944 (#28148)
b66839b039 fix(exposeFunction): exposeFunction should not leak client side BindingCalls (#28163)
557f3afd74 feat(recorder): assert value as a separate tool (#28145)
f76c261b16 docs(ci.md): added google cloud CI docs for NodeJs using the playwright Docker Image (#27831)
0a052cb4d6 feat(recorder): assert visibility tool (#28142)
03031a6d2c chore: update browser patches to d8f2e2984 (#28139)
ec2c7024b6 docs: fix ignoreCase description (#28121)
2ac1cde879 fix(recorder): resize of assert overlay textarea (#28137)
60a37f37ef chore: allow tabbing from codemirror locator editor (#28116)
78293053b4 feat(chromium-tip-of-tree): roll to r1168 (#28128)
bf4c315b09 fix(types): explicit ExpectMatcherState type, optional Expect arg (#28119)
16aee8b5d0 fix(codegen): comment-out generated expects for library scripts  (#28118)
36b99c3437 chore(recorder): standby mode, expose setModeRequested in DebugController (#28117)
2c3955a28c chore: remove fake `error` from expect calls (#28112)
ec4893d235 docs: update phrasing for 1.40 features (#28113)
b0f75a6a3a chore: allow editing locator while matching text (#28115)
ae5cdf16f0 chore: allow asserting substring (#28111)
8b1c637c16 fix(codegen): generate expect import for library (#28107)
35aeace476 docs(assertions): note on whitespace normalization (#28110)
cd70d51aa8 chore: remove redundant check for highlight liveness (#28108)
db38f0d2df chore: flag text mismatch when editing (#28106)
40b8df7217 docs(running-tests-*.md): Correct "running tests" typos (#28055)
120f0228c5 feat(selector generator): try improving text candidate with heuristics (#28074)
39a555513b Add HOME=/root to container samples in docs (#27832)
d9ccc80d0c fix: ubuntu version detection for linux mint (#28085)
c6d154f9c4 feat: Add support for dispatching device motion events (#28067)
0ade89c121 Partial documentation update, page.evaluate never returns a handle (#28080)
d94c3e04e8 feat(webkit): roll to r1943 (#28089)
1b3349d091 chore: use codemirror in the on-hover locator editor (#28090)
fae5dd898a chore: remove from client check if browser is co-located with server (#28071)
1aee48f2d0 test: COEP/COOP/CORP isolated iframe should work (#28083)
2954e1263e test: skip dispatchEvent(deviceOrientation) tests on Android (#28077)
1b22c43c35 feat(webkit): roll to r1942 (#28073)
9b1b1e02ed feat(webkit): roll to r1941 (#28069)
6d3913f459 chore: fix Ubuntu 22.04 WebKit on 20.04 host (#28068)
62b6af3a7f fix(android): respect recordHar option (#28046)
7f10fe935a test: add a test for concurrent hover (#28042)
6c2abf016e feat(chromium-tip-of-tree): roll to r1167 (#28053)
93d202c480 feat(chromium): roll to r1090 (#28052)
b004c1a0a7 chore: rework assert dialog (#28043)
5f527fedb1 fix: JSHandle preview text for non-ascii attributes/children (#28038)
5a9fa69c6d feat: Add support for dispatching device orientation events (#27960)
c759e6a6f6 docs: move expect.extend docs from "test configuration" to "assertions" (#28039)
2afd857642 chore: prepare to use codemirror in recorder (#28025)
061ded19b6 chore: place overlay inside the glass pane (#28026)
1a8b61199f feat(firefox-beta): roll to r1429 (#28024)
e788c711c6 fix: electron video tests (#28004)
cb14de7a5b chore: do not use ansi outsite of TTY (#27979)
b9aaa38d3b feat(firefox): roll to r1429 (#28020)
eeda25c47f chore(recorder): glue the overlay to the top (#28021)
a9c4406439 feat(chromium-tip-of-tree): roll to r1166 (#28009)
07d5093583 test: test gardening (#28001)
19b0f5ccb3 docs(dotnet): page -> Page (#27988)
810382c074 chore(recorder): more UX fixes for text assertions (#27995)
87787dcc7d chore: allow click close the page w/o errors (#27994)
ffd2e02aa3 feat(recorder): various UX fixes (#27967)
53a78a315e fix(merge): preserve original "rootDir" by default (#27963)
738cbfc216 devops: call merge-reports with explicit config (#27965)
f401a482d2 fix(codegen): consume pointer events alongside mouse events (#27949)
326c9785b4 fix(trace-viewer): keep searchParams on / redirect (#27956)
a55fe8fd1f chore: reset preserveOutput in ui mode (#27944)
e84dd4d708 fix(ui): do not fail on clashing groups (#27943)
f9c4955fe8 fix(msedge): install with multiple artifacts (#27939)
a7fd515626 chore(recorder): use designMode for text selection tool (#27936)
c59483c5fb fix(tsconfig): handle tsconfig paths without a baseUrl (#27846)
bc1b59042c feat(chromium-tip-of-tree): roll to r1165 (#27928)
059c865689 feat(chromium): roll to r1089 (#27925)
50342a0c9d feat(firefox-beta): roll to r1428 (#27923)
0fda074183 feat(firefox): roll to r1428 (#27912)
07da88dcf1 feat(recorder): generate toHaveValue/toBeEmpty/toBeChecked (#27913)
0f2de59b7c chore: remove graceful browser.close cleanup (#27916)
817a130cdc chore: dispose-based callback termination (#27911)
3dedbced13 feat(recorder): in-page overlay (#27904)
d983941447 test: locale/timeZone should affect Intl.DateTimeFormat() (#27898)
f518684d89 chore: fix parameterized tests on the flakiness dashboard (#27900)
36c4c24f8a fix: only convert input files for browser collocated with server (#27873)
38115d121b feat(chromium): roll to r1088 (#27897)
0c4de1f4ce feat(webkit): roll to r1932 (#27884)
38a0921845 fix: Google Chrome Beta/Stable install on macOS (#27880)
08b8181632 chore: make Trace Viewer start page AAA compliant (#27879)
d38eab0df1 feat(chromium-tip-of-tree): roll to r1164 (#27881)
cff9ac04e4 fix: cross-origin Page.goto referer (#27859)
08685a654a test: using ServiceWorker on localhost over HTTPS (#27863)
c3b533d834 feat(firefox): roll to r1427 (#27871)
c7b6a76437 fix(fetch): throw when methods are called on disposed context (#27868)
7bab19d807 docs: syntax corrections in expect.extend documentation (#27772)
afa5cdc53f feat(firefox-beta): roll to r1427 (#27866)
59b8cf008e fix(codegen): don't generate page.frame() calls anymore (#27820)
f620828818 chore: allow PW_VERSION_OVERRIDE in tests (#27861)
3127765bde chore: add curly space to fix eslint run (#27858)
1a34b6d211 fix(ct): solid render array as child (#27849)
96787d2626 fix(ct): vue render array as slot (#27851)
3313381040 fix(ct): react render array as child (#27692)
462e70ab82 chore: render sidebar tab selector as drop down (#27844)
4d82d6801f chore: render full pathname in network panel (#27843)
100d3b2601 fix(css parser): support nested builtin functions (#27841)
88f30d1ce2 feat: support firefoxUserPrefs in launchPersistentContext (#27840)
d395a38a63 docs: add v1.39 release video (#27838)
49b662c22c feat(chromium): roll to r1087 (#27834)
4d8dd55b90 chore: refactor Recorder, introduce RecorderTool (#27826)
24deac458b feat(expect): generate toHaveText (#27824)
54ebee79f7 chore(ct): resolve internal type errors (#26779)
ff206bd9c1 chore: render time in the trace viewer log (#27825)
89e0978da4 Update class-page.md (#27750)
778047facc chore: stream trace viewer logs (#27807)
5f366088be chore: get rid of rimraf package (#27790)
ae1e1885dc docs: add Argos Reporter to doc (#27789)
841bb92049 chore: update Docker Node.js version to new LTS (20) (#27813)
86c78c1e0f fix(html): do not update total time when filtering tests (#27808)
37ab6832ab feat(chromium-tip-of-tree): roll to r1163 (#27817)
00d3b4bdc3 chore(driver): roll driver to recent Node.js LTS version (#27814)
0ade5aa9ad fix: ignoreCase in toHaveAttribute (#27809)
47733b04fb chore: do not select after hooks automatically (#27805)
54235120a0 fix: npx playwright install on Ubuntu 18.04 (#27791)
09ff9a5908 docs: update screenshots (#27760)
5f0d91a42c test: add test for multipart keeping order (#27787)
1afeff5be0 feat(firefox-beta): roll to r1426 (#27793)
60f2de77da feat(firefox): roll to r1426 (#27794)
0bb9f7cdf7 feat(ui): show test status in trace view (#27785)
7de0ccd36e chore: support await using for close() and dispose() (#27766)
c8134bca5d feat(html): show top-level errors (#27763)
210168e36d chore(test runner): remove fake skipped test results (#27762)
c33b41df77 feat(chromium-tip-of-tree): roll to r1162 (#27774)
fe7847b126 fix: require JSX inside PWT with pnpm (#27744)
5e51a734e7 fix: interrupt request.allHeaders()/response() on page.close() (#27695)
5752a28f87 chore: make tests strict (1) (#27731)
f48861ddee fix(inspector): highlight xpath/css locators without engine prefix (#27742)
9af667be26 feat(webkit): roll to r1928 (#27755)
766bc5cd77 docs: .NET ParallelScope (#27745)
5fe77f9a6f chore: better error for trace viewer over http:// (#27722)
b8678ef902 chore(test runner): simplify some dispatcher logic (#27732)
85112be25c fix(test runner): properly handle uncaught errors in test.fail() (#27734)
0a0878d567 feat: add pixel 7 device with android 14 (#27700)
6d7d37061d fix(recorder): Locator picker had wrong initial language in language bindings (#27706)
d1d5fc67dc fix(recorder): show action point in main frame only (#27719)
d67515f6c1 chore(test runner): do not produce some of the fake skipped test results (#27730)
27daa5e7b1 fix(ct): solid render array as child (#27715)
6fe31ab52c feat: support alternative quotes in js parseLocator() (#27718)
9fcfe68fcb docs: document PWDEBUG=console disables timeout (#27725)
a9bfb22852 docs: improve python ci guide (#27724)
f46c889449 chore: fix total progress reporting w/ deps (#27716)
d003945a7b chore(ui): do not watch output folders (#27694)
6e62a11643 fix(trace): EPERM on windows (#27693)
b1325c9208 fix(keyboard): event order for Escape key (#27711)
02fe462dda docs: remove why-playwright.md (#27699)
6ba2eaf24a feat(chromium-tip-of-tree): roll to r1161 (#27705)
920f8766f0 feat(chromium): roll to r1086 (#27703)
7289cb7841 docs(ci):  For Jenkins updated command from ci to npm ci (#27702)
bd58c0d5d2 fix: preserve lastModified timestamp in setInputFiles (#27671)
7cd390b708 docs (test-cli-js.md): fix typo for list marker  (#27636)
ee0811ad1a docs: clarify `devices` import (#27648)
562938b271 fix(ct): baseURL playwright config (#27689)
fd82b2b3fa feat(json report): add expected/unexpected/skipped/flaky stats (#27685)
3aa147914c chore: split error to client and server sides (#27672)
8eab375c1d feat(chromium-tip-of-tree): roll to r1160 (#27657)
091f6883f5 chore: remove the usages of raw target closed message constant (#27669)
5262e5ab35 feat(chromium-tip-of-tree): roll to r1159 (#27605)
a005064cc8 docs: make test-timeouts AAA compliant (#27667)
d4296dbff4 chore: break dowload.path() to throw (#27662)
08bc4fd801 fix(registry): don't download x64 binaries on other platforms (#27462)
0a49c3dbb9 chore: bump @babel dependencies (#27632)
86ce598dfa chore(driver): roll driver to recent Node.js LTS version (#27652)
a54dbfdadf chore: plumb the target close reason when test fails (#27640)
4e845e7b1d fix(fetch): JSON.stringify on client (#27644)
e8b4c03e54 fix(chromium): do not cancel downloads when intercepting (#27638)
fd2fbe9d2f fix: merge{Tests,Expects} via ESM imports (#27630)
f8277ca99c feat(webkit): roll to r1927 (#27639)
b0c73b72f1 chore: push protocol error conversion to dispatcher (#27608)
d83d9ce268 chore: make sure that we print warning for unsupported OS (#27610)
b2dc0d2fbd test: unskip "should keep selection in multiple pages" (#27611)
4b771f9d4b chore: remove /ms-playwright-agent in focal Docker image (#27631)
6b31b30df9 chore: allow a script to generate release-notes for GitHub (#27596)
b3bcf1c75a feat(chromium): roll to r1085 (#27604)
fc32ca676b feat: check client version on the server (#27585)
f0167091e6 fix(test runner): rework compilation cache logic (#27607)
3e4a1e89a1 feat(webkit): roll to r1926 (#27609)
80c408023e test: unflake "should fail without credentials" (#27606)
d6adfee7c0 test: update expectation on windows for "should reject if launched br… (#27603)
6400e5c564 feat(webkit): roll to r1925 (#27588)
bc59565d77 fix(webkit): support clipboard.readText (#27581)
f8a30fb726 chore: follow up to target close message
9d76c09ddb test: preserve selection when switching pages (#27578)
7b4a9d967a feat(webkit): roll to r1923 (#27571)
f212fd1a83 chore: unify target closed errors (#27540)
8595a6c25f chore(driver): roll driver to recent Node.js LTS version (#27565)
117f3f1298 docs: Fixing a release version of a method toHaveAttribute (#27559)
823b104a9e feat(html): "copy to clipboard" for text attachments (#27556)
393bd36e0a chore: composed->merge (#27555)
3a43aaa700 chore: roll stable-test-runner to 1.39.0-beta-1697048429000 (#27553)
db4047b131 docs: update release notes for 1.39 (#27549)
a5be8ce86a test: unflake some more tests (#27546)
ebd0ff9422 chore: update browser patches to 7f74cfc1d (#27539)
7aee202aef chore: mark 1.40.0-next (#27538)
REVERT: 3049d99bc8 cherry-pick(#27555): chore: composed->merge
REVERT: ae31f58b43 chore: mark 1.39.0 (#27550)
REVERT: 5313514995 cherry-pick(#27549): docs: update release notes for 1.39

git-subtree-dir: playwright
git-subtree-split: b8949166dc08e0ae499d08bec004a3f1a4e26ec8
  • Loading branch information
ruifigueira committed Nov 17, 2023
1 parent de35120 commit 3df7abc
Show file tree
Hide file tree
Showing 444 changed files with 9,967 additions and 5,678 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_test_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Merge reports
run: |
npx playwright merge-reports --reporter markdown,html ./all-blob-reports
npx playwright merge-reports --config .github/workflows/merge.config.ts ./all-blob-reports
env:
NODE_OPTIONS: --max-old-space-size=4096

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/merge.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
testDir: '../../tests',
reporter: [['markdown'], ['html']]
};
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# 🎭 Playwright

[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-119.0.6045.9-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-118.0.1-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->
[![npm version](https://img.shields.io/npm/v/playwright.svg)](https://www.npmjs.com/package/playwright) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-120.0.6099.28-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-119.0-blue.svg?logo=firefoxbrowser)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->

## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/docs/api/class-playwright)

Playwright is a framework for Web Testing and Automation. It allows testing [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->119.0.6045.9<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->120.0.6099.28<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->118.0.1<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->119.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Headless execution is supported for all browsers on all platforms. Check out [system requirements](https://playwright.dev/docs/intro#system-requirements) for details.

Expand Down
2 changes: 1 addition & 1 deletion browser_patches/firefox/UPSTREAM_CONFIG.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REMOTE_URL="https://github.com/mozilla/gecko-dev"
BASE_BRANCH="release"
BASE_REVISION="fdbb85992450ee14d23efe08c0dd655eedab0e1d"
BASE_REVISION="bf57fe91c49f319e7f65636ed223e5f7b4b7738a"
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/Helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

const uuidGen = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

class Helper {
decorateAsEventEmitter(objectToDecorate) {
Expand Down
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/NetworkObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"use strict";

const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
const { ChannelEventSinkFactory } = ChromeUtils.import("chrome://remote/content/cdp/observers/ChannelEventSink.jsm");

Expand Down
5 changes: 2 additions & 3 deletions browser_patches/firefox/juggler/TargetRegistry.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {Preferences} = ChromeUtils.import("resource://gre/modules/Preferences.jsm");
const {ContextualIdentityService} = ChromeUtils.import("resource://gre/modules/ContextualIdentityService.jsm");
const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
Expand Down Expand Up @@ -184,7 +183,7 @@ class TargetRegistry {
domWindow = appWindow;
appWindow = null;
}
if (!(domWindow instanceof Ci.nsIDOMChromeWindow))
if (!domWindow.isChromeWindow)
return;
// In persistent mode, window might be opened long ago and might be
// already initialized.
Expand Down Expand Up @@ -212,7 +211,7 @@ class TargetRegistry {

const onCloseWindow = window => {
const domWindow = window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);
if (!(domWindow instanceof Ci.nsIDOMChromeWindow))
if (!domWindow.isChromeWindow)
return;
if (!domWindow.gBrowser)
return;
Expand Down
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/components/Juggler.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var EXPORTED_SYMBOLS = ["Juggler", "JugglerFactory"];

const {XPCOMUtils} = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
const {ComponentUtils} = ChromeUtils.import("resource://gre/modules/ComponentUtils.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {Dispatcher} = ChromeUtils.import("chrome://juggler/content/protocol/Dispatcher.js");
const {BrowserHandler} = ChromeUtils.import("chrome://juggler/content/protocol/BrowserHandler.js");
const {NetworkObserver} = ChromeUtils.import("chrome://juggler/content/NetworkObserver.js");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";

const { Helper } = ChromeUtils.import('chrome://juggler/content/Helper.js');
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { initialize } = ChromeUtils.import('chrome://juggler/content/content/main.js');

const Ci = Components.interfaces;
Expand Down
5 changes: 4 additions & 1 deletion browser_patches/firefox/juggler/content/PageAgent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

const Ci = Components.interfaces;
const Cr = Components.results;
Expand Down Expand Up @@ -462,6 +461,10 @@ class PageAgent {
}

async _dispatchKeyEvent({type, keyCode, code, key, repeat, location, text}) {
if (code === 'OSLeft')
code = 'MetaLeft';
else if (code === 'OSRight')
code = 'MetaRight';
const frame = this._frameTree.mainFrame();
const tip = frame.textInputProcessor();
if (key === 'Meta' && Services.appinfo.OS !== 'Darwin')
Expand Down
26 changes: 11 additions & 15 deletions browser_patches/firefox/juggler/content/Runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class Runtime {
if (isWorker) {
this._registerWorkerConsoleHandler();
} else {
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
this._registerConsoleServiceListener(Services);
this._registerConsoleAPIListener(Services);
}
Expand Down Expand Up @@ -240,8 +239,8 @@ class Runtime {
return {success: true, obj: obj.promiseValue};
if (obj.promiseState === 'rejected') {
const debuggee = executionContext._debuggee;
exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}).return;
exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}).return;
exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}, {useInnerBindings: true}).return;
exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}, {useInnerBindings: true}).return;
return {success: false, obj: null};
}
let resolve, reject;
Expand All @@ -268,8 +267,8 @@ class Runtime {
return;
};
const debuggee = pendingPromise.executionContext._debuggee;
pendingPromise.exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}).return;
pendingPromise.exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}).return;
pendingPromise.exceptionDetails.text = debuggee.executeInGlobalWithBindings('e.message', {e: obj.promiseReason}, {useInnerBindings: true}).return;
pendingPromise.exceptionDetails.stack = debuggee.executeInGlobalWithBindings('e.stack', {e: obj.promiseReason}, {useInnerBindings: true}).return;
pendingPromise.resolve({success: false, obj: null});
}

Expand Down Expand Up @@ -442,7 +441,7 @@ class ExecutionContext {
_instanceOf(debuggerObj, rawObj, className) {
if (this._domWindow)
return rawObj instanceof this._domWindow[className];
return this._debuggee.executeInGlobalWithBindings('o instanceof this[className]', {o: debuggerObj, className: this._debuggee.makeDebuggeeValue(className)}).return;
return this._debuggee.executeInGlobalWithBindings('o instanceof this[className]', {o: debuggerObj, className: this._debuggee.makeDebuggeeValue(className)}, {useInnerBindings: true}).return;
}

_createRemoteObject(debuggerObj) {
Expand Down Expand Up @@ -532,7 +531,7 @@ class ExecutionContext {
}

_serialize(obj) {
const result = this._debuggee.executeInGlobalWithBindings('stringify(e)', {e: obj, stringify: this._jsonStringifyObject});
const result = this._debuggee.executeInGlobalWithBindings('stringify(e)', {e: obj, stringify: this._jsonStringifyObject}, {useInnerBindings: true});
if (result.throw)
throw new Error('Object is not serializable');
return result.return === undefined ? undefined : JSON.parse(result.return);
Expand Down Expand Up @@ -561,15 +560,12 @@ class ExecutionContext {
}

_getResult(completionValue, exceptionDetails = {}) {
if (!completionValue) {
exceptionDetails.text = 'Evaluation terminated!';
exceptionDetails.stack = '';
return {success: false, obj: null};
}
if (!completionValue)
throw new Error('evaluation terminated');
if (completionValue.throw) {
if (this._debuggee.executeInGlobalWithBindings('e instanceof Error', {e: completionValue.throw}).return) {
exceptionDetails.text = this._debuggee.executeInGlobalWithBindings('e.message', {e: completionValue.throw}).return;
exceptionDetails.stack = this._debuggee.executeInGlobalWithBindings('e.stack', {e: completionValue.throw}).return;
if (this._debuggee.executeInGlobalWithBindings('e instanceof Error', {e: completionValue.throw}, {useInnerBindings: true}).return) {
exceptionDetails.text = this._debuggee.executeInGlobalWithBindings('e.message', {e: completionValue.throw}, {useInnerBindings: true}).return;
exceptionDetails.stack = this._debuggee.executeInGlobalWithBindings('e.stack', {e: completionValue.throw}, {useInnerBindings: true}).return;
} else {
exceptionDetails.value = this._serialize(completionValue.throw);
}
Expand Down
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/content/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {FrameTree} = ChromeUtils.import('chrome://juggler/content/content/FrameTree.js');
const {SimpleChannel} = ChromeUtils.import('chrome://juggler/content/SimpleChannel.js');
Expand Down
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/protocol/BrowserHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"use strict";

const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {TargetRegistry} = ChromeUtils.import("chrome://juggler/content/TargetRegistry.js");
const {Helper} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {PageHandler} = ChromeUtils.import("chrome://juggler/content/protocol/PageHandler.js");
Expand Down
1 change: 0 additions & 1 deletion browser_patches/firefox/juggler/protocol/PageHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"use strict";

const {Helper, EventWatcher} = ChromeUtils.import('chrome://juggler/content/Helper.js');
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const {NetUtil} = ChromeUtils.import('resource://gre/modules/NetUtil.jsm');
const {NetworkObserver, PageNetwork} = ChromeUtils.import('chrome://juggler/content/NetworkObserver.js');
const {PageTarget} = ChromeUtils.import('chrome://juggler/content/TargetRegistry.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class ScreencastEncoder::VPXFrame {
* amount of lines and columns to retain semantic of U and V planes which
* contain only 1/4 of pixel information.
*/
int yuvTopOffset = m_margin.top & 1 ? m_margin.top + 1 : m_margin.top;
int yuvLeftOffset = m_margin.left & 1 ? m_margin.left + 1 : m_margin.left;
int yuvTopOffset = m_margin.top + (m_margin.top & 1);
int yuvLeftOffset = m_margin.left + (m_margin.left & 1);

double src_width = src->width() - yuvLeftOffset;
double src_height = src->height() - yuvTopOffset;
Expand Down
Loading

0 comments on commit 3df7abc

Please sign in to comment.