electron/atom/browser/api
Cheng Zhao cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
..
atom_api_app.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_app.h Implement App-Scoped Security scoped bookmarks (#11711) 2018-02-12 13:25:06 -05:00
atom_api_app_mas.mm Implement App-Scoped Security scoped bookmarks (#11711) 2018-02-12 13:25:06 -05:00
atom_api_auto_updater.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_auto_updater.h Update to use Squirrel.Mac that supports CDN releases 2018-02-15 14:00:46 +11:00
atom_api_browser_view.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_browser_view.h Fix compiler warning when building with gcc 2017-11-21 21:47:51 +09:00
atom_api_browser_window.cc Fix some flaky tests in CI (#12153) 2018-03-07 14:40:27 +09:00
atom_api_browser_window.h mac: Move draggable region code to BrowserWindow 2018-03-06 16:20:37 +09:00
atom_api_browser_window_mac.mm Save browser_view_ in the NativeWindow 2018-03-06 16:20:37 +09:00
atom_api_browser_window_views.cc Save browser_view_ in the NativeWindow 2018-03-06 16:20:37 +09:00
atom_api_content_tracing.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_cookies.cc REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00
atom_api_cookies.h REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00
atom_api_debugger.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_debugger.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_desktop_capturer.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_desktop_capturer.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_dialog.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_download_item.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_download_item.h remove the call to download_item_->Remove() on cancel 2017-02-24 14:08:21 +08:00
atom_api_global_shortcut.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_global_shortcut.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_in_app_purchase.cc Fix build error after rebasing 2018-02-23 10:22:00 +09:00
atom_api_in_app_purchase.h Pass multiple transactions at the same time 2018-01-10 17:19:44 +09:00
atom_api_menu.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_menu.h Rename api::Window to api::BrowserWindow 2018-02-22 12:50:47 +09:00
atom_api_menu_mac.h Rename api::Window to api::BrowserWindow 2018-02-22 12:50:47 +09:00
atom_api_menu_mac.mm Don't store WebContents in NativeWindow 2018-03-06 16:21:18 +09:00
atom_api_menu_views.cc views: Show menu on window's content view 2018-03-06 16:21:18 +09:00
atom_api_menu_views.h Rename api::Window to api::BrowserWindow 2018-02-22 12:50:47 +09:00
atom_api_net.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_net.h Fixing code review issues. 2016-10-25 12:41:01 +02:00
atom_api_notification.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_notification.h Organize code 2018-02-10 03:19:47 -08:00
atom_api_power_monitor.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_power_monitor.h Do not use virtual function to request shutdown 2018-02-05 15:50:55 +09:00
atom_api_power_save_blocker.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_power_save_blocker.h Consolidate PowerSaveBlocker and WakeLock inside Device Service. 2017-11-24 10:58:16 +09:00
atom_api_protocol.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_protocol.h Fix protocol filtering of net.request 2018-02-16 13:03:53 -05:00
atom_api_render_process_preferences.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_render_process_preferences.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_screen.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_screen.h 🎨 2017-06-05 10:33:46 -07:00
atom_api_screen_mac.mm deprecate screen.getMenuBarHeight 2018-03-05 19:45:51 -05:00
atom_api_session.cc Fix network delegate race condition (#12044) 2018-02-26 06:23:59 -08:00
atom_api_session.h Add a SessionPreferences to manage session related data 2017-12-05 15:59:15 +09:00
atom_api_system_preferences.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_system_preferences.h fixing error in registerDefaults 2017-12-12 13:08:09 -05:00
atom_api_system_preferences_mac.mm add loop to catch null values 2017-12-13 14:02:43 -05:00
atom_api_system_preferences_win.cc Fixes hexColorDWORDToRGBA for transparent colors 2018-01-09 11:07:29 -08:00
atom_api_tray.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_tray.h Fix cpplint warnings 2017-10-05 11:49:26 +09:00
atom_api_url_request.cc net: allow controlling redirects 2017-03-28 18:46:21 +05:30
atom_api_url_request.h net: allow controlling redirects 2017-03-28 18:46:21 +05:30
atom_api_web_contents.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
atom_api_web_contents.h Remove was_ignored_by_handler from frame_messages.h 2018-02-23 10:21:23 +09:00
atom_api_web_contents_mac.mm Access window through native view 2016-08-23 09:51:54 -07:00
atom_api_web_request.cc Fix network delegate race condition (#12044) 2018-02-26 06:23:59 -08:00
atom_api_web_request.h Pass FunctionTemplate in BuildPrototype 2016-08-02 18:08:12 +09:00
atom_api_web_view_manager.cc Upgrade to node v9.3.0 (#11507) 2018-02-23 10:22:00 +09:00
event.cc Every native class now gets a name 2016-08-02 19:28:12 +09:00
event.h Sort includes alphabetically 2016-08-26 15:30:02 -07:00
event_emitter.cc Set prototype of constructor directly 2016-08-02 20:38:35 +09:00
event_emitter.h Fix the cyclic reference in menu delegate (#11967) 2018-02-20 10:11:35 -06:00
event_subscriber.cc fix dcheck comparison between unsigned long vs int 2017-12-01 17:55:21 +01:00
event_subscriber.h Fix race condition in event_subscriber.h 2017-11-29 12:57:47 -03:00
frame_subscriber.cc SkBitmap and SkPixelRef no longer need lock/unlock 2017-11-24 10:58:16 +09:00
frame_subscriber.h Fix API changes of FrameSubscriber 2017-04-27 16:34:52 +09:00
save_page_handler.cc use DownloadItem to determine download initiator 2016-04-27 20:29:39 +05:30
save_page_handler.h use DownloadItem to determine download initiator 2016-04-27 20:29:39 +05:30
trackable_object.cc add a null-pointer check before processing base::SupportsUserData::GetUserData 2017-10-03 12:42:35 +08:00
trackable_object.h Cleanup per review comment 2017-10-27 00:07:54 -07:00