Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29373596: Issue 4838 - Use nodeunit framework for integration tests running in browser (Closed)

Created:
Jan. 24, 2017, 4:35 p.m. by Wladimir Palant
Modified:
Feb. 24, 2017, 10:56 a.m.
Reviewers:
Felix Dahlke
Base URL:
https://hg.adblockplus.org/adblockpluscore
Visibility:
Public.

Description

Issue 4838 - Use nodeunit framework for integration tests running in browser

Patch Set 1 #

Total comments: 2

Patch Set 2 : Simplified phantomjs script #

Patch Set 3 : Isolate module scopes to avoid naming conflicts #

Total comments: 30

Patch Set 4 : Addressed comments and added additional minor changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -173 lines) Patch
M README.md View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A browsertests.js View 1 2 3 1 chunk +180 lines, -0 lines 0 comments Download
M package.json View 1 chunk +1 line, -2 lines 0 comments Download
R test/browser/elemHideEmulation.html View 1 chunk +0 lines, -16 lines 0 comments Download
M test/browser/elemHideEmulation.js View 1 2 3 3 chunks +127 lines, -136 lines 0 comments Download
M test_runner.js View 1 2 3 1 chunk +33 lines, -16 lines 0 comments Download

Messages

Total messages: 8
Wladimir Palant
Jan. 24, 2017, 4:35 p.m. (2017-01-24 16:35:50 UTC) #1
Wladimir Palant
https://codereview.adblockplus.org/29373596/diff/29373597/test/browser/elemHideEmulation.js File test/browser/elemHideEmulation.js (left): https://codereview.adblockplus.org/29373596/diff/29373597/test/browser/elemHideEmulation.js#oldcode45 test/browser/elemHideEmulation.js:45: document.head.removeChild(styleElements[0]); This piece of code has multiple issues: * ...
Jan. 24, 2017, 4:39 p.m. (2017-01-24 16:39:24 UTC) #2
Wladimir Palant
I realized that the PhantomJS script is running in a window environment so creating a ...
Jan. 24, 2017, 8:10 p.m. (2017-01-24 20:10:18 UTC) #3
Wladimir Palant
One more change, relatively minor this time - loading all modules into the same page ...
Jan. 25, 2017, 9:55 a.m. (2017-01-25 09:55:52 UTC) #4
Felix Dahlke
Nice! Could you update the README to reflect this? https://codereview.adblockplus.org/29373596/diff/29373597/test/browser/elemHideEmulation.js File test/browser/elemHideEmulation.js (left): https://codereview.adblockplus.org/29373596/diff/29373597/test/browser/elemHideEmulation.js#oldcode45 test/browser/elemHideEmulation.js:45: ...
Jan. 30, 2017, 2:37 p.m. (2017-01-30 14:37:59 UTC) #5
Wladimir Palant
https://codereview.adblockplus.org/29373596/diff/29373625/browsertests.js File browsertests.js (right): https://codereview.adblockplus.org/29373596/diff/29373625/browsertests.js#newcode3 browsertests.js:3: * Copyright (C) 2006-2016 Eyeo GmbH On 2017/01/30 14:37:58, ...
Feb. 24, 2017, 9:18 a.m. (2017-02-24 09:18:56 UTC) #6
Felix Dahlke
LGTM, up to you whether you want to stick to phantomjs2, see my comment. https://codereview.adblockplus.org/29373596/diff/29373625/browsertests.js ...
Feb. 24, 2017, 10:43 a.m. (2017-02-24 10:43:39 UTC) #7
Wladimir Palant
Feb. 24, 2017, 10:56 a.m. (2017-02-24 10:56:19 UTC) #8
https://codereview.adblockplus.org/29373596/diff/29373625/package.json
File package.json (right):

https://codereview.adblockplus.org/29373596/diff/29373625/package.json#newcode8
package.json:8: "phantomjs2": "^2.2.0",
On 2017/02/24 10:43:39, Felix Dahlke wrote:
> So phantomjs2 is a fork of phantomjs-prebuilt - and it seems to be slightly
> behind. phantomjs-prebuilt had the last release in December 2016, phantomjs2
had
> the last release in February 2016.

Given that last PhantomJS release was in January 2016 - that's not "behind." ;)

As I said, I don't really have indicators as to which one is better to use.
We'll see when PhantomJS 2.5 comes out and switching is easy.

Powered by Google App Engine
This is Rietveld