Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Range / range-dom-node-removed-assert.html
blob6e2b2f14d51ba4f7ab15992f5ae18612fc3f7794
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <div id="sample"></div>
5 <div id="log"></div>
6 <script>
7 var moved = false;
8 var sample = document.getElementById('sample');
9 var range = document.createRange();
10 range.setStart(sample, 0);
11 range.setEnd(sample, 0);
12 sample.addEventListener('DOMNodeRemoved', function() {
13 if (moved)
14 return;
15 moved = true;
16 document.implementation.createDocument('', null).appendChild(sample);
17 });
18 test(function() {
19 var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html');
20 try {
21 doc.documentElement.appendChild(sample);
22 } catch (exception) {
23 assert_equals(exception.toString(), 'NotFoundError: Failed to execute \'appendChild\' on \'Node\': The node to be removed is no longer a child of this node. Perhaps it was moved in response to a mutation?');
25 });
26 </script>