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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/dart/fib.dart ('k') | LayoutTests/dart/fib-app.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/dart/fib.html
diff --git a/LayoutTests/dart/fib.html b/LayoutTests/dart/fib.html
new file mode 100644
index 0000000000000000000000000000000000000000..cbc37339d26175dee023fc7098860cc869e89ec7
--- /dev/null
+++ b/LayoutTests/dart/fib.html
@@ -0,0 +1,39 @@
+<html>
+<body>
+
+<script type="application/dart">
+import 'dart:html';
+
+// FIXME: Make this a unit test.
+BodyElement get body => document.body;
+
+void log(String msg) {
+ Element element = new Element.tag('div');
+ element.innerHtml = msg;
+ body.nodes.add(element);
+}
+
+int fib(int n) {
+ if (n < 2)
+ return n;
+ else
+ return fib(n - 1) + fib(n - 2);
+}
+
+void main() {
+ log("fib(10) = ${fib(10)}");
+ if (fib(10) != 55) {
+ log("FAIL");
+ return;
+ }
+ log("PASS");
+}
+</script>
+
+<script>
+ if (window.testRunner)
+ window.testRunner.dumpAsText();
+</script>
+
+</body>
+</html>
« 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