After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673683 - tests: add ephy-shell-test
tests: add ephy-shell-test
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-07 08:42 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2012-06-14 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: add ephy-shell-test (6.88 KB, patch)
2012-04-07 08:42 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-shell: add a comment in EphyNewTabFlags (723 bytes, patch)
2012-04-07 08:43 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review
ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize (1.17 KB, patch)
2012-04-07 08:43 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
ephy-shell: document EphyNewTabFlags (2.21 KB, patch)
2012-05-27 05:14 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
tests: add ephy-shell-test (15.08 KB, patch)
2012-05-27 05:16 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2012-04-07 08:42:40 UTC
Work in progress.

Some small fixes attached.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2012-04-07 08:42:42 UTC
Created attachment 211533 [details] [review]
tests: add ephy-shell-test
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2012-04-07 08:43:44 UTC
Created attachment 211534 [details] [review]
ephy-shell: add a comment in EphyNewTabFlags
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2012-04-07 08:43:47 UTC
Created attachment 211535 [details] [review]
ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize

If the user passed EPHY_NEW_TAB_DONT_SHOW_WINDOW do not call
gtk_widget_realize and gtk_widget_grab_focus on the returned EphyEmbed
since this is most likely against the intentions of
EPHY_NEW_TAB_DONT_SHOW_WINDOW.
Comment 4 Xan Lopez 2012-04-11 15:17:42 UTC
Review of attachment 211533 [details] [review]:

::: tests/Makefile.am
@@ +132,3 @@
+test_ephy_shell_SOURCES = \
+	$(top_builddir)/src/epiphany-resources.c \
+	$(top_builddir)/src/epiphany-resources.h \

Ugh. I suppose you get errors if you don't do this? I think we should have a shell-like object that can be instantiated without the resources, ie, make it know nothing of the browser UI. Otherwise this is pretty big hack I'd say.
Comment 5 Xan Lopez 2012-04-11 15:18:42 UTC
Review of attachment 211534 [details] [review]:

Eh, LOL? I'd say either document this for real or don't but this ... :P
Comment 6 Xan Lopez 2012-04-11 15:20:27 UTC
Review of attachment 211535 [details] [review]:

This makes sense.
Comment 7 Diego Escalante Urrelo (not reading bugmail) 2012-04-22 01:33:16 UTC
Comment on attachment 211535 [details] [review]
ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize

Done. Waiting for comments re: the test.

Attachment 211535 [details] pushed as b072cc7 - ephy-shell: EPHY_NEW_TAB_DONT_SHOW_WINDOW means no realize
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2012-05-27 05:14:40 UTC
Created attachment 215089 [details] [review]
ephy-shell: document EphyNewTabFlags

Real documentation :)
Comment 9 Diego Escalante Urrelo (not reading bugmail) 2012-05-27 05:16:56 UTC
Created attachment 215090 [details] [review]
tests: add ephy-shell-test

This should cover the main API uses of EphyShell.

After working on this, I believe we can simplify ephy-shell.c a bit. At
least so it is much more readable for new comers, or our own forgetful
selves.
Comment 10 Xan Lopez 2012-06-14 07:22:31 UTC
Review of attachment 215089 [details] [review]:

::: src/ephy-shell.h
@@ +61,3 @@
+ * @EPHY_NEW_TAB_DONT_SHOW_WINDOW: do not show the window where the new
+ *        tab is attached, allows to use EphyShell without triggering
+ *        EphyWindow dependencies.

Hrm, well, this only does not show the window (as the flag says!), but the dependencies are still needed right? Not sure what you mean exactly.
Comment 11 Xan Lopez 2012-06-14 07:24:31 UTC
Review of attachment 215090 [details] [review]:

OK!
Comment 12 Diego Escalante Urrelo (not reading bugmail) 2012-06-14 09:06:58 UTC
(In reply to comment #10)
> Review of attachment 215089 [details] [review]:
> 
> ::: src/ephy-shell.h
> @@ +61,3 @@
> + * @EPHY_NEW_TAB_DONT_SHOW_WINDOW: do not show the window where the new
> + *        tab is attached, allows to use EphyShell without triggering
> + *        EphyWindow dependencies.
> 
> Hrm, well, this only does not show the window (as the flag says!), but the
> dependencies are still needed right? Not sure what you mean exactly.

I might have confused this with the resource files dependency. I will try to remember during the day. Otherwise I guess the comment can be simplified, without the part after the comma.
Comment 13 Diego Escalante Urrelo (not reading bugmail) 2012-06-14 23:41:58 UTC
I removed the confusing part about dependencies in the documentation
patch.

Also, I pushed a small debug nitpick for e-history-service so when
opening the db fails, the filename is also printed. Hope this is ok.

I needed that to find out that e-file-helpers now needs ENSURE_EXISTS...
Epiphany was trying to create a new db in /tmp/path/something/ but only
/tmp/path/ existed, hence it was failing because sqlite does not create
the directory path, only the file.

Attachment 215089 [details] pushed as b333648 - ephy-shell: document EphyNewTabFlags
Attachment 215090 [details] pushed as 820a1e5 - tests: add ephy-shell-test