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

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 review 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
yosin_UTC9 2015/09/01 01:33:29 nit: We don't need to have an extra blank line.
majidvp 2015/09/01 15:33:53 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script type="text/javascript">
6 "use strict";
yosin_UTC9 2015/09/01 01:33:29 nit: We don't need to have "use strict", because t
majidvp 2015/09/01 15:33:53 That is correct. Given it is irrelevant I prefer t
7
8 async_test(function(t) {
9 document.addEventListener("DOMContentLoaded", t.step_func(function() {
10 var iframe1 = document.createElementNS("http://www.w3.org/1999/xhtml", "if rame");
11 iframe1.setAttribute("srcdoc", "ABC");
12 document.documentElement.appendChild(iframe1);
13 var document1 = document.implementation.createDocument("", null);
14 iframe1.addEventListener("DOMFocusOut", function() {
15 document1.adoptNode(iframe1);
16 });
17 iframe1.focus();
18
19 iframe1.addEventListener("load", t.step_func(function() {
20 document.designMode = "on";
21
22 var clientRect = iframe1.getBoundingClientRect();
23 var x = clientRect.left + 10;
24 var y = clientRect.top + 10;
25 if (window.eventSender)
yosin_UTC9 2015/09/01 01:33:29 nit: It is better to check |window.eventSender| at
majidvp 2015/09/01 15:33:53 Done.
26 eventSender.gestureLongPress(x, y);
27 else
28 assert_unreached("This test requires window.eventSender to exist");
29
30 // Test passes if it does not crash and reaches this point
31 setTimeout(t.done.bind(t), 0);
32 }));
33 }));
34 }, "Test longpress selection does not crash");
35 </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