| Index: third_party/WebKit/LayoutTests/editing/execCommand/paste-1.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/paste-1.html b/third_party/WebKit/LayoutTests/editing/execCommand/paste-1.html
|
| index 3877e339894c6c94936fd9fbbc0f067d6ec55f40..815476e7472fa1be20a8371b157e6f1f38d07d77 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/execCommand/paste-1.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/paste-1.html
|
| @@ -1,23 +1,25 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <script>
|
| -if (window.testRunner)
|
| - testRunner.dumpEditingCallbacks();
|
| -
|
| -function foo() {
|
| +var tester = async_test('iframe');
|
| +function runTest() {
|
| + if (window.internals)
|
| + internals.settings.setEditingBehavior('win');
|
| var frame = frames[0];
|
| - var sel = frame.getSelection();
|
| + var selection = frame.getSelection();
|
| var doc = frame.document;
|
| -
|
| - sel.collapse(doc.body, 0);
|
| - doc.execCommand("InsertText", false, "foo bar baz");
|
| - sel.modify("extend", "backward", "word");
|
| - doc.execCommand("Cut");
|
| - doc.execCommand("Paste");
|
| - if (window.testRunner)
|
| - window.testRunner.notifyDone();
|
| +
|
| + selection.collapse(doc.body, 0);
|
| + doc.execCommand('InsertText', false, 'foo bar baz');
|
| + selection.modify('extend', 'backward', 'word');
|
| + doc.execCommand('Cut');
|
| + doc.execCommand('Paste');
|
| +
|
| + tester.step(function() { assert_equals(doc.body.innerHTML.replace(/ /, ' ', 'g'), 'foo bar baz'); });
|
| + tester.done();
|
| }
|
| -if (window.testRunner)
|
| - window.testRunner.waitUntilDone();
|
| </script>
|
| -
|
| <p>This tests cut/paste inside an editable iframe. You should see 'foo bar baz' below.</p>
|
| -<iframe src="../resources/contenteditable-iframe-src.html" onload="foo();"></iframe>
|
| +<iframe srcdoc="<body contenteditable></body>" onload="runTest()"></iframe>
|
| +<div id="log"></div>
|
|
|