Open Bug 1774913 Opened 3 years ago Updated 1 year ago

Enable devtools tests depending on emptyClipboard

Categories

(DevTools :: General, task, P3)

task

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Component: Widget: Cocoa → General
Product: Core → DevTools

After Bug 666254 was fixed, we should be able to run those checks on all platforms

Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/91b52e450816 [devtools] Enable devtools tests depending on emptyClipboard r=nchevobbe
Regressions: 1775015
Regressions: 1775016

Backed out for causing dt failures on browser_rules_search-filter_context-menu.js.

Push with failures

Failure log

Another fail appeared on the push for this bug, this TV fail: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=pending%2Crunning%2Csuccess%2Ctestfailed%2Cbusted%2Cexception%2Crunnable&revision=91b52e45081624f8799ed6a7db5ff422a4cd9ebc&selectedTaskRun=O4oC2YowSPGdQfanat-P3A.0&searchStr=OS%2CX%2C10.15%2CWebRender%2Cdebug%2Ctest-macosx1015-64-qr%2Fdebug-test-verify-fis-e10s%2CTV-fis

Backout link

[task 2022-06-20T10:47:24.384Z] 10:47:24     INFO - TEST-PASS | devtools/client/inspector/rules/test/browser_rules_search-filter_context-menu.js | cmdCopy is disabled - 
[task 2022-06-20T10:47:24.384Z] 10:47:24     INFO - Buffered messages finished
[task 2022-06-20T10:47:24.386Z] 10:47:24     INFO - TEST-UNEXPECTED-FAIL | devtools/client/inspector/rules/test/browser_rules_search-filter_context-menu.js | cmdPaste is disabled - Got "", expected "true"
[task 2022-06-20T10:47:24.386Z] 10:47:24     INFO - Stack trace:
[task 2022-06-20T10:47:24.386Z] 10:47:24     INFO - chrome://mochikit/content/browser-test.js:test_is:1429
[task 2022-06-20T10:47:24.386Z] 10:47:24     INFO - chrome://mochitests/content/browser/devtools/client/inspector/rules/test/browser_rules_search-filter_context-menu.js:null:48
[task 2022-06-20T10:47:24.386Z] 10:47:24     INFO - chrome://mochikit/content/browser-test.js:handleTask:989
[task 2022-06-20T10:47:24.387Z] 10:47:24     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1061
[task 2022-06-20T10:47:24.387Z] 10:47:24     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1196
[task 2022-06-20T10:47:24.388Z] 10:47:24     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:978
[task 2022-06-20T10:47:24.388Z] 10:47:24     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1041
[task 2022-06-20T10:47:24.389Z] 10:47:24     INFO - Closing context menu
[task 2022-06-20T10:47:24.389Z] 10:47:24     INFO - Copy text in search field using the context menu
[task 2022-06-20T10:47:24.390Z] 10:47:24     INFO - Console message: [JavaScript Warning: "Empty string passed to getElementById()." {file: "chrome://global/content/elements/browser-custom-element.js" line: 391}]
[task 2022-06-20T10:47:24.390Z] 10:47:24     INFO - Initializing clipboard with "waitForClipboard-known-value-0.9344136129174874"...
[task 2022-06-20T10:47:24.391Z] 10:47:24     INFO - Succeeded initializing clipboard, start requested things...
[task 2022-06-20T10:47:24.392Z] 10:47:24     INFO - TEST-PASS | devtools/client/inspector/rules/test/browser_rules_search-filter_context-menu.js | Clipboard has the given value: 'h1' - 
Flags: needinfo?(jdescottes)

My try push didn't have any failure. All failures have been detected on Linux, maybe emptyClipboard doesn't work correctly on this platform?

Flags: needinfo?(jdescottes)

Let's wait until Bug 1755863 is fixed and test again.

Depends on: 1755863

(In reply to Julian Descottes [:jdescottes] from comment #4)

My try push didn't have any failure. All failures have been detected on Linux, maybe emptyClipboard doesn't work correctly on this platform?

I think it probably because we are allowed to clear clipboard only if the clipboard data is set by our self in Linux, https://searchfox.org/mozilla-central/rev/287583a4a605eee8cd2d41381ffaea7a93d7b987/widget/gtk/nsClipboard.cpp#598-601.

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:jdescottes, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit auto_nag documentation.

Flags: needinfo?(nchevobbe)
Flags: needinfo?(jdescottes)

(In reply to Edgar Chen [:edgar] from comment #6)

(In reply to Julian Descottes [:jdescottes] from comment #4)

My try push didn't have any failure. All failures have been detected on Linux, maybe emptyClipboard doesn't work correctly on this platform?

I think it probably because we are allowed to clear clipboard only if the clipboard data is set by our self in Linux, https://searchfox.org/mozilla-central/rev/287583a4a605eee8cd2d41381ffaea7a93d7b987/widget/gtk/nsClipboard.cpp#598-601.

Thanks for the info! In this case, let's change our isWindows() checks to verify if we are not on Linux. That's still some more coverage.
Do you know if there's any hope to make emptyClipboard consistently work on Linux and I should keep a bug open for that, or we just take that as a technical limitation?

Flags: needinfo?(nchevobbe)
Flags: needinfo?(jdescottes)
Flags: needinfo?(echen)
Attachment #9281897 - Attachment description: Bug 1774913 - [devtools] Enable devtools tests depending on emptyClipboard → Bug 1774913 - [devtools] Enable devtools tests depending on emptyClipboard on macos

(In reply to Julian Descottes [:jdescottes] from comment #8)

Do you know if there's any hope to make emptyClipboard consistently work on Linux and I should keep a bug open for that, or we just take that as a technical limitation?

Yeah, I don't see a reason why Linux need to behave different than other platforms, in fact we would like to do some refactoring in widget code to move the common code into a shared place in bug 1773707, this would help to reduce the platform difference, emptyClipboard is one of the cases of difference, I think.

Flags: needinfo?(echen)

Few failures on try after rebasing this https://treeherder.mozilla.org/jobs?repo=try&revision=a2f98d0fded0d7c0c3d2d68e7e87a5c00d39c743

should be easy to address

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: