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

Side by Side Diff: chrome_test/tests/extension_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 | « chrome_test/tcpapp/tcp.js ('k') | chrome_test/tests/processes_test.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 TEST, EXPECT_EQ, ASSERT_EQ, chrometest */
8
7 'use strict'; 9 'use strict';
8 10
9
10 TEST('ExtensionTest', 'testGetAllExtensions', function() { 11 TEST('ExtensionTest', 'testGetAllExtensions', function() {
11 return chrometest.getAllExtensions().then(function(extensions) { 12 return chrometest.getAllExtensions().then(function(extensions) {
12 ASSERT_EQ(3, extensions.length, 'there should be three extensions'); 13 ASSERT_EQ(3, extensions.length, 'there should be three extensions');
13 var expected = [ 14 var expected = [
14 'Chrome Testing Extension', 15 'Chrome Testing Extension',
15 'Ping Test Extension', 16 'Ping Test Extension',
16 'TCP Interface', 17 'TCP Interface',
17 ]; 18 ];
18 expected.sort(); 19 expected.sort();
19 var actual = []; 20 var actual = [];
(...skipping 24 matching lines...) Expand all
44 }).then(function(port) { 45 }).then(function(port) {
45 keptPort = port; 46 keptPort = port;
46 keptPort.postMessage({'name': 'ping', 'data': data}); 47 keptPort.postMessage({'name': 'ping', 'data': data});
47 return port.wait(); 48 return port.wait();
48 }).then(function(msg) { 49 }).then(function(msg) {
49 EXPECT_EQ('pong', msg.name, 'we should have gotten a pong'); 50 EXPECT_EQ('pong', msg.name, 'we should have gotten a pong');
50 EXPECT_EQ(data, msg.data, 'we should get back what we sent'); 51 EXPECT_EQ(data, msg.data, 'we should get back what we sent');
51 keptPort.disconnect(); 52 keptPort.disconnect();
52 }); 53 });
53 }); 54 });
OLDNEW
« no previous file with comments | « chrome_test/tcpapp/tcp.js ('k') | chrome_test/tests/processes_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698