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

Side by Side Diff: LayoutTests/editing/spelling/resources/util.js

Issue 19275006: Fix a use-after-free in spellcheck client (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 function log(msg) 1 function log(msg)
2 { 2 {
3 document.getElementById("console").innerHTML += (msg + "\n"); 3 document.getElementById("console").innerHTML += (msg + "\n");
4 } 4 }
5 5
6 function verifySpellTest(nretry) 6 function verifySpellTest(nretry)
7 { 7 {
8 var node = destination; 8 var node = destination;
9 if (destination.childNodes.length > 0) 9 if (destination.childNodes.length > 0)
10 node = destination.childNodes[0]; 10 node = destination.childNodes[0];
(...skipping 11 matching lines...) Expand all
22 log("FAIL Incomplete test environment"); 22 log("FAIL Incomplete test environment");
23 return; 23 return;
24 } 24 }
25 testFunctionCallback = testFunction; 25 testFunctionCallback = testFunction;
26 jsTestIsAsync = true; 26 jsTestIsAsync = true;
27 internals.settings.setAsynchronousSpellCheckingEnabled(true); 27 internals.settings.setAsynchronousSpellCheckingEnabled(true);
28 internals.settings.setSmartInsertDeleteEnabled(true); 28 internals.settings.setSmartInsertDeleteEnabled(true);
29 internals.settings.setSelectTrailingWhitespaceEnabled(false); 29 internals.settings.setSelectTrailingWhitespaceEnabled(false);
30 internals.settings.setUnifiedTextCheckerEnabled(true); 30 internals.settings.setUnifiedTextCheckerEnabled(true);
31 internals.settings.setEditingBehavior("win"); 31 internals.settings.setEditingBehavior("win");
32 var destination = document.getElementById(testElementId); 32 destination = document.getElementById(testElementId);
abarth-chromium 2013/07/17 00:01:00 Maybe: window.destination = ... to make it clear
please use gerrit instead 2013/07/17 01:11:22 Done.
33 destination.focus(); 33 destination.focus();
34 document.execCommand("InsertText", false, testText); 34 document.execCommand("InsertText", false, testText);
35 window.setTimeout(function() { verifySpellTest(10); }, 0); 35 window.setTimeout(function() { verifySpellTest(10); }, 0);
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698