OLD | NEW |
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_F, TEST, EXPECT_EQ, EXPECT_TRUE, EXPECT_GE, chrometest */ |
| 8 |
7 'use strict'; | 9 'use strict'; |
8 | 10 |
9 | |
10 function ProcessesTest() { | 11 function ProcessesTest() { |
11 this.processes = null; | 12 this.processes = null; |
12 } | 13 } |
13 ProcessesTest.prototype = new chrometest.Test(); | 14 ProcessesTest.prototype = new chrometest.Test(); |
14 | 15 |
15 ProcessesTest.prototype.setUp = function() { | 16 ProcessesTest.prototype.setUp = function() { |
16 var self = this; | 17 var self = this; |
17 return Promise.resolve().then(function() { | 18 return Promise.resolve().then(function() { |
18 return chrometest.Test.prototype.setUp.call(self); | 19 return chrometest.Test.prototype.setUp.call(self); |
19 }).then(function() { | 20 }).then(function() { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 EXPECT_GE(extensionCount, 2, 'there should be two or more extensions'); | 54 EXPECT_GE(extensionCount, 2, 'there should be two or more extensions'); |
54 }); | 55 }); |
55 | 56 |
56 TEST_F(ProcessesTest, 'testExtensionTitles', function() { | 57 TEST_F(ProcessesTest, 'testExtensionTitles', function() { |
57 var hasChromeTest = false; | 58 var hasChromeTest = false; |
58 var hasPingTest = false; | 59 var hasPingTest = false; |
59 for (var id in this.processes) { | 60 for (var id in this.processes) { |
60 var process = this.processes[id]; | 61 var process = this.processes[id]; |
61 if (process.type == 'extension') { | 62 if (process.type == 'extension') { |
62 if (process.title == 'Extension: Chrome Testing Extension') { | 63 if (process.title == 'Extension: Chrome Testing Extension') { |
63 hasChromeTest = true | 64 hasChromeTest = true; |
64 } else if (process.title == 'Extension: Ping Test Extension') { | 65 } else if (process.title == 'Extension: Ping Test Extension') { |
65 hasPingTest = true; | 66 hasPingTest = true; |
66 } | 67 } |
67 } | 68 } |
68 } | 69 } |
69 EXPECT_TRUE(hasChromeTest, 'the chrometest extension should be present'); | 70 EXPECT_TRUE(hasChromeTest, 'the chrometest extension should be present'); |
70 EXPECT_TRUE(hasPingTest, 'the ping test extension should be present'); | 71 EXPECT_TRUE(hasPingTest, 'the ping test extension should be present'); |
71 }); | 72 }); |
OLD | NEW |