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

Side by Side Diff: dart/third_party/pkg/js/test/js/browser_tests_bootstrap.js

Issue 57393002: Version 0.8.10.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 var x = 42;
6
7 var _x = 123;
8
9 var myArray = ["value1"];
10
11 var foreignDoc = (function(){
12 var doc = document.implementation.createDocument("", "root", null);
13 var element = doc.createElement('element');
14 element.setAttribute('id', 'abc');
15 doc.documentElement.appendChild(element);
16 return doc;
17 })();
18
19 function razzle() {
20 return x;
21 }
22
23 function getTypeOf(o) {
24 return typeof(o);
25 }
26
27 function varArgs() {
28 var args = arguments;
29 var sum = 0;
30 for (var i = 0; i < args.length; ++i) {
31 sum += args[i];
32 }
33 return sum;
34 }
35
36 function Foo(a) {
37 this.a = a;
38 }
39
40 Foo.b = 38;
41
42 Foo.prototype.bar = function() {
43 return this.a;
44 }
45 Foo.prototype.toString = function() {
46 return "I'm a Foo a=" + this.a;
47 }
48
49 var container = new Object();
50 container.Foo = Foo;
51
52 function isArray(a) {
53 return a instanceof Array;
54 }
55
56 function checkMap(m, key, value) {
57 if (m.hasOwnProperty(key))
58 return m[key] == value;
59 else
60 return false;
61 }
62
63 function invokeCallback() {
64 return callback();
65 }
66
67 function invokeCallbackWith11params() {
68 return callbackWith11params(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11);
69 }
70
71 function returnElement(element) {
72 return element;
73 }
74
75 function getElementAttribute(element, attr) {
76 return element.getAttribute(attr);
77 }
78
79 function addClassAttributes(list) {
80 var result = "";
81 for (var i=0; i<list.length; i++) {
82 result += list[i].getAttribute("class");
83 }
84 return result;
85 }
86
87 function getNewDivElement() {
88 return document.createElement("div");
89 }
90
91 function testJsMap(callback) {
92 var result = callback();
93 return result['value'];
94 }
95
96 function Bar() {
97 return "ret_value";
98 }
99 Bar.foo = "property_value";
OLDNEW
« no previous file with comments | « dart/third_party/pkg/js/test/js/browser_tests.html ('k') | dart/third_party/pkg/js/test/js_wrapping/browser_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698