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

Unified Diff: test/mjsunit/debug-backtrace-text.js

Issue 8888006: Make more JS files beter match the coding standard. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
Index: test/mjsunit/debug-backtrace-text.js
diff --git a/test/mjsunit/debug-backtrace-text.js b/test/mjsunit/debug-backtrace-text.js
index 61648fa4e2e6ee4e8554556db02e18acd93fe0b1..561e370909fca765c0d5cdbd36f7dc7310da72fc 100644
--- a/test/mjsunit/debug-backtrace-text.js
+++ b/test/mjsunit/debug-backtrace-text.js
@@ -31,19 +31,20 @@
function Point(x, y) {
this.x = x;
this.y = y;
-};
+}
Point.prototype.distanceTo = function(p) {
debugger;
- return Math.sqrt(Math.pow(Math.abs(this.x - p.x), 2) + Math.pow(Math.abs(this.y - p.y), 2))
-}
+ return Math.sqrt(Math.pow(Math.abs(this.x - p.x), 2) +
+ Math.pow(Math.abs(this.y - p.y), 2));
+};
p1 = new Point(1,1);
p2 = new Point(2,2);
p1.distanceTo = function(p) {
return p.distanceTo(this);
-}
+};
function distance(p, q) {
return p.distanceTo(q);
@@ -56,7 +57,7 @@ function createPoint(x, y) {
a=[1,2,distance];
// Get the Debug object exposed from the debug context global object.
-Debug = debug.Debug
+Debug = debug.Debug;
testConstructor = false; // Flag to control which part of the test is run.
listenerCalled = false;
@@ -72,8 +73,7 @@ function safeEval(code) {
function listener(event, exec_state, event_data, data) {
try {
- if (event == Debug.DebugEvent.Break)
- {
+ if (event == Debug.DebugEvent.Break) {
Rico 2011/12/08 10:24:37 indention
if (!testConstructor) {
// The expected backtrace is
// 0: Call distance on Point where distance is a property on the prototype
@@ -97,19 +97,19 @@ function listener(event, exec_state, event_data, data) {
}
}
} catch (e) {
- exception = e
- };
-};
+ exception = e;
+ }
+}
// Add the debug event listener.
Debug.setListener(listener);
// Set a break point and call to invoke the debug event listener.
-a[2](p1, p2)
+a[2](p1, p2);
// Make sure that the debug event listener vas invoked.
assertTrue(listenerCalled);
-assertFalse(exception, "exception in listener")
+assertFalse(exception, "exception in listener");
// Set a break point and call to invoke the debug event listener.
listenerCalled = false;
@@ -119,4 +119,4 @@ createPoint(0, 0);
// Make sure that the debug event listener vas invoked (again).
assertTrue(listenerCalled);
-assertFalse(exception, "exception in listener")
+assertFalse(exception, "exception in listener");

Powered by Google App Engine
This is Rietveld 408576698