Commit 3a1b47a6 authored by Andrey Lushnikov's avatar Andrey Lushnikov Committed by Commit Bot

DevTools: kill http/tests/devtools/elements/styles-4/styles-history.js

This patch removes the styles-history.js test: the test is testing the
UISourceCode.history that was recently removed.

BUG=733495
TBR=dgozman

Change-Id: Idddd379ed4b9ae9415232400979003c6130b27a9
Reviewed-on: https://chromium-review.googlesource.com/809715Reviewed-by: default avatarAndrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Andrey Lushnikov <lushnikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522031}
parent bfcb7d68
...@@ -6261,7 +6261,6 @@ crbug.com/591099 http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.j ...@@ -6261,7 +6261,6 @@ crbug.com/591099 http/tests/devtools/elements/styles-3/styles-add-new-rule-tab.j
crbug.com/591099 http/tests/devtools/elements/styles-3/styles-add-new-rule.js [ Failure Pass ] crbug.com/591099 http/tests/devtools/elements/styles-3/styles-add-new-rule.js [ Failure Pass ]
crbug.com/591099 http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js [ Failure ] crbug.com/591099 http/tests/devtools/elements/styles-3/styles-change-node-while-editing.js [ Failure ]
crbug.com/591099 http/tests/devtools/elements/styles-3/styles-disable-inherited.js [ Failure Pass ] crbug.com/591099 http/tests/devtools/elements/styles-3/styles-disable-inherited.js [ Failure Pass ]
crbug.com/591099 http/tests/devtools/elements/styles-4/styles-history.js [ Crash ]
crbug.com/591099 http/tests/devtools/elements/styles-4/svg-style.xhtml [ Failure ] crbug.com/591099 http/tests/devtools/elements/styles-4/svg-style.xhtml [ Failure ]
crbug.com/591099 http/tests/devtools/extensions/extensions-network.html [ Failure ] crbug.com/591099 http/tests/devtools/extensions/extensions-network.html [ Failure ]
crbug.com/591099 http/tests/devtools/extensions/extensions-sidebar.html [ Failure ] crbug.com/591099 http/tests/devtools/extensions/extensions-sidebar.html [ Failure ]
......
...@@ -1673,7 +1673,6 @@ crbug.com/491764 http/tests/devtools/service-workers/user-agent-override.js [ Pa ...@@ -1673,7 +1673,6 @@ crbug.com/491764 http/tests/devtools/service-workers/user-agent-override.js [ Pa
# Fails with leak detector. # Fails with leak detector.
crbug.com/622915 [ Linux ] ietestcenter/css3/grid/grid-column-003.htm [ Skip ] crbug.com/622915 [ Linux ] ietestcenter/css3/grid/grid-column-003.htm [ Skip ]
crbug.com/733494 [ Linux ] media/autoplay/document-user-activation.html [ Skip ] crbug.com/733494 [ Linux ] media/autoplay/document-user-activation.html [ Skip ]
crbug.com/733495 [ Linux ] http/tests/devtools/elements/styles-4/styles-history.js [ Skip ]
crbug.com/769885 [ Linux ] virtual/android/fullscreen/full-screen-frameset.html [ Skip ] crbug.com/769885 [ Linux ] virtual/android/fullscreen/full-screen-frameset.html [ Skip ]
...@@ -3037,7 +3036,6 @@ crbug.com/731535 [ Win ] fast/dom/Window/window-resize-contents.html [ Failure P ...@@ -3037,7 +3036,6 @@ crbug.com/731535 [ Win ] fast/dom/Window/window-resize-contents.html [ Failure P
crbug.com/732103 [ Mac ] http/tests/shapedetection/shapedetection-cross-origin.html [ Failure Pass Timeout ] crbug.com/732103 [ Mac ] http/tests/shapedetection/shapedetection-cross-origin.html [ Failure Pass Timeout ]
# Sheriff failures 2017-06-14 # Sheriff failures 2017-06-14
crbug.com/733357 [ Win Mac ] http/tests/devtools/elements/styles-4/styles-history.js [ Failure Pass ]
crbug.com/733448 http/tests/devtools/extensions/extensions-network.html [ Failure Pass ] crbug.com/733448 http/tests/devtools/extensions/extensions-network.html [ Failure Pass ]
crbug.com/737959 http/tests/misc/object-image-load-outlives-gc-without-crashing.html [ Failure Pass ] crbug.com/737959 http/tests/misc/object-image-load-outlives-gc-without-crashing.html [ Failure Pass ]
......
Tests resources panel history.
Running: testSetUp
Running: testSetResourceContentMinor
History length: 0
Running: testSetResourceContentMajor
History length: 1
Item 0:
body {
margin: 20px;
padding: 10px;
}
Running: testSetContentViaModelMinor
History length: 1
Item 0:
body {
margin: 20px;
padding: 10px;
}
Running: testSetContentViaModelMajor
History length: 2
Item 0:
body {
margin: 20px;
padding: 10px;
}
Item 1:
body {
margin:30px;
padding: 10px;
}
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(async function() {
TestRunner.addResult(`Tests resources panel history.\n`);
await TestRunner.loadModule('elements_test_runner');
await TestRunner.loadModule('application_test_runner');
await TestRunner.showPanel('elements');
await TestRunner.addStylesheetTag('../styles/resources/styles-history.css');
ApplicationTestRunner.runAfterCachedResourcesProcessed(runTestSuite);
var uiSourceCode;
function runTestSuite() {
TestRunner.runTestSuite([
function testSetUp(next) {
function visitUISourceCodes(currentUISourceCode) {
if (currentUISourceCode.url().indexOf('styles-history.css') === -1)
return;
uiSourceCode = currentUISourceCode;
next();
}
Workspace.workspace.uiSourceCodes().forEach(visitUISourceCodes);
},
function testSetResourceContentMinor(next) {
TestRunner.addSniffer(Bindings.StyleFile.prototype, '_styleFileSyncedForTest', styleUpdatedMinor);
uiSourceCode.setWorkingCopy('body {\n margin: 15px;\n padding: 10px;\n}');
function styleUpdatedMinor() {
dumpHistory(next)();
}
},
function testSetResourceContentMajor(next) {
TestRunner.addSniffer(Bindings.StyleFile.prototype, '_styleFileSyncedForTest', styleUpdatedMinor);
uiSourceCode.setWorkingCopy('body {\n margin: 20px;\n padding: 10px;\n}');
function styleUpdatedMinor() {
TestRunner.addSniffer(Bindings.StyleFile.prototype, '_styleFileSyncedForTest', styleUpdatedMajor);
uiSourceCode.commitWorkingCopy(function() {});
function styleUpdatedMajor() {
dumpHistory(next)();
}
}
},
function testSetContentViaModelMinor(next) {
styleSheetForResource(step1);
function step1(style) {
var property = getLiveProperty(style, 'margin');
property.setText('margin:25px;', false, true).then(dumpHistory(next));
}
},
function testSetContentViaModelMajor(next) {
styleSheetForResource(step1);
function step1(style) {
var property = getLiveProperty(style, 'margin');
TestRunner.addSniffer(Workspace.UISourceCode.prototype, 'addRevision', dumpHistory(next));
property.setText('margin:30px;', true, true);
}
}
]);
}
function styleSheetForResource(callback) {
ElementsTestRunner.nodeWithId('mainBody', onNodeSelected);
function onNodeSelected(node) {
TestRunner.CSSAgent.invoke_getMatchedStylesForNode({nodeId: node.id}).then(onMatchedStylesForNode);
}
function onMatchedStylesForNode(response) {
var error = response[Protocol.Error];
if (error) {
TestRunner.addResult('error: ' + error);
TestRunner.completeTest();
return;
}
for (var matchedStyle of response.matchedCSSRules) {
var rule = matchedStyle.rule;
if (rule.origin !== 'regular')
continue;
callback(new SDK.CSSStyleDeclaration(TestRunner.cssModel, null, rule.style));
return;
}
TestRunner.addResult('error: did not find any regular rule');
TestRunner.completeTest();
}
}
function dumpHistory(next) {
function result() {
TestRunner.addResult('History length: ' + uiSourceCode.history().length);
for (var i = 0; i < uiSourceCode.history().length; ++i) {
TestRunner.addResult('Item ' + i + ':');
TestRunner.addResult(uiSourceCode.history()[i].content);
}
next();
}
return result;
}
function getLiveProperty(style, name) {
for (var property of style.allProperties()) {
if (!property.activeInStyle())
continue;
if (property.name === name)
return property;
}
return null;
}
})();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment