Closed Bug 1442980 Opened 7 years ago Closed 7 years ago

Write tests for Shadow DOM + print preview

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(2 files)

No description provided.
Priority: -- → P3
Very simple test just trying to ensure we don't regress the basic functionality. remote: View your change here: remote: https://hg.mozilla.org/try/rev/1da98e80895b6df8b1362ef753247dd33a8c83b8 remote: remote: Follow the progress of your build on Treeherder: remote: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1da98e80895b6df8b1362ef753247dd33a8c83b8 remote: recorded changegroup in replication log in 0.107s Seeking for rs+ for the testchange. frame 0 is printed to frame 1 and screenshot of frame 1 is taken first to canvas 1 and then with shadow dom stuff to canvas 2. The test is rather ugly looking in general - blame me 9 years ago.
Assignee: nobody → bugs
Status: NEW → ASSIGNED
Attachment #8973036 - Flags: review?(bdahl)
Comment on attachment 8973036 [details] [diff] [review] simple_shadow_dom_print_test.diff Review of attachment 8973036 [details] [diff] [review]: ----------------------------------------------------------------- r+ with nits ::: layout/base/tests/chrome/printpreview_helper.xul @@ +269,5 @@ > + "<div>" + contentText + "</div>"; > + window.frames[0].document.body.firstChild.value = > + window.frames[0].document.body.firstChild.getAttribute('value'); > + printpreview(); > + ctx1.drawWindow(window.frames[1], 0, 0, 400, 400, "rgb(256,256,256)"); I'm guessing this came from the other test, but I assume we want 255 here (though 256 will be clamped). @@ +276,5 @@ > + window.frames[0].document.body.innerHTML = "<div></div>"; > + var sr = window.frames[0].document.body.firstChild.attachShadow({mode: "open"}); > + sr.innerHTML = contentText; > + printpreview(); > + ctx2.drawWindow(window.frames[1], 0, 0, 400, 400, "rgb(256,256,256)"); Same here
Attachment #8973036 - Flags: review?(bdahl) → review+
ah yeah, that is copy pasted.
256 -> 255
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3ce396c4e20f add basic test for print previewed shadow DOM, r=bdahl
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: