-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: add more cases for oopif smoke test #13705
Conversation
{url: 'http://localhost:10503/oopif-simple-page.html'}, | ||
// simple-script.js is included many times | ||
// 2 * (1 from <script>, 1 from fetch) = 4 | ||
// Note, the network records from the workers are _not_ captured! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug alert!
const unexpectedValues = expectedValue; | ||
console.log({arrToCheckAgainst}); | ||
for (const unexpectedEntry of unexpectedValues) { | ||
const matchingIndex = arrToCheckAgainst.findIndex(actualEntry => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't do any splicing, can probably just use arrToCheckAgainst.find
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm... but then there's the case of undefined
being a valid value in these arrays :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ya, index works fine then
I didn't understand under what circumstances we determine a script (via
ScriptElement
) to be from an OOPIF (when the network record has a sessionId thus is not from the main target).Learned some things:
Adding more test cases to capture how things change if we decide to stop filtering "OOPIF" scripts from our audits.