You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: closure/goog/events/filedrophandler_test.js
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -248,3 +248,49 @@ function testPreventDropOutside() {
248
248
// Assert also that the drop effect is set to 'none'.
249
249
assertEquals('none',dt.dropEffect);
250
250
}
251
+
252
+
functiontestIEBugNo811625(){
253
+
// See more at https://github.com/google/closure-library/issues/485
254
+
// or https://connect.microsoft.com/IE/feedback/details/811625/cant-get-datatransfer-effectallowed-set-in-another-window-raises-a-script65535-error
255
+
varpreventDefault=false;
256
+
varexpectedfiles=[{fileName: 'file1.jpg'}];
257
+
vardt={types: ['Files'],files: expectedfiles};
258
+
// we construct a mock DataTransfer object and define a setter will throw SCRIPT65535 when attempt to set effectAllowed to simulate the IEBug #811625
259
+
dt.__defineSetter__('effectAllowed',function(v){
260
+
thrownewError("SCRIPT65535: see more at https://connect.microsoft.com/IE/feedback/details/811625/cant-get-datatransfer-effectallowed-set-in-another-window-raises-a-script65535-error")
261
+
})
262
+
263
+
// Assert that default actions are prevented on dragenter.
0 commit comments