You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instructions should, instead of containing the JavaScript code, contain objects that get serialized on the harness side and deserialized in the browser. For example, parseAssertCssInner is currently implemented like this:
This means all functions are exported and used by puppeteer directly, and the test harness merely sends serialized POJOs for each instruction. This means sending less code, but more importantly means responsibility for string escaping can be concentrated in one place (you're less likely to invite Bobby Tables into your test case).
The text was updated successfully, but these errors were encountered:
instructions
should, instead of containing the JavaScript code, contain objects that get serialized on the harness side and deserialized in the browser. For example, parseAssertCssInner is currently implemented like this:browser-UI-test/src/commands/assert.js
Lines 103 to 142 in 09259bf
The idea is that, instead of returning actual JS code, the parser returns a plain old javascript object:
And then, on the browser side, the actual implementation is a simple function that contains most of what the parser currently returns.
This means all functions are exported and used by puppeteer directly, and the test harness merely sends serialized POJOs for each instruction. This means sending less code, but more importantly means responsibility for string escaping can be concentrated in one place (you're less likely to invite Bobby Tables into your test case).
The text was updated successfully, but these errors were encountered: