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

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

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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
« 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:html';
6
7 // FIXME: Make this a unit test.
8 BodyElement get body => document.body;
9
10 void log(String msg) {
11 Element element = new Element.tag('div');
12 element.innerHtml = msg;
13 body.nodes.add(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 log("fib(10) = ${fib(10)}");
25 if (fib(10) != 55) {
26 log("FAIL");
27 return;
28 }
29 log("PASS");
30 }
31 </script>
32
33 <script>
34 if (window.testRunner)
35 window.testRunner.dumpAsText();
36 </script>
37
38 </body>
39 </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