Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / paste-event-only-once.html
blob774d92d6125d2f1bf426e0d84803548bba11eb1d
1 <body>
2 <p>Pasting in the text area should only fire one paste event.</p>
3 <textarea id="test">Content</textarea>
4 <p id="results">FAILED</p>
5 </body>
6 <script src="../editing.js"></script>
7 <script>
8 function editingTest()
10 var firedCount = 0;
11 document.getElementById("test").addEventListener("paste", function(){
12 firedCount++
13 }, false);
15 document.getElementById("test").focus();
16 execSelectAllCommand();
17 execCopyCommand();
18 execPasteCommand();
20 if (firedCount == 1)
21 document.getElementById("results").innerText = "PASSED";
22 else
23 document.getElementById("results").innerText = "FAILED firedCount:" + firedCount;
26 runDumpAsTextEditingTest(false);
27 </script>