Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Unified Diff: LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html

Issue 1175223003: TreatReturnedNullStringAs=undefined removed from DataTransfer.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/bogus-dropEffect-effectAllowed-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html
diff --git a/LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html b/LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html
index fb7aa5dd8b2df6246e18150f12af61490433a600..caf183f56be64a9e8e65708deb25fdc4cd7d3735 100644
--- a/LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html
+++ b/LayoutTests/fast/events/bogus-dropEffect-effectAllowed.html
@@ -13,34 +13,34 @@
var dropEffectElem;
var consoleElm;
var event;
-
+
window.onload = function()
{
dragMe = document.getElementById("dragMe");
dropTarget = document.getElementById("dropTarget");
consoleElm = document.getElementById("console");
-
+
if (!dragMe || !dropTarget || !consoleElm)
return;
-
+
dragMe.ondragstart = dragStart;
dragMe.ondragend = dragEnd;
-
+
dropTarget.ondragenter = dragEntered;
dropTarget.ondragover = dragOver;
dropTarget.ondrop = drop;
-
+
runTest();
}
-
+
function dragStart(e)
{
var validEffectAllowedList = ["all", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "none", "uninitialized"];
var effectAllowedListToTest = ["all", "copy", "bogus", "copyLink", "wrong", "copyMove", "linkCopyMove", "link",
- "linkMove", "move", "none", "uninitialized", "dummy", "bogus", "fake", "illegal"];
-
+ "linkMove", "move", "none", "uninitialized", "dummy", "bogus", "fake", "illegal", null, undefined , ""];
+
event = e;
-
+
for (var i = 0; i < effectAllowedListToTest.length; i++) {
var effectAllowedBefore = e.dataTransfer.effectAllowed;
e.dataTransfer.effectAllowed = effectAllowedListToTest[i];
@@ -49,33 +49,33 @@
else
shouldBeEqualToString("event.dataTransfer.effectAllowed", effectAllowedBefore);
}
-
+
e.dataTransfer.setData('Text', e.target.textContent);
}
-
+
function dragEnd(e)
{
return;
}
-
+
function dragEntered(e)
{
dragEnteredAndUpdated(e);
}
-
+
function dragOver(e)
{
dragEnteredAndUpdated(e);
}
-
+
function dragEnteredAndUpdated(e)
{
var validDropEffectList = ["none", "copy", "link", "move", "link"];
var dropEffectListToTest = ["all", "copy", "bogus", "copyLink", "wrong", "copyMove", "linkCopyMove", "link",
- "linkMove", "move", "none", "uninitialized", "dummy", "bogus", "fake", "illegal"];
-
+ "linkMove", "move", "none", "uninitialized", "dummy", "bogus", "fake", "illegal", null, undefined , ""];
+
event = e;
-
+
for (var i = 0; i < dropEffectListToTest.length; i++) {
var dropEffectBefore = e.dataTransfer.dropEffect;
e.dataTransfer.dropEffect = dropEffectListToTest[i];
@@ -89,12 +89,12 @@
cancelDrag(e);
}
-
+
function drop(e)
{
cancelDrag(e);
}
-
+
function cancelDrag(e)
{
e.preventDefault();
@@ -104,15 +104,15 @@
{
if (!window.eventSender)
return;
-
+
if (window.testRunner)
testRunner.dumpAsText();
-
+
var startX = dragMe.offsetLeft + 10;
var startY = dragMe.offsetTop + dragMe.offsetHeight / 2;
var endX = dropTarget.offsetLeft + 10;
var endY = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
-
+
eventSender.mouseMoveTo(startX, startY);
eventSender.mouseDown();
eventSender.leapForward(100);
« no previous file with comments | « no previous file | LayoutTests/fast/events/bogus-dropEffect-effectAllowed-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698