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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/dom/dom-setOuterHTML.html

Issue 2955943002: DevTools: migrate inspector-protocol/dom tests to a new test runner (Closed)
Patch Set: rebaseline Created 3 years, 5 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
OLDNEW
(Empty)
1 <html>
2 <head>
3 <meta charset="utf8">
4 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
5 <script>
6
7 function test()
8 {
9 InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
10
11 var bodyId;
12 function onGotDocument(msg)
13 {
14 if (InspectorTest.completeTestIfError(msg))
15 return;
16 InspectorTest.sendCommand("DOM.querySelector", { nodeId: msg.result.root .nodeId, selector: "body" }, onQuerySelector1);
17 InspectorTest.sendCommand("DOM.querySelector", { nodeId: msg.result.root .nodeId, selector: "#id" }, onQuerySelector2);
18 }
19
20 function onQuerySelector1(msg)
21 {
22 if (InspectorTest.completeTestIfError(msg))
23 return;
24 bodyId = msg.result.nodeId;
25 }
26
27 function onQuerySelector2(msg)
28 {
29 if (InspectorTest.completeTestIfError(msg))
30 return;
31 InspectorTest.sendCommand("DOM.setOuterHTML", { nodeId: msg.result.nodeI d, outerHTML: "<div>Привет мир 1</div>" }, onSetOuterHTML);
32 }
33
34 function onSetOuterHTML(msg)
35 {
36 if (InspectorTest.completeTestIfError(msg))
37 return;
38 InspectorTest.sendCommand("DOM.getOuterHTML", { nodeId: bodyId }, onGetO uterHTML);
39 }
40
41 function onGetOuterHTML(msg)
42 {
43 InspectorTest.completeTest();
44 }
45 }
46
47 </script>
48 </head>
49 <body onload="runTest()">
50 <div id="id">Привет мир</div>
51 <div>Привет мир 2</div>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698