Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / local-object.html
blobfeb054e9ac2b5635d8e30dac50e6ad79cee0f3c8
1 <html>
2 <head>
3 <script src="../http/tests/inspector/inspector-test.js"></script>
4 <script>
6 function test()
8 var object = [6, 28, 496];
9 var localObject = WebInspector.RemoteObject.fromLocalObject(object);
11 function getItem(index)
13 return this[index];
16 function getItemCallback(result)
18 InspectorTest.addResult("getItem(1) result: " + result);
21 function compareAndSwap(index, value, newValue)
23 if (this[index] !== value)
24 throw "Data corrupted";
25 this[index] = newValue;
26 return "Done";
29 function compareAndSwapCallback(result, wasThrown)
31 InspectorTest.addResult("compareAndSwap(1, 28, 42) result: " + result.description);
34 function exceptionCallback(result, wasThrown)
36 InspectorTest.addResult("compareAndSwap(1, 28, 42) throws exception: " + wasThrown);
39 function guessWhat()
41 return 42;
44 function guessWhatCallback(result, wasThrown)
46 InspectorTest.addResult("guessWhat() result: " + result.description);
49 localObject.callFunctionJSON(getItem, [{value: 1}], getItemCallback);
50 localObject.callFunction(compareAndSwap, [{value: 1}, {value: 28}, {value: 42}], compareAndSwapCallback);
51 localObject.callFunction(compareAndSwap, [{value: 1}, {value: 28}, {value: 42}], exceptionCallback);
52 localObject.callFunction(guessWhat, undefined, guessWhatCallback);
53 localObject.callFunction(compareAndSwap, [{value: 0}, {value: 6}, {value: 7}]);
54 InspectorTest.addResult("Final value of object: [" + object.join(", ") + "]");
55 InspectorTest.completeTest();
58 </script>
59 </head>
61 <body onload="runTest()">
62 <p>Tests callFunction on local remote objects.</p>
63 </body>
64 </html>