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

Side by Side Diff: LayoutTests/editing/selection/longpress-selection-in-iframe-removed-crash.html

Issue 1315983004: Fix use-after-free bug in long press selection (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address feedback Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script type="text/javascript">
5 "use strict";
6
7 async_test(function(t) {
8 if (!window.eventSender)
9 assert_unreached("This test requires window.eventSender to exist");
10
11 document.addEventListener("DOMContentLoaded", t.step_func(function() {
12 var iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "if rame");
13 iframe1.setAttribute("srcdoc", "ABC");
14 document.documentElement.appendChild(iframe1);
15 var document1 = document.implementation.createDocument("", null);
16 iframe1.addEventListener("DOMFocusOut", function() {
17 document1.adoptNode(iframe1);
18 });
19 iframe1.focus();
20
21 iframe1.addEventListener("load", t.step_func(function() {
22 document.designMode = "on";
23
24 var clientRect = iframe1.getBoundingClientRect();
25 var x = clientRect.left + 10;
26 var y = clientRect.top + 10;
27 eventSender.gestureLongPress(x, y);
28
29 // Test passes if it does not crash and reaches this point
30 setTimeout(t.done.bind(t), 0);
31 }));
32 }));
33 }, "Test longpress selection does not crash");
34 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698