| Index: third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html b/third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html
|
| index 5387cf9a50a06a4e00a3ec5d8499ea662af0df10..8faf1047edf7c29919ce49c1bdc4474f38cfe436 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/execCommand/paste-2.html
|
| @@ -1,24 +1,27 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| <script>
|
| -if (window.testRunner)
|
| - testRunner.dumpEditingCallbacks();
|
| -
|
| +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("Copy");
|
| - doc.execCommand("Delete");
|
| - doc.execCommand("Paste");
|
| - if (window.testRunner)
|
| - window.testRunner.notifyDone();
|
| -}
|
|
|
| -if (window.testRunner)
|
| - window.testRunner.waitUntilDone();
|
| + selection.collapse(doc.body, 0);
|
| + doc.execCommand('InsertText', false, 'foo bar baz');
|
| + selection.modify('extend', 'backward', 'word');
|
| + doc.execCommand('Copy');
|
| + doc.execCommand('Delete');
|
| + doc.execCommand('Paste');
|
| +
|
| + tester.step(function() { assert_equals(doc.body.innerHTML.replace(/ /, ' ', 'g'), 'foo bar baz'); });
|
| + tester.done();
|
| +}
|
| </script>
|
| <p>This tests copy/delete/paste inside an editable iframe. You should see 'foo bar baz' below.</p>
|
| -<iframe src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
|
| +<iframe srcdoc="<body contenteditable></body>" onload="runTest()"></iframe>
|
| +<div id="log"></div>
|
|
|