LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 return this.driver.wait(() => | 55 return this.driver.wait(() => |
56 this.driver.getAllWindowHandles().then(handles => handles[1]) | 56 this.driver.getAllWindowHandles().then(handles => handles[1]) |
57 ); | 57 ); |
58 }).then(handle => | 58 }).then(handle => |
59 this.driver.switchTo().window(handle) | 59 this.driver.switchTo().window(handle) |
60 ).then(() => | 60 ).then(() => |
61 this.driver.executeScript("return location.origin;") | 61 this.driver.executeScript("return location.origin;") |
62 ).then(origin => | 62 ).then(origin => |
63 { | 63 { |
64 this.origin = origin; | 64 this.origin = origin; |
65 this.platform = module.platform; | |
66 }); | 65 }); |
67 }); | 66 }); |
68 | 67 |
69 for (let file of glob.sync("./test/wrappers/*.js")) | 68 for (let file of glob.sync("./test/wrappers/*.js")) |
70 { | 69 { |
71 // Reload the module(s) for every browser | 70 // Reload the module(s) for every browser |
72 let modulePath = path.resolve(file); | 71 let modulePath = path.resolve(file); |
73 delete require.cache[require.resolve(modulePath)]; | 72 delete require.cache[require.resolve(modulePath)]; |
74 require(modulePath); | 73 require(modulePath); |
75 } | 74 } |
76 | 75 |
77 after(function() | 76 after(function() |
78 { | 77 { |
79 this.driver.quit(); | 78 this.driver.quit(); |
80 }); | 79 }); |
81 }); | 80 }); |
82 } | 81 } |
LEFT | RIGHT |