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

Side by Side Diff: LayoutTests/inspector/console/inspect-html-all-collection.html

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script> 4 <script>
5 5
6 function test() 6 function test()
7 { 7 {
8 InspectorTest.RuntimeAgent.evaluate("document.all", "console", false, didGet HTMLAllCollection.bind(this)); 8 InspectorTest.RuntimeAgent.evaluate("document.all", "console", false, didGet HTMLAllCollection.bind(this));
9 function didGetHTMLAllCollection(error, result, wasThrown) 9 function didGetHTMLAllCollection(error, result, wasThrown)
10 { 10 {
11 if (error || wasThrown) { 11 if (error || wasThrown) {
12 InspectorTest.addResult("FAILED: " + error); 12 InspectorTest.addResult("FAILED: " + error);
13 InspectorTest.completeTest(); 13 InspectorTest.completeTest();
14 return; 14 return;
15 } 15 }
16 var htmlAllCollection = WebInspector.runtimeModel.createRemoteObject(res ult); 16 var htmlAllCollection = InspectorTest.runtimeModel.createRemoteObject(re sult);
17 htmlAllCollection.callFunctionJSON("function(collection) { return this.l ength + collection.length; }", [{objectId: htmlAllCollection.objectId}], didGetL ength.bind(this)); 17 htmlAllCollection.callFunctionJSON("function(collection) { return this.l ength + collection.length; }", [{objectId: htmlAllCollection.objectId}], didGetL ength.bind(this));
18 } 18 }
19 19
20 function didGetLength(len) 20 function didGetLength(len)
21 { 21 {
22 if (!len || typeof len !== "number") 22 if (!len || typeof len !== "number")
23 InspectorTest.addResult("FAILED: unexpected document.all.length: " + len); 23 InspectorTest.addResult("FAILED: unexpected document.all.length: " + len);
24 else 24 else
25 InspectorTest.addResult("PASSED: retrieved length of document.all"); 25 InspectorTest.addResult("PASSED: retrieved length of document.all");
26 InspectorTest.completeTest(); 26 InspectorTest.completeTest();
27 } 27 }
28 } 28 }
29 29
30 </script> 30 </script>
31 </head> 31 </head>
32 32
33 <body onload="runTest()"> 33 <body onload="runTest()">
34 <p> 34 <p>
35 Tests that HTMLAllCollection properties can be inspected. 35 Tests that HTMLAllCollection properties can be inspected.
36 </p> 36 </p>
37 37
38 </body> 38 </body>
39 </html> 39 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/console/console-timestamp.html ('k') | LayoutTests/inspector/elements/attribute-modified-ns.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698