Bug 1237095 - Move the layout view into the Inspector directory r=pbro

This commit is contained in:
Gabriel Luong 2016-01-05 21:06:31 -08:00
parent b102a08043
commit cf5309743b
25 changed files with 44 additions and 41 deletions

View File

@ -367,7 +367,7 @@ InspectorPanel.prototype = {
}
this.sidebar.addTab("layoutview",
"chrome://devtools/content/layoutview/view.xhtml",
"chrome://devtools/content/inspector/layout/layout.xhtml",
"layoutview" == defaultTab);
if (this.target.form.animationsActor) {

View File

@ -15,10 +15,10 @@
<script type="application/javascript;version=1.8"
src="chrome://devtools/content/shared/theme-switching.js"/>
<script type="application/javascript;version=1.8" src="view.js"></script>
<script type="application/javascript;version=1.8" src="layout.js"></script>
<link rel="stylesheet" href="chrome://devtools/skin/common.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/layoutview.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/skin/layout.css" type="text/css"/>
</head>
<body class="theme-sidebar devtools-monospace">

View File

@ -4,5 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
DevToolsModules(
'layout.js',
)
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']

View File

@ -1,4 +1,4 @@
{
// Extend from the shared list of defined globals for mochitests.
"extends": "../../../.eslintrc.mochitests"
"extends": "../../../../.eslintrc.mochitests"
}

View File

@ -0,0 +1,22 @@
[DEFAULT]
tags = devtools
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
subsuite = devtools
support-files =
doc_layout_iframe1.html
doc_layout_iframe2.html
head.js
[browser_layout.js]
[browser_layout_editablemodel.js]
# [browser_layout_editablemodel_allproperties.js]
# Disabled for too many intermittent failures (bug 1009322)
[browser_layout_editablemodel_border.js]
[browser_layout_editablemodel_stylerules.js]
[browser_layout_guides.js]
[browser_layout_rotate-labels-on-sides.js]
[browser_layout_tooltips.js]
[browser_layout_update-after-navigation.js]
[browser_layout_update-after-reload.js]
# [browser_layout_update-in-iframes.js]
# Bug 1020038 layout-view updates for iframe elements changes

View File

@ -8,7 +8,7 @@
// it also works after going back
add_task(function*() {
yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
yield addTab(TEST_URL_ROOT + "doc_layout_iframe1.html");
let {toolbox, inspector, view} = yield openLayoutView();
yield runTests(inspector, view);
});
@ -34,7 +34,7 @@ function*(inspector, view) {
addTest("Navigate to the second page",
function*(inspector, view) {
yield navigateTo(TEST_URL_ROOT + "doc_layoutview_iframe2.html");
yield navigateTo(TEST_URL_ROOT + "doc_layout_iframe2.html");
yield inspector.once("markuploaded");
});

View File

@ -7,7 +7,7 @@
// Test that the layout-view continues to work after the page is reloaded
add_task(function*() {
yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
yield addTab(TEST_URL_ROOT + "doc_layout_iframe1.html");
let {toolbox, inspector, view} = yield openLayoutView();
info("Test that the layout-view works on the first page");

View File

@ -8,7 +8,7 @@
// change
add_task(function*() {
yield addTab(TEST_URL_ROOT + "doc_layoutview_iframe1.html");
yield addTab(TEST_URL_ROOT + "doc_layout_iframe1.html");
let iframe2 = getNode("iframe").contentDocument.querySelector("iframe");
let {toolbox, inspector, view} = yield openLayoutView();

View File

@ -15,7 +15,8 @@ var DevToolsUtils = require("devtools/shared/DevToolsUtils");
// All test are asynchronous
waitForExplicitFinish();
const TEST_URL_ROOT = "http://example.com/browser/devtools/client/layoutview/test/";
const TEST_URL_ROOT =
"http://example.com/browser/devtools/client/inspector/layout/test/";
// Uncomment this pref to dump all devtools emitted events to the console.
// Services.prefs.setBoolPref("devtools.dump.emit", true);
@ -100,7 +101,6 @@ function selectAndHighlightNode(nodeOrSelector, inspector) {
let updated = inspector.toolbox.once("highlighter-ready");
inspector.selection.setNode(node, "test-highlight");
return updated;
}
/**
@ -115,7 +115,7 @@ function selectAndHighlightNode(nodeOrSelector, inspector) {
* @return a promise that resolves when the inspector is updated with the new
* node
*/
function selectNode(nodeOrSelector, inspector, reason="test") {
function selectNode(nodeOrSelector, inspector, reason = "test") {
info("Selecting the node " + nodeOrSelector);
let node = getNode(nodeOrSelector);
@ -139,10 +139,10 @@ var openInspector = Task.async(function*() {
function mockHighlighter({highlighter}) {
highlighter.showBoxModel = function(nodeFront, options) {
return promise.resolve();
}
};
highlighter.hideBoxModel = function() {
return promise.resolve();
}
};
}
// Checking if the toolbox and the inspector are already loaded
@ -247,7 +247,7 @@ function waitForUpdate(inspector) {
var TESTS = [];
function addTest(message, func) {
TESTS.push([message, Task.async(func)])
TESTS.push([message, Task.async(func)]);
}
var runTests = Task.async(function*(...args) {

View File

@ -4,6 +4,7 @@
DIRS += [
'computed',
'layout',
'rules'
]

View File

@ -31,8 +31,8 @@ devtools.jar:
content/inspector/computed/computed.xhtml (inspector/computed/computed.xhtml)
content/inspector/rules/rules.xhtml (inspector/rules/rules.xhtml)
content/inspector/rules/rules.css (inspector/rules/rules.css)
content/layoutview/view.js (layoutview/view.js)
content/layoutview/view.xhtml (layoutview/view.xhtml)
content/inspector/layout/layout.js (inspector/layout/layout.js)
content/inspector/layout/layout.xhtml (inspector/layout/layout.xhtml)
content/fontinspector/font-inspector.js (fontinspector/font-inspector.js)
content/fontinspector/font-inspector.xhtml (fontinspector/font-inspector.xhtml)
content/fontinspector/font-inspector.css (fontinspector/font-inspector.css)
@ -233,7 +233,7 @@ devtools.jar:
skin/images/itemArrow-ltr.svg (themes/images/itemArrow-ltr.svg)
skin/images/noise.png (themes/images/noise.png)
skin/images/dropmarker.svg (themes/images/dropmarker.svg)
skin/layoutview.css (themes/layoutview.css)
skin/layout.css (themes/layout.css)
skin/images/debugger-collapse.png (themes/images/debugger-collapse.png)
skin/images/debugger-collapse@2x.png (themes/images/debugger-collapse@2x.png)
skin/images/debugger-expand.png (themes/images/debugger-expand.png)

View File

@ -1,22 +0,0 @@
[DEFAULT]
tags = devtools
skip-if = e10s # Bug ?????? - devtools tests disabled with e10s
subsuite = devtools
support-files =
doc_layoutview_iframe1.html
doc_layoutview_iframe2.html
head.js
[browser_layoutview.js]
[browser_layoutview_editablemodel.js]
# [browser_layoutview_editablemodel_allproperties.js]
# Disabled for too many intermittent failures (bug 1009322)
[browser_layoutview_editablemodel_border.js]
[browser_layoutview_editablemodel_stylerules.js]
[browser_layoutview_guides.js]
[browser_layoutview_rotate-labels-on-sides.js]
[browser_layoutview_tooltips.js]
[browser_layoutview_update-after-navigation.js]
[browser_layoutview_update-after-reload.js]
# [browser_layoutview_update-in-iframes.js]
# Bug 1020038 layout-view updates for iframe elements changes

View File

@ -17,7 +17,6 @@ DIRS += [
'framework',
'inspector',
'jsonview',
'layoutview',
'locales',
'markupview',
'memory',