-
Notifications
You must be signed in to change notification settings - Fork 203
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
Issue #2040. Handle a single details param as JSON encoded data. #2041
Conversation
Need to update tests... |
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.
@miketaylr Thanks. A couple of comments, mostly nit.
But one where I wonder if in terms of reporting UI we could improve a bit the rendering.
webcompat/static/js/lib/bugform.js
Outdated
@@ -176,25 +176,23 @@ function BugForm() { | |||
$("[value=" + problemType[1] + "]").click(); | |||
} | |||
|
|||
// If we have one or more details params, | |||
// If we have a details params, JSON decode it and |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -12,8 +12,7 @@ var cwd = intern.config.basePath; | |||
var VALID_IMAGE_PATH = path.join(cwd, "tests/fixtures", "green_square.png"); | |||
var BAD_IMAGE_PATH = path.join(cwd, "tests/fixtures", "evil.py"); | |||
var DETAILS_STRING = | |||
"Encountered error: NS_ERROR_DOM_MEDIA_DEMUXER_ERR (0x806e000c)%0ALocation: virtual%0ARefPtrMP4Demuxer::InitPromise mozilla::MP4Demuxer::Init()%0AError information:%0AIncomplete MP4 metadata%0AMedia URL: file:///Users/potch/Documents/mozilla/media.mp4"; | |||
var DETAILS_STRING2 = "Encountered+error:+NS_ERROR_DOM_MEDIA_DEMUXER_ERR"; | |||
"%5B%22gfx.webrender.all%3A+false%22%2C%22gfx.webrender.blob-images%3A+2%22%2C%22gfx.webrender.enabled%3A+false%22%2C%22image.mem.shared%3A+2%22%2C%22layout.css.servo.enabled%3A+true%22%5D"; |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
// + (SPACE) to %20 before decoding | ||
.replace(/\+/g, "%20") | ||
) | ||
).join("\n") |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
webcompat/static/js/lib/bugform.js
Outdated
// add that to the end of the steps to reproduce textarea | ||
var details = location.href.match(/details=([^&]*)/g); | ||
if (details !== null) { | ||
var details = location.href.match(/details=([^&]*)/); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
) | ||
.findByCssSelector("#steps_reproduce") | ||
.getProperty("value") | ||
.then(function(text) { | ||
assert.notInclude( | ||
text, | ||
"Encountered+error:+NS_ERROR_DOM_MEDIA_DEMUXER_ERR", | ||
"gfx.webrender.all:+false", | ||
"+ not found in decoded string" | ||
); | ||
assert.include( |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Thanks @karlcow. Will update before merging. |
837dc15
to
00b48b7
Compare
No more multiple details params, but instead it will be sent as a JSON string and parsed by the client.