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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/execCommand/find-after-replace.html

Issue 2300553002: Convert editing/execCommand/find-after-replace.html to use w3c test harness (Closed)
Patch Set: 2016-08-31T15:00:58 Created 4 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 | third_party/WebKit/LayoutTests/platform/android/editing/execCommand/find-after-replace-expected.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <body onload="runTest()"> 1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
2 <script> 5 <script>
3 if (window.testRunner) 6 test(() => {
4 testRunner.dumpEditingCallbacks(); 7 assert_not_equals(window.internals, undefined,
8 'This test requires window.internals to access clipboard');
9 assert_selection(
10 '<div contenteditable>|a b a</div>',
11 selection => {
12 selection.document.execCommand('findString', false, 'a b');
13 selection.document.execCommand('copy');
14 selection.document.execCommand('findString', false, 'a');
15 selection.document.execCommand('paste');
16 },
17 '<div contenteditable>a b a b|</div>');
18 }, 'simulate find and replace');
5 </script> 19 </script>
6 <p>This tests find and replace inside an editable iframe. You should see 'A B A B' below. With bug 4462420, you would see 'A B B A'.</p>
7 <iframe src="../resources/contenteditable-iframe-src.html"></iframe>
8
9 <script>
10 function runTest() {
11 document.body.offsetTop;
12
13 var frame = frames[0];
14 var sel = frame.getSelection();
15 var doc = frame.document;
16
17 sel.collapse(doc.body, 0);
18 doc.execCommand("InsertText", false, "A B A");
19 sel.collapse(doc.body, 0);
20 doc.execCommand("FindString", false, "A B");
21 doc.execCommand("Copy");
22 doc.execCommand("FindString", false, "A");
23 doc.execCommand("Paste");
24 }
25 </script>
26 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/android/editing/execCommand/find-after-replace-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698