Open Bug 1403542 Opened 7 years ago Updated 2 years ago

Failed DevTools test when running in headless mode devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js

Categories

(Firefox :: Headless, defect, P2)

defect

Tracking

()

People

(Reporter: sole, Unassigned, NeedInfo)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Running:

```
./mach test devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
```

the tests pass successfully:
Browser Chrome Test Summary
	Passed: 375
	Failed: 0
	Todo: 0
	Mode: e10s
*** End BrowserChrome Test Results ***


But running with headless:

```
MOZ_HEADLESS=1 ./mach test devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
```

I get this output, with an error at the end:

```
######
### Now running mochitest-browser with subsuite clipboard.
######

Checking for ssltunnel processes...
Checking for xpcshell processes...
SUITE-START | Running 1 tests
Running manifest: devtools/client/inspector/test/browser.ini
pk12util: PKCS12 IMPORT SUCCESSFUL
MochitestServer : launching [u'/Users/sole/data/current/devtools/gecko/objdir-frontend/dist/bin/xpcshell', '-g', u'/Users/sole/data/current/devtools/gecko/objdir-frontend/dist/Nightly.app/Contents/Resources', '-v', '170', '-f', u'/Users/sole/data/current/devtools/gecko/objdir-frontend/dist/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/var/folders/17/7d5znj292816kjt4jynj4n2m0000gp/T/tmpDr6b4b.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;", '-f', '/Users/sole/data/current/devtools/gecko/objdir-frontend/_tests/testing/mochitest/server.js']
runtests.py | Server pid: 18493
runtests.py | Websocket server pid: 18494
runtests.py | SSL tunnel pid: 18495
runtests.py | Running with e10s: True
runtests.py | Running tests: start.

Application command: /Users/sole/data/current/devtools/gecko/objdir-frontend/dist/Nightly.app/Contents/MacOS/firefox -marionette -foreground -profile /var/folders/17/7d5znj292816kjt4jynj4n2m0000gp/T/tmpDr6b4b.mozrunner
runtests.py | Application pid: 18496
TEST-INFO | started process GECKO(18496)
GECKO(18496) | *** You are running in headless mode.
GECKO(18496) | 1506515844977	Marionette	INFO	Enabled via --marionette
GECKO(18496) | 2017-09-27 13:37:25.947 plugin-container[18497:2470455] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa33b, name = 'com.apple.tsm.portname'
GECKO(18496) | See /usr/include/servers/bootstrap_defs.h for the error codes.
GECKO(18496) | 2017-09-27 13:37:25.947 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.948 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.948 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.949 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.950 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.950 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.951 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.951 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.951 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.951 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.952 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.952 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.952 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.952 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.953 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.953 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.953 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.954 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.954 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:25.958 plugin-container[18497:2470455] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 1506515846187	Marionette	INFO	Listening on port 2828
GECKO(18496) | 1506515846345	Marionette	DEBUG	Register listener.js for window 2147483649
0 INFO *** Start BrowserChrome Test Results ***
1 INFO checking window state
2 INFO TEST-START | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js
3 INFO Entering test bound
4 INFO Adding a new tab with URL: http://example.com/browser/devtools/client/inspector/test/doc_inspector_menu.html
5 INFO Console message: [JavaScript Warning: "Use of nsIFile in content process is deprecated." {file: "resource://gre/modules/FileUtils.jsm" line: 174}]
GECKO(18496) | 2017-09-27 13:37:27.350 plugin-container[18498:2470531] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa44f, name = 'com.apple.tsm.portname'
GECKO(18496) | See /usr/include/servers/bootstrap_defs.h for the error codes.
GECKO(18496) | 2017-09-27 13:37:27.351 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.352 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.352 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.353 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.355 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.355 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.355 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.356 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.356 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.357 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.358 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.359 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.359 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.360 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.362 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.363 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.364 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.365 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.366 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.369 plugin-container[18498:2470531] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
6 INFO Console message: [JavaScript Warning: "Use of nsIFile in content process is deprecated." {file: "resource://gre/modules/FileUtils.jsm" line: 174}]
GECKO(18496) | 2017-09-27 13:37:27.545 plugin-container[18499:2470566] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa34b, name = 'com.apple.tsm.portname'
GECKO(18496) | See /usr/include/servers/bootstrap_defs.h for the error codes.
GECKO(18496) | 2017-09-27 13:37:27.546 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.547 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.547 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.548 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.548 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.549 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.549 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.549 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.550 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.551 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.551 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.552 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.552 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.552 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.553 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.553 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.553 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.554 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.554 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:27.558 plugin-container[18499:2470566] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
7 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-opacity’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 438}]
8 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-transform’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 439}]
9 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-transform’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 447}]
10 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-opacity’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 451}]
11 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-transform’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 453}]
12 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-window-transform’.  Declaration dropped." {file: "chrome://global/content/xul.css" line: 459}]
13 INFO Console message: [JavaScript Warning: "Unknown pseudo-class or pseudo-element ‘-moz-tree-line’.  Ruleset ignored due to bad selector." {file: "chrome://global/content/xul.css" line: 658}]
14 INFO Tab added and finished loading
15 INFO Opening the inspector
16 INFO Opening the toolbox
17 INFO Console message: [JavaScript Warning: "Unknown property ‘user-select’.  Declaration dropped." {file: "resource://devtools/client/shared/components/reps/reps.css" line: 251 column: 13 source: "  user-select: none;"}]
18 INFO Console message: [JavaScript Warning: "Unknown property ‘user-select’.  Declaration dropped." {file: "resource://devtools/client/shared/components/reps/reps.css" line: 251 column: 13 source: "  user-select: none;"}]
GECKO(18496) | console.log: [DISPATCH] {
GECKO(18496) |   "type": "UPDATE_PREVIEW_TEXT",
GECKO(18496) |   "previewText": ""
GECKO(18496) | }
GECKO(18496) | console.log: [DISPATCH] {
GECKO(18496) |   "type": "UPDATE_SHOW_ALL_FONTS",
GECKO(18496) |   "showAllFonts": false
GECKO(18496) | }
GECKO(18496) | console.log: [DISPATCH] {
GECKO(18496) |   "type": "UPDATE_FONTS",
GECKO(18496) |   "fonts": []
GECKO(18496) | }
19 INFO Console message: [JavaScript Warning: "Unknown pseudo-class or pseudo-element ‘selection’.  Ruleset ignored due to bad selector." {file: "chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.css" line: 227 column: 29 source: ".CodeMirror-gutter-wrapper ::selection { background-color: transparent }"}]
20 INFO Console message: [JavaScript Warning: "Unknown property ‘-moz-border-radius’.  Declaration dropped." {file: "chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.css" line: 236 column: 20 source: "  -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;"}]
21 INFO Console message: [JavaScript Warning: "Unknown pseudo-class or pseudo-element ‘selection’.  Ruleset ignored due to bad selector." {file: "chrome://devtools/content/sourceeditor/codemirror/lib/codemirror.css" line: 319 column: 18 source: ".CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }"}]
22 INFO Toolbox opened and focused
23 INFO Waiting for actor features to be detected
24 INFO Test doctype node with empty clipboard
25 INFO Clearing the clipboard.
26 INFO TEST-UNEXPECTED-FAIL | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js | Uncaught exception - [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIClipboardHelper.copyString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js :: copyString :: line 16"  data: no]
Stack trace:
    copyString@resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js:16:3
    setupClipboard@chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js:289:5
    @chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js:240:5
    Tester_execTest@chrome://mochikit/content/browser-test.js:798:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:697:9
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
    Tester_execTest@chrome://mochikit/content/browser-test.js:798:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:697:9
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
27 INFO Leaving test bound
28 INFO Removing tab.
29 INFO Waiting for event: 'TabClose' on [object XULElement].
30 INFO Got event: 'TabClose' on [object XULElement].
31 INFO Tab removed and finished closing
32 INFO TEST-UNEXPECTED-FAIL | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js | Cleanup function threw an exception - [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIClipboardHelper.copyString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js :: copyString :: line 16"  data: no]
GECKO(18496) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
GECKO(18496) | MEMORY STAT | vsize 4105MB | residentFast 346MB | heapAllocated 165MB
33 INFO TEST-OK | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js | took 2472ms
34 INFO checking window state
GECKO(18496) | 2017-09-27 13:37:29.879 plugin-container[18500:2470701] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa647, name = 'com.apple.tsm.portname'
GECKO(18496) | See /usr/include/servers/bootstrap_defs.h for the error codes.
GECKO(18496) | 2017-09-27 13:37:29.880 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.881 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.881 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.881 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.882 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.882 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.883 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.883 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.883 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.883 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.884 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.884 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.884 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.884 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.885 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.885 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.885 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.885 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.886 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
GECKO(18496) | 2017-09-27 13:37:29.889 plugin-container[18500:2470701] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
35 INFO Console message: [JavaScript Warning: "Use of nsIFile in content process is deprecated." {file: "resource://gre/modules/FileUtils.jsm" line: 174}]
GECKO(18496) | Completed ShutdownLeaks collections in process 18500
GECKO(18496) | Completed ShutdownLeaks collections in process 18498
GECKO(18496) | Completed ShutdownLeaks collections in process 18497
GECKO(18496) | Completed ShutdownLeaks collections in process 18499
GECKO(18496) | Completed ShutdownLeaks collections in process 18496
36 INFO TEST-START | Shutdown
37 INFO Browser Chrome Test Summary
38 INFO Passed:  0
39 INFO Failed:  2
40 INFO Todo:    0
41 INFO Mode:    e10s
42 INFO *** End BrowserChrome Test Results ***
GECKO(18496) | *** UTM:SVC TimerManager:registerTimer called after profile-before-change notification. Ignoring timer registration for id: telemetry_modules_ping
TEST-INFO | Main app process: exit 0
runtests.py | Application ran for: 0:00:08.464232
zombiecheck | Reading PID log: /var/folders/17/7d5znj292816kjt4jynj4n2m0000gp/T/tmp3npEGzpidlog
==> process 18496 launched child process 18497
==> process 18496 launched child process 18498
==> process 18496 launched child process 18499
==> process 18496 launched child process 18500
zombiecheck | Checking for orphan process with PID: 18497
zombiecheck | Checking for orphan process with PID: 18498
zombiecheck | Checking for orphan process with PID: 18499
zombiecheck | Checking for orphan process with PID: 18500
Stopping web server
Stopping web socket server
Stopping ssltunnel
leakcheck | refcount logging is off, so leaks can't be detected!
runtests.py | Running tests: end.
Buffered messages finished
TEST-INFO | checking window state
Browser Chrome Test Summary
	Passed: 0
	Failed: 2
	Todo: 0
	Mode: e10s
*** End BrowserChrome Test Results ***
The following tests failed:
43 INFO TEST-UNEXPECTED-FAIL | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js | Uncaught exception - [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIClipboardHelper.copyString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js :: copyString :: line 16"  data: no]
Stack trace:
    copyString@resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js:16:3
    setupClipboard@chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js:289:5
    @chrome://mochitests/content/browser/devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js:240:5
    Tester_execTest@chrome://mochikit/content/browser-test.js:798:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:697:9
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
    Tester_execTest@chrome://mochikit/content/browser-test.js:798:9
    Tester.prototype.nextTest</<@chrome://mochikit/content/browser-test.js:697:9
    SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:795:59
44 INFO TEST-UNEXPECTED-FAIL | devtools/client/inspector/test/browser_inspector_menu-01-sensitivity.js | Cleanup function threw an exception - [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIClipboardHelper.copyString]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource://devtools/shared/base-loader.js -> resource://devtools/shared/platform/chrome/clipboard.js :: copyString :: line 16"  data: no]
Buffered messages finished
SUITE-END | took 9s
```
Looks like this is from the limited clipboard support on headless. Right now it only supports plain text. I was planning to just disable tests that use more advanced features of the clipboard, but it doesn't look too hard to add support for some of the more common stuff, so I'll likely fix this over in bug 1399956.
Priority: -- → P2
Assignee: nobody → bdahl
Blocks: 1405868
Blocks: 1405869
Blocks: 1405872
Attachment #8928654 - Flags: review?(jmuizelaar) → review?(nika)
I'm moving the review to Nika. She's more familiar with clipboard code. Sorry for not doing this sooner. I was on PTO
Comment on attachment 8928654 [details]
Bug 1403542 - Adds support for images with headless clipboard.

https://reviewboard.mozilla.org/r/199894/#review210290

::: widget/headless/HeadlessClipboard.cpp:37
(Diff revision 1)
>  {
>    if (aWhichClipboard != kGlobalClipboard) {
>      return NS_ERROR_NOT_IMPLEMENTED;
>    }
>  
> -  // Clear out the clipboard in order to set the new data.
> +  mTransferable = aTransferable;

I'm not super comfortable with just stashing the transferable here - as theoretically someone could re-use the transferable which they pass into SetData, but I don't _think_ anyone's silly enough to do that.

Could you look into how ugly it would be to pull the data out of the nsITransferrable here?

::: widget/headless/HeadlessClipboard.cpp:82
(Diff revision 1)
> +  return NS_SUCCEEDED(rv);
> +}
> +
> +bool
> +HeadlessClipboard::GetSourceFlavor(const char* aRequestedFlavor,
> +                                   nsACString &result) {

nit: aResult

::: widget/headless/HeadlessClipboard.cpp:82
(Diff revision 1)
> +  return NS_SUCCEEDED(rv);
> +}
> +
> +bool
> +HeadlessClipboard::GetSourceFlavor(const char* aRequestedFlavor,
> +                                   nsACString &result) {

nit: { on the next line

::: widget/headless/HeadlessClipboard.cpp:84
(Diff revision 1)
> +
> +bool
> +HeadlessClipboard::GetSourceFlavor(const char* aRequestedFlavor,
> +                                   nsACString &result) {
> +  if (!mTransferable) {
> +    result.Assign(EmptyCString());

nit: Assign this once at the start to avoid assigning it on every error branch.
Attachment #8928654 - Flags: review?(nika) → review-
Any chance to finish this, Brendan? thanks :)
Flags: needinfo?(bdahl)
Sorry for the delay, priorities changed and this was put on the back burner. I'll try to get to this in some spare cycles over the next week or so.
Flags: needinfo?(bdahl)
Comment on attachment 8928654 [details]
Bug 1403542 - Adds support for images with headless clipboard.

https://reviewboard.mozilla.org/r/199894/#review210290

> I'm not super comfortable with just stashing the transferable here - as theoretically someone could re-use the transferable which they pass into SetData, but I don't _think_ anyone's silly enough to do that.
> 
> Could you look into how ugly it would be to pull the data out of the nsITransferrable here?

I started looking into doing this, but the problem is we don't know what flavor we want to export at this point. I could potentially try to pull out some of the common ones and store those. However, I also did notice that the nsBaseClipboard::SetData (used on windows) and MacOS's SetData basically does the same thing as this code and stashes the transferable, so if storing the mTransferable is an issue, it will be an issue on Windows and MacOS. Thoughts?
Any thoughts on how to proceed?^
Flags: needinfo?(nika)
(In reply to Brendan Dahl [:bdahl] from comment #8)
> I started looking into doing this, but the problem is we don't know what
> flavor we want to export at this point. I could potentially try to pull out
> some of the common ones and store those. However, I also did notice that the
> nsBaseClipboard::SetData (used on windows) and MacOS's SetData basically
> does the same thing as this code and stashes the transferable, so if storing
> the mTransferable is an issue, it will be an issue on Windows and MacOS.
> Thoughts?

Ok, Sounds fine in that case.
Flags: needinfo?(nika)

The bug assignee didn't login in Bugzilla in the last months and this bug has priority 'P2'.
:nalexander, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: bdahl → nobody
Flags: needinfo?(nalexander)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: