Commit 250cef84 authored by Arthur Sonzogni's avatar Arthur Sonzogni Committed by Commit Bot

Fix test: drag-files-to-editable-element.html

The tested feature regressed, but no one realized it, because the test continued
to pass.

Instead of displaying the filenames in the <div>, a new navigation to the file
happened. Starting the navigation causes the current Document to stop and the
test to finish early. The tests finished before it has executed any assertions.

This CL fixes the test, but not the regression.

Bug: 821455, 831155
Change-Id: I61b9cca80677ca2caed72b0e9cf6074f73c2ad6a
Reviewed-on: https://chromium-review.googlesource.com/1094879
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566800}
parent 6c0dc5d1
......@@ -2037,7 +2037,7 @@ crbug.com/698135 external/wpt/editing/run/delete.html [ Crash Failure Timeout ]
crbug.com/813098 external/wpt/editing/run/removeformat.html [ Timeout Pass ]
crbug.com/821455 [ Linux ] editing/pasteboard/drag-files-to-editable-element.html [ Failure Pass ]
crbug.com/821455 editing/pasteboard/drag-files-to-editable-element.html [ Failure ]
crbug.com/688613 external/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html [ Skip ]
crbug.com/688613 virtual/feature-policy-permissions/external/wpt/mediacapture-streams/MediaStreamTrack-MediaElement-disabled-audio-is-silence.https.html [ Skip ]
......
......@@ -11,15 +11,22 @@ description('If we drag files onto an editable area, then the filenames should b
var result;
jsTestIsAsync = true;
function startTest()
{
var editable = document.getElementById("editable");
if (window.eventSender) {
dragFilesOntoEditable(['foo', 'bar', 'baz']);
dragFilesOntoEditable([
'./resources/drag-files-to-editable-element-fail',
'./resources/foo',
'./resources/bar']);
result = editable.innerHTML.replace(/file.*?LayoutTests/g, "LayoutTests");
shouldBeEqualToString('result', '<div>LayoutTests/editing/pasteboard/foo</div><div>LayoutTests/editing/pasteboard/bar</div><div>LayoutTests/editing/pasteboard/baz</div>');
shouldBeEqualToString('result',
'<div>LayoutTests/editing/pasteboard/resources/drag-files-to-editable-element-fails</div>'+
'<div>LayoutTests/editing/pasteboard/resources/foo</div>'+
'<div>LayoutTests/editing/pasteboard/resources/bar</div>');
editable.innerHTML = '';
window.stop();
finishJSTest();
}
}
......
If we drag files onto an editable area, then the filenames should be inserted
into the editable area. That's not what happened. Instead, the browser navigated
to the first file.
TEST FAILED.
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