Merge lp://staging/~abreu-alexandre/webbrowser-app/intent into lp://staging/webbrowser-app
- intent
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Olivier Tilloy |
Approved revision: | 890 |
Merged at revision: | 883 |
Proposed branch: | lp://staging/~abreu-alexandre/webbrowser-app/intent |
Merge into: | lp://staging/webbrowser-app |
Diff against target: |
1080 lines (+856/-23) 13 files modified
src/app/webcontainer/CMakeLists.txt (+2/-1) src/app/webcontainer/WebViewImplWebkit.qml (+28/-21) src/app/webcontainer/intent-filter.cpp (+243/-0) src/app/webcontainer/intent-filter.h (+105/-0) src/app/webcontainer/url-pattern-utils.h (+14/-0) src/app/webcontainer/webapp-container.cpp (+29/-0) src/app/webcontainer/webapp-container.h (+7/-0) src/app/webcontainer/webapp-container.qml (+70/-0) tests/autopilot/webapp_container/tests/__init__.py (+14/-1) tests/autopilot/webapp_container/tests/test_intent_uri_support.py (+116/-0) tests/unittests/CMakeLists.txt (+1/-0) tests/unittests/intent-filter/CMakeLists.txt (+9/-0) tests/unittests/intent-filter/tst_IntentFilterTests.cpp (+218/-0) |
To merge this branch: | bzr merge lp://staging/~abreu-alexandre/webbrowser-app/intent |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot | continuous-integration | Needs Fixing | |
Olivier Tilloy | Approve | ||
Ted Gould | Pending | ||
Review via email: mp+247421@code.staging.launchpad.net |
Commit message
Add support for intent:// schemes in the container.
Description of the change
Add support for intent:// schemes in the container.
The current approach is to have a basic proper support for intent:// URIs in the URIHandler. Those URIs are detected and the host/uri/scheme are extracted to make up the target requested URI.
In order to add a bit of flexibility on the webapp side on how the intent should be treated, an optional javascript file (as a drop-in file) can be added to the webapp. This file should export a function such as:
(function(intent) { return intent; });
(the body of the function being obviously webapp dependant).
This function gets as a parameter an object with the following keys:
'scheme': the scheme for the intent
'host': the host (optional) for the intent
'uri': the uri for the intent
and is supposed to return an object that has the same "shape". Any failure to do so will make the webapp intent mechanism fallback on a function that acts as the identity function.
One has to add a specific argument to specific a specific custom intent filtering file:
--use-local-
if no intent filename is specified a default one is looked up with the name:
"local-
Olivier Tilloy (osomon) wrote : | # |
Olivier Tilloy (osomon) wrote : | # |
OK, now that looks better (my comment went in just after your change).
I’m wondering, why does the function receive an object that has 'scheme', 'host' and 'uri' as keys?
Wouldn’t it be enough to pass the function a string (the full intent:// URI) and expect a string (the transformed http:// URI) in return?
Also, is it really useful to allow the custom intent file to have a different name than the default one? It seems it adds a lot of logic for no apparent gain.
Olivier Tilloy (osomon) wrote : | # |
If I’m not mistaken, when the custom JS file is parsed (in intent-filter.cpp), the whole of its contents are evaluated. So there’s no check on whether it contains something else than the expected function. What if the file contains several functions? Or something else?
Alexandre Abreu (abreu-alexandre) wrote : | # |
> OK, now that looks better (my comment went in just after your change).
>
> I’m wondering, why does the function receive an object that has 'scheme',
> 'host' and 'uri' as keys?
> Wouldn’t it be enough to pass the function a string (the full intent:// URI)
> and expect a string (the transformed http:// URI) in return?
imo no, I wrote it this way to be very strict & avoid any error that could come
from something that is user defined. I did not want to let the intent parsing
be hosted in the function itself, it would not make sense imo and be possibly
error prone.
Hence, a strict (already parsed) intent description is passed down to the function
and something very strict is expected in return, not some random data,
> Also, is it really useful to allow the custom intent file to have a different
> name than the default one? It seems it adds a lot of logic for no apparent
> gain.
I though it could be something useful, but I can remove this, I am not strongly
opinionated about it :)
Alexandre Abreu (abreu-alexandre) wrote : | # |
> If I’m not mistaken, when the custom JS file is parsed (in intent-filter.cpp),
> the whole of its contents are evaluated. So there’s no check on whether it
> contains something else than the expected function. What if the file contains
> several functions? Or something else?
Then the check fails and we fallback to the default filter.
Again, I tried to be strict about what is expected from the intent file (also in its
IO), one need to expose a callback object and if other functions are needed they
need to be hosted in the top level callable object,
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:875
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
> > Also, is it really useful to allow the custom intent file to have a
> different
> > name than the default one? It seems it adds a lot of logic for no apparent
> > gain.
>
> I though it could be something useful, but I can remove this, I am not
> strongly
> opinionated about it :)
Yeah, I wouldn’t mind if you removed it, that would result in less code to review, and again I think it doesn’t add any real value for webapp developers anyway. Thanks!
- 875. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:876
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Alexandre Abreu (abreu-alexandre) wrote : | # |
> > > Also, is it really useful to allow the custom intent file to have a
> > different
> > > name than the default one? It seems it adds a lot of logic for no apparent
> > > gain.
> >
> > I though it could be something useful, but I can remove this, I am not
> > strongly
> > opinionated about it :)
>
> Yeah, I wouldn’t mind if you removed it, that would result in less code to
> review, and again I think it doesn’t add any real value for webapp developers
> anyway. Thanks!
done.
Olivier Tilloy (osomon) wrote : | # |
Can’t we get rid of the --use-local-
Olivier Tilloy (osomon) wrote : | # |
In src/app/
Olivier Tilloy (osomon) wrote : | # |
Cosmetics: now that the ability to provide a custom filename for the intent filter has been removed, maybe DEFAULT_
Olivier Tilloy (osomon) wrote : | # |
Why not make the parameter of parseIntentUri(…) a QUrl ?
This would make it much easier to parse the URI, without the need for regexpes. E.g.:
QUrl url("intent://…");
qDebug() << "URL:" << url;
qDebug() << "scheme:" << url.scheme();
qDebug() << "host:" << url.host();
qDebug() << "path:" << url.path();
qDebug() << "query:" << url.query();
qDebug() << "fragment:" << url.fragment();
QStringList fragments = url.fragment(
assert(
assert(
QMap<QString, QString> tokens;
Q_FOREACH(const QString& fragment, fragments) {
QStringList token = fragment.
}
qDebug() << "tokens:" << tokens;
Olivier Tilloy (osomon) wrote : | # |
There is a missing autopilot test case: handling of an intent:// URI for a webapp that doesn’t ship a 'local-
Olivier Tilloy (osomon) wrote : | # |
676 + def get_intent_
[…]
681 + webviewContaine
This is wrong, the test case shouldn’t call a slot on the QML object: this is not testing a real-world use-case any longer. Instead, the webapp’s homepage should have an "intent://" link and the test should click that link and ensure that as a result the URL of the webview changes to the expected transformed URL.
Alexandre Abreu (abreu-alexandre) wrote : | # |
> 676 + def get_intent_
> […]
> 681 + webviewContaine
>
> This is wrong, the test case shouldn’t call a slot on the QML object: this is
> not testing a real-world use-case any longer. Instead, the webapp’s homepage
> should have an "intent://" link and the test should click that link and ensure
> that as a result the URL of the webview changes to the expected transformed
> URL.
I know that this is "wrong", but I did it this way after exploring how
'intrumentable' the url-dispatcher was. And it is not at the required
level to test the whole flow ...
The way that it is it test *some* of the logic and bits of code (closer
to something at the unit level),
Alexandre Abreu (abreu-alexandre) wrote : | # |
> There is a missing autopilot test case: handling of an intent:// URI for a
> webapp that doesn’t ship a 'local-
the test_basic_
Alexandre Abreu (abreu-alexandre) wrote : | # |
> Why not make the parameter of parseIntentUri(…) a QUrl ?
> This would make it much easier to parse the URI, without the need for
> regexpes. E.g.:
>
> QUrl url("intent://…");
>
> qDebug() << "URL:" << url;
> qDebug() << "scheme:" << url.scheme();
> qDebug() << "host:" << url.host();
> qDebug() << "path:" << url.path();
> qDebug() << "query:" << url.query();
> qDebug() << "fragment:" << url.fragment();
>
> QStringList fragments = url.fragment(
> assert(
> assert(
> QMap<QString, QString> tokens;
> Q_FOREACH(const QString& fragment, fragments) {
> QStringList token = fragment.
> assert(token.size() == 2);
> tokens.
> }
> qDebug() << "tokens:" << tokens;
I'd agree, except that it also brings extra logic to reconstruct
the intent URI parts:
- path + query (if any),
- host (if any) and path,
etc.
plus some other things,
which in the end makes it also a bit convoluted imo,
Alexandre Abreu (abreu-alexandre) wrote : | # |
all other comments addressed
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:877
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Francis Ginther (fginther) wrote : | # |
The jenkins node for the i386 and amd64 tests failed, I've restarted a new ci run.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:877
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 878. By Launchpad Translations on behalf of phablet-team
-
Launchpad automatic translations update.
- 879. By Olivier Tilloy
-
Update the m.youtube.com UA override to fix video playback. Fixes: #1415107
Approved by: Alexandre Abreu - 880. By CI Train Bot Account
-
Releasing 0.23+15.
04.20150127- 0ubuntu1 - 881. By CI Train Bot Account
-
Resync trunk
Olivier Tilloy (osomon) wrote : | # |
> > Why not make the parameter of parseIntentUri(…) a QUrl ?
> > This would make it much easier to parse the URI, without the need for
> > regexpes. E.g.:
> >
> > QUrl url("intent://…");
> >
> > qDebug() << "URL:" << url;
> > qDebug() << "scheme:" << url.scheme();
> > qDebug() << "host:" << url.host();
> > qDebug() << "path:" << url.path();
> > qDebug() << "query:" << url.query();
> > qDebug() << "fragment:" << url.fragment();
> >
> > QStringList fragments = url.fragment(
> > assert(
> > assert(
> > QMap<QString, QString> tokens;
> > Q_FOREACH(const QString& fragment, fragments) {
> > QStringList token = fragment.
> > assert(token.size() == 2);
> > tokens.
> > }
> > qDebug() << "tokens:" << tokens;
>
> I'd agree, except that it also brings extra logic to reconstruct
> the intent URI parts:
> - path + query (if any),
> - host (if any) and path,
> etc.
> plus some other things,
>
> which in the end makes it also a bit convoluted imo,
Fair enough (I disagree but let’s agree to disagree). A couple of comments on the logic though:
- the intentRe regexp should end with the ";end;" token
- the assignment of result.host and result.uriPath will fail if s has more than 2 items (e.g. if the path is several levels deep, like example.
Olivier Tilloy (osomon) wrote : | # |
> > 676 + def get_intent_
> > […]
> > 681 + webviewContaine
> >
> > This is wrong, the test case shouldn’t call a slot on the QML object: this
> is
> > not testing a real-world use-case any longer. Instead, the webapp’s homepage
> > should have an "intent://" link and the test should click that link and
> ensure
> > that as a result the URL of the webview changes to the expected transformed
> > URL.
>
> I know that this is "wrong", but I did it this way after exploring how
> 'intrumentable' the url-dispatcher was. And it is not at the required
> level to test the whole flow ...
>
> The way that it is it test *some* of the logic and bits of code (closer
> to something at the unit level),
Can’t the 'UriHandler' global object be mocked and made to emit its "opened" signal (without the need to tinker with the URL dispatcher)?
If not, at the very least this test case should have a comment to explain what it does and why it’s not a real integration test.
- 882. By Alexandre Abreu
-
rever pot commit
Alexandre Abreu (abreu-alexandre) wrote : | # |
> > > Why not make the parameter of parseIntentUri(…) a QUrl ?
> > > This would make it much easier to parse the URI, without the need for
> > > regexpes. E.g.:
> > >
> > > QUrl url("intent://…");
> > >
> > > qDebug() << "URL:" << url;
> > > qDebug() << "scheme:" << url.scheme();
> > > qDebug() << "host:" << url.host();
> > > qDebug() << "path:" << url.path();
> > > qDebug() << "query:" << url.query();
> > > qDebug() << "fragment:" << url.fragment();
> > >
> > > QStringList fragments = url.fragment(
> > > assert(
> > > assert(
> > > QMap<QString, QString> tokens;
> > > Q_FOREACH(const QString& fragment, fragments) {
> > > QStringList token = fragment.
> > > assert(token.size() == 2);
> > > tokens.
> > > }
> > > qDebug() << "tokens:" << tokens;
> >
> > I'd agree, except that it also brings extra logic to reconstruct
> > the intent URI parts:
> > - path + query (if any),
> > - host (if any) and path,
> > etc.
> > plus some other things,
> >
> > which in the end makes it also a bit convoluted imo,
>
> Fair enough (I disagree but let’s agree to disagree). A couple of comments on
> the logic though:
>
> - the intentRe regexp should end with the ";end;" token
> - the assignment of result.host and result.uriPath will fail if s has more
> than 2 items (e.g. if the path is several levels deep, like
> example.
ok, I agree to disagree w/ my disagreement, ... this stupid inattention mistake
convinced me,
done (usage of QUrl)
Olivier Tilloy (osomon) wrote : | # |
In tests/unittests
838 +set(TEST tst_IntentFilte
839 +set(SOURCES
840 + ${CMAKE_
this should be ${webapp-
841 + tst_IntentFilte
842 +)
843 +set(WEBAPP_
the variable defined here seems unused
844 +include_
this should be ${webapp-
845 +add_executable
846 +qt5_use_
847 +add_test(${TEST} ${CMAKE_
- 883. By Alexandre Abreu
-
addressed cmakelist.txt fixes
Alexandre Abreu (abreu-alexandre) wrote : | # |
> In tests/unittests
>
> 838 +set(TEST tst_IntentFilte
> 839 +set(SOURCES
> 840 + ${CMAKE_
>
> this should be ${webapp-
>
> 841 + tst_IntentFilte
> 842 +)
> 843 +set(WEBAPP_
>
> the variable defined here seems unused
>
> 844 +include_
>
> this should be ${webapp-
>
> 845 +add_executable
> 846 +qt5_use_
> 847 +add_test(${TEST} ${CMAKE_
> ${TEST}.xml)
done
Olivier Tilloy (osomon) wrote : | # |
342 +#include "intent-filter.moc"
this is not needed and generates warning at build time
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:882
http://
Executed test runs:
UNSTABLE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:883
http://
Executed test runs:
FAILURE: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 884. By Alexandre Abreu
-
remove *.moc file unneeded
Alexandre Abreu (abreu-alexandre) wrote : | # |
> 342 +#include "intent-filter.moc"
>
> this is not needed and generates warning at build time
sorry it was a leftover from a previous version
- 885. By Alexandre Abreu
-
add AP test comment
Alexandre Abreu (abreu-alexandre) wrote : | # |
> > > 676 + def get_intent_
> > > […]
> > > 681 + webviewContaine
> > >
> > > This is wrong, the test case shouldn’t call a slot on the QML object: this
> > is
> > > not testing a real-world use-case any longer. Instead, the webapp’s
> homepage
> > > should have an "intent://" link and the test should click that link and
> > ensure
> > > that as a result the URL of the webview changes to the expected
> transformed
> > > URL.
> >
> > I know that this is "wrong", but I did it this way after exploring how
> > 'intrumentable' the url-dispatcher was. And it is not at the required
> > level to test the whole flow ...
> >
> > The way that it is it test *some* of the logic and bits of code (closer
> > to something at the unit level),
>
> Can’t the 'UriHandler' global object be mocked and made to emit its "opened"
> signal (without the need to tinker with the URL dispatcher)?
>
> If not, at the very least this test case should have a comment to explain what
> it does and why it’s not a real integration test.
I am convinced by that approach at this level (of testing) ... we would still strain
a bit far from a proper function test, and imo wouldn't be that different from
the selective testing above really, ... I added a comment in the test
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:885
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
In tests/unittests
1004 + IntentFilter * pf = new IntentFilter(
1050 + IntentFilter * pf = new IntentFilter(
pf is leaked. Could it be instantiated on the stack instead?
Olivier Tilloy (osomon) wrote : | # |
In IntentFilter:
Olivier Tilloy (osomon) wrote : | # |
In IntentFilter, d_ptr is never destroyed, so it’s leaked. You could use a QScopedPointer to automate memory management.
Olivier Tilloy (osomon) wrote : | # |
279 + // Fallback to a noop
280 + result = d->evaluate(
281 + IntentFilterPri
282 + , intentDescripti
This looks like a rather complex (and expensive) way of transforming intentDescription into a QVariantMap.
What about getting rid of the IntentUriDescri
Olivier Tilloy (osomon) wrote : | # |
307 + trimUriSeparato
Is this correct? A valid URI path normally starts with a leading forward slash, so why trim it? And a path that ends with a slash is (I think) different from a path that doesn’t. E.g.:
!=
Alexandre Abreu (abreu-alexandre) wrote : | # |
> In tests/unittests
>
> 1004 + IntentFilter * pf = new IntentFilter(
> 1050 + IntentFilter * pf = new IntentFilter(
>
> pf is leaked. Could it be instantiated on the stack instead?
why 'need fixing'? I did it on purpose ... IntentFilter is a QObject which is not
copy constructiblem and ... this is a test ...
- 886. By Alexandre Abreu
-
oops fix leaked intent dptr
Alexandre Abreu (abreu-alexandre) wrote : | # |
> In IntentFilter, d_ptr is never destroyed, so it’s leaked. You could use a
> QScopedPointer to automate memory management.
totally, fixed
Alexandre Abreu (abreu-alexandre) wrote : | # |
> 279 + // Fallback to a noop
> 280 + result = d->evaluate(
> 281 +
> IntentFilterPri
> 282 + , intentDescripti
>
> This looks like a rather complex (and expensive) way of transforming
> intentDescription into a QVariantMap.
> What about getting rid of the IntentUriDescri
> replace it everywhere with QVariantMap?
The 'expensive' factor is very relative to the usage context ... but in this
case it not that, ... it has nothing to do w/ intentDescription, but w/ the result
of QJSValue -> QVAriantMap ...
Alexandre Abreu (abreu-alexandre) wrote : | # |
> In IntentFilter:
> have a host, but in the declaration of the IntentUriDescri
> is marked optional. So, is it optional or required?
optional as you known and as I know ..., but as I said before
I wanted the object sent to the js have a strict & fixed structure,
I can remove if you strongly object,
Olivier Tilloy (osomon) wrote : | # |
> > In tests/unittests
> >
> > 1004 + IntentFilter * pf = new IntentFilter(
> > 1050 + IntentFilter * pf = new IntentFilter(
> >
> > pf is leaked. Could it be instantiated on the stack instead?
>
> why 'need fixing'? I did it on purpose ... IntentFilter is a QObject which is
> not
> copy constructiblem and ... this is a test ...
I’m not sure I understand your point. The fact that it is a test doesn’t mean that it shouldn’t follow good practices and free memory after itself.
But really, why not instantiate the objects on the stack and let them be destroyed automatically when they go out of scope? I.e.:
IntentFilter pf(QString());
QVERIFY(
Olivier Tilloy (osomon) wrote : | # |
> > 279 + // Fallback to a noop
> > 280 + result = d->evaluate(
> > 281 +
> > IntentFilterPri
> > 282 + , intentDescripti
> >
> > This looks like a rather complex (and expensive) way of transforming
> > intentDescription into a QVariantMap.
> > What about getting rid of the IntentUriDescri
> > replace it everywhere with QVariantMap?
>
> The 'expensive' factor is very relative to the usage context ... but in this
> case it not that, ... it has nothing to do w/ intentDescription, but w/ the
> result
> of QJSValue -> QVAriantMap ...
Sure, the cost is probably overall negligible. Still, in this case d->evaluate(…) is called only to turn an IntentUriDescri
Olivier Tilloy (osomon) wrote : | # |
> > In IntentFilter:
> to
> > have a host, but in the declaration of the IntentUriDescri
> 'host'
> > is marked optional. So, is it optional or required?
>
> optional as you known and as I know ..., but as I said before
> I wanted the object sent to the js have a strict & fixed structure,
>
> I can remove if you strongly object,
I won’t strongly object :)
I’m just concerned that if someone has to pick up that code in the future, she will be puzzled as to whether host is optional or required.
By the way, could you add a link to https:/
- 887. By Alexandre Abreu
-
fix path trimmning
Alexandre Abreu (abreu-alexandre) wrote : | # |
> 307 + trimUriSeparato
>
> Is this correct? A valid URI path normally starts with a leading forward
> slash, so why trim it? And a path that ends with a slash is (I think)
> different from a path that doesn’t. E.g.:
>
> http://
>
> !=
>
> http://
I want things to be somewhat normalized (if I can call it this way), for the
web and *in practice* I dont think it makes a difference (unless I miss an
obvious case).
After thinking about it, I think you are right on this, rather be strict ...
Alexandre Abreu (abreu-alexandre) wrote : | # |
> > > In tests/unittests
> > >
> > > 1004 + IntentFilter * pf = new IntentFilter(
> > > 1050 + IntentFilter * pf = new
> IntentFilter(
> > >
> > > pf is leaked. Could it be instantiated on the stack instead?
> >
ok, I had a compiler error that led me to quickly think that the qobject
based was not statically instantiatable,
+1
Alexandre Abreu (abreu-alexandre) wrote : | # |
> > > In IntentFilter:
> result
> > to
> > > have a host, but in the declaration of the IntentUriDescri
> > 'host'
> > > is marked optional. So, is it optional or required?
> >
> > optional as you known and as I know ..., but as I said before
> > I wanted the object sent to the js have a strict & fixed structure,
> >
> > I can remove if you strongly object,
>
> I won’t strongly object :)
> I’m just concerned that if someone has to pick up that code in the future, she
> will be puzzled as to whether host is optional or required.
>
> By the way, could you add a link to
> https:/
> code, for reference?
+1
- 888. By Alexandre Abreu
-
fixes
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:886
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 889. By Alexandre Abreu
-
fix additional free ptr
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:889
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
FAILURE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
Olivier Tilloy (osomon) wrote : | # |
I tested the branch on a device (using silo 28, in conjunction with https:/
One thing that I think would be useful is a console.log() to inform that an intent URI was transformed into an http[s] one (with both URIs, to ease debugging in case of problems).
- 890. By Alexandre Abreu
-
Add log
Alexandre Abreu (abreu-alexandre) wrote : | # |
> One thing that I think would be useful is a console.log() to inform that an
> intent URI was transformed into an http[s] one (with both URIs, to ease
> debugging in case of problems).
+1, done,
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:890
http://
Executed test runs:
SUCCESS: http://
UNSTABLE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
I’m not seeing the handleIntentUri() function being called anywhere.
And to be honest I’m not sure I understand the whole logic of this change.
Here is my understanding of how it should work: when an intent:// URL is clicked either in the browser or in a webapp, its handling will be delegated to the URL dispatcher, which will special case it to determine which app to target with it. The app will be invoked with the intent:// URL unchanged, so in the case of a webapp that registered for it, it needs to transform this URL to a valid http:// one.
So there are two places in the webapp-container’s code that need to handle such a transformation:
- if the app was not previously running, it will be invoked with the intent:// URL as a parameter, the transformation needs to happen before setting the URL on the webview
- if the app was already running, the UriHandler.onOpened handler needs to do the transformation
From a quick glance at the code, I don’t see this happening. Can you shed a light on this please?