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

Side by Side Diff: LayoutTests/dart/fib.html

Issue 9188009: Things to unfork. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 8 years, 11 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
« no previous file with comments | « LayoutTests/dart/fib.dart ('k') | LayoutTests/dart/fib-app.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3
4 <script type="application/dart">
5 #import('dart:dom');
6
7 // FIXME: Make this a unit test.
8 HTMLBodyElement get body() { return document.body; }
9
10 void log(String msg) {
11 HTMLElement element = document.createElement('div');
12 element.innerHTML = msg;
13 body.appendChild(element);
14 }
15
16 int fib(int n) {
17 if (n < 2)
18 return n;
19 else
20 return fib(n - 1) + fib(n - 2);
21 }
22
23 void main() {
24 if (null !== layoutTestController) {
25 layoutTestController.dumpAsText();
26 }
27 log("fib(10) = " + fib(10));
28 if (fib(10) != 55) {
29 log("FAIL");
30 return;
31 }
32 log("PASS");
33 }
34 </script>
35
36 <script>
37 // Fake script to trigger Dart execution.
38 </script>
39
40 </body>
41 </html>
OLDNEW
« no previous file with comments | « LayoutTests/dart/fib.dart ('k') | LayoutTests/dart/fib-app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698