-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[test] Add tests which convert from issues #6356
[test] Add tests which convert from issues #6356
Conversation
|
||
driver = webdriver.Chrome(executable_path=os.environ['CHROMEDRIVER'], chrome_options=chrome_options) | ||
driver.implicitly_wait(2) | ||
time.sleep(20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove such sleep calls. It will slow down running tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all unnecessary sleep calls. PTAL
print 'start to debug line 16 via breakpoint' | ||
for i in range(10): | ||
print "click Resume script execution button: %s" % i | ||
time.sleep(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the example of more sleep calls. Please remove them or replace it with a loop like this: https://github.com/nwjs/nw.js/blob/nw27/test/sanity/nw_util.py#L103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced the sleep call following the example that your mentioned. But for waiting for crash tests, this method seems not a good choose, do you have any better solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which test do you mean?
print 'switch to devtools' | ||
switch_to_devtools(driver, None, True) | ||
print 'waiting for crash' | ||
time.sleep(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rogerwang just like this, I need to set the time waiting for crash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this case is special and it is ok to sleep 5 seconds to make sure there is no crash in this period.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if there is no other question, could you please merge this PR? Thanks a lot.
Could you please verify for each case, it will fail with the NW.js version before it was fixed? This would help to verify the case is effective. The version in which bugs were fixed can be found in the CHANGELOG. |
OK, I will verify them again with latest release SDK on MacOS, Ubuntu and Windows. |
verifying on one platform should be ok.
…On Mon, Jan 8, 2018 at 1:26 PM wanghongjuan ***@***.***> wrote:
OK, I will verify them again with latest release SDK on MacOS, Ubuntu and
Windows.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6356 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKGGVRUH8qpr1uzel7a5Lh0OHsW2g1Nks5tIacbgaJpZM4ROKLy>
.
|
<body> | ||
<h3 id="result">success</h3> | ||
<script> | ||
chrome.downloads.download({ url: "http://releases.ubuntu.com/xenial/ubuntu-16.04.3-desktop-amd64.iso" }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could lead to full disk on the test machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the link to https://github.com/nwjs/nw.js/archive/nw-v0.27.4.tar.gz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given enough time the disk should be still full. The correct way is to find where will the download be and remove them after the test is done.
btw, you could consider to submit multiple PRs to nw28 for each of the test. So the good ones can be merged first. |
Thanks for your advice, I will submit the test one by one from next PR. |
sys.exit(0) | ||
#if platform.system() != 'Darwin': | ||
# print 'Skipped for non Mac platform' | ||
# sys.exit(0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you modify this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that's a mistake, recovered it.
Submitted new PRs for these issues, close this one |
Add tests for issues: [macOS] Crash when called window nw.Window.get().setProgessBar() #6143 Nwjs 0.24.2 crash on MacOS : chrome.windows.create() #6113 nwjc protect javascript and crash when devtools open #6001 NW.js crashes when requiring aws-sdk package and embedded youtube video present on page #5980 OSX - 0.23.0 with node 8 crashes on start using dblite node module #5943 NW crash when debugging with developer tools #5882 0.26.0 WebSocket does not fire onopen #6231
webview.executeScript wrong context #6229 OSX - 0.26.0b1-sdk crash on start with particular combination of pdf webviews and embed/object sources. #6171 AdSense trouble in NWjs #6099, totally 10 tests.
Tested on linux, Windows 10 and MacOS, all of them are passed.