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

Side by Side Diff: ports/gdb/tests/gdb_background_test.js

Issue 1415743013: Run jshint over all JavaScript files (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@repo_conf
Patch Set: Created 5 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
« no previous file with comments | « ports/gdb/tests/debugger_test.js ('k') | ports/gforth/gforth.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* globals ASSERT_EQ, ASSERT_LE, ASSERT_GE, EXPECT_EQ, TEST_F, TEST */
8 /* globals chrometest, TestModuleTest, waitForExtraModuleCount */
9 /* globals waitIgnoringTerminal */
10
7 'use strict'; 11 'use strict';
8 12
9 function GdbExtensionTestModuleTest() { 13 function GdbExtensionTestModuleTest() {
10 TestModuleTest.call(this); 14 TestModuleTest.call(this);
11 this.gdbExt = null; 15 this.gdbExt = null;
12 } 16 }
13 GdbExtensionTestModuleTest.prototype = new TestModuleTest(); 17 GdbExtensionTestModuleTest.prototype = new TestModuleTest();
14 18
15 GdbExtensionTestModuleTest.prototype.setUp = function() { 19 GdbExtensionTestModuleTest.prototype.setUp = function() {
16 var self = this; 20 var self = this;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }; 122 };
119 123
120 /** 124 /**
121 * Wait for expected writes from gdb. 125 * Wait for expected writes from gdb.
122 * @param {Array.String} writes A list of writes to expect from GDB. 126 * @param {Array.String} writes A list of writes to expect from GDB.
123 * @return {Promise} A promise to wait. 127 * @return {Promise} A promise to wait.
124 */ 128 */
125 GdbExtensionTestModuleTest.prototype.waitForGdbReply = function(lines) { 129 GdbExtensionTestModuleTest.prototype.waitForGdbReply = function(lines) {
126 var self = this; 130 var self = this;
127 function checkLine() { 131 function checkLine() {
128 if (lines.length == 0) { 132 if (lines.length === 0) {
129 return; 133 return;
130 } 134 }
131 return Promise.resolve().then(function() { 135 return Promise.resolve().then(function() {
132 return self.gdbExt.wait(); 136 return self.gdbExt.wait();
133 }).then(function(msg) { 137 }).then(function(msg) {
134 ASSERT_EQ('message', msg.name, 'expecting a message'); 138 ASSERT_EQ('message', msg.name, 'expecting a message');
135 var prefix = msg.data.slice(0, 3); 139 var prefix = msg.data.slice(0, 3);
136 var data = msg.data.slice(3); 140 var data = msg.data.slice(3);
137 EXPECT_EQ('gdb', prefix, 'expected gdb term message'); 141 EXPECT_EQ('gdb', prefix, 'expected gdb term message');
138 EXPECT_EQ(lines[0], data, 'expect matching line'); 142 EXPECT_EQ(lines[0], data, 'expect matching line');
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 return chrometest.proxyExtension('Native Client GDB'); 343 return chrometest.proxyExtension('Native Client GDB');
340 }).then(function(gdbExt) { 344 }).then(function(gdbExt) {
341 self.gdbExt = gdbExt; 345 self.gdbExt = gdbExt;
342 self.gdbExt.postMessage({name: 'installCheck'}); 346 self.gdbExt.postMessage({name: 'installCheck'});
343 return self.gdbExt.wait(); 347 return self.gdbExt.wait();
344 }).then(function(msg) { 348 }).then(function(msg) {
345 EXPECT_EQ('installCheckReply', msg.name, 'we are installed'); 349 EXPECT_EQ('installCheckReply', msg.name, 'we are installed');
346 self.gdbExt.disconnect(); 350 self.gdbExt.disconnect();
347 }); 351 });
348 }); 352 });
OLDNEW
« no previous file with comments | « ports/gdb/tests/debugger_test.js ('k') | ports/gforth/gforth.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698