author | Daisuke Akatsuka <daisuke@birchill.co.jp> |
Mon, 16 Dec 2019 10:18:07 +0000 | |
changeset 507084 | 3cff413b1897dbc48924cae9435dde5015f2a68b |
parent 507083 | 2297b54080b13fca7094c25373ecb5a4e5925e87 |
child 507085 | 0e1577031addefed6aeaa5df8a724b73edb690a0 |
push id | 103262 |
push user | dakatsuka.birchill@mozilla.com |
push date | Mon, 16 Dec 2019 10:44:27 +0000 |
treeherder | autoland@3cff413b1897 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jdescottes, ochameau |
bugs | 1578753 |
milestone | 73.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/devtools/client/styleeditor/test/browser.ini +++ b/devtools/client/styleeditor/test/browser.ini @@ -85,16 +85,18 @@ fail-if = fission # Got the expected num [browser_styleeditor_bug_851132_middle_click.js] [browser_styleeditor_bug_870339.js] [browser_styleeditor_bug_1405342_serviceworker_iframes.js] [browser_styleeditor_copyurl.js] [browser_styleeditor_enabled.js] [browser_styleeditor_fetch-from-netmonitor.js] fail-if = fission [browser_styleeditor_filesave.js] +[browser_styleeditor_fission_switch_target.js] +skip-if = true # Bug 1604126 [browser_styleeditor_highlight-selector.js] [browser_styleeditor_import.js] [browser_styleeditor_import_rule.js] [browser_styleeditor_init.js] [browser_styleeditor_inline_friendly_names.js] [browser_styleeditor_loading.js] [browser_styleeditor_loading_with_containers.js] [browser_styleeditor_media_sidebar.js]
new file mode 100644 --- /dev/null +++ b/devtools/client/styleeditor/test/browser_styleeditor_fission_switch_target.js @@ -0,0 +1,28 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ +"use strict"; + +// Test switching for the top-level target. + +const PARENT_PROCESS_URI = "about:robots"; +const CONTENT_PROCESS_URI = TEST_BASE_HTTPS + "simple.html"; + +add_task(async function() { + await pushPref("devtools.target-switching.enabled", true); + + // We use about:robots, because this page will run in the parent process. + // Navigating from about:robots to a regular content page will always trigger a target + // switch, with or without fission. + + info("Open a page that runs in the parent process"); + const { toolbox, ui } = await openStyleEditorForURL(PARENT_PROCESS_URI); + is(ui.editors.length, 3, `Three style sheets for ${PARENT_PROCESS_URI}`); + + info("Navigate to a page that runs in the child process"); + await navigateToAndWaitForStyleSheets(CONTENT_PROCESS_URI, ui); + is(ui.editors.length, 2, `Two sheets present for ${CONTENT_PROCESS_URI}`); + + const onToolboxDestroyed = gDevTools.once("toolbox-destroyed"); + toolbox.closeToolbox(); + await onToolboxDestroyed; +});