The CL to enable the origin trial: https://codereview.chromium.org/2785913003/In the end, I removed the origin_trial_os = android (I think this is best anyway). But if you want to try out what happens with that flag turned on, see that CL.On Fri, 31 Mar 2017 at 15:47 Matt Giuca <mgi...@chromium.org> wrote:Hi,I am setting up the InstalledApp feature as an origin trial like this in RuntimeEnabledFeatures.json5:{name: "InstalledApp",origin_trial_feature_name: "InstalledApp",// This makes our tests break on non-Android. DO NOT SUBMIT.origin_trial_os: ["android"],status: "experimental",},Having a few troubles with this on non-Android (Linux):
- In production, it seems to completely ignore origin_trial_os. Using the test trial token, I can still use the origin trial feature on Linux if I have a valid token. This works on both the static <meta> tag in the HTML file, as well as inserting a <meta> tag dynamically.
- In the layout test, it ignores the origin_trial_os but only when inserted dynamically. Running the test on Linux, the trial feature isn't available in the static <meta> tag test, but it does succeed when inserted dynamically. That's confusing.
What's really confusing is that Web Share (the only other origin trial currently using origin_trial_os, also my feature) seems to be properly restricted to Android in production. (It does not currently have layout tests for origin trial.) Any explanation why Web Share is being restricted correctly while InstalledApp is ignoring origin_trial_os?
Lastly, *how* can I do layout tests correctly when using origin_trial_os? Is there a way to write the layout test so that it expects a feature on Android but not on other platforms?
(Since my feature works properly on non-Android by simply returning an empty list, I think I might just go ahead and not use origin_trial_os, essentially rolling it out on all platforms but with an empty implementation on non-Android platforms, which is how it will be eventually anyway.)
--
You received this message because you are subscribed to the Google Groups "experimentation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation-dev+unsub...@chromium.org.
To post to this group, send email to experimentation-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/experimentation-dev/CAHqYdcbOXscN5FgO_Pvuch%2BNUu-jFZh5%3Dt5evKFAAphuncvRfw%40mail.gmail.com.
I agree it's probably best to avoid using origin_trial_os, at least for now.I actually didn't know that origin_trial_os was added until recently. Looking at the CL that added it, I don't think anyone on the OT team weighed in on the implementation. I think that's sub-optimal, so I updated our watch lists to try to prevent that in the future. There's a few moving parts to enabling and exposing trial features, and unfortunately the code isn't all together, which I think contributed to some gaps in the overall implementation for origin_trial_os.
More comments inline.Thanks,JasonOn Fri, Mar 31, 2017 at 1:34 AM, Matt Giuca <mgi...@chromium.org> wrote:The CL to enable the origin trial: https://codereview.chromium.org/2785913003/In the end, I removed the origin_trial_os = android (I think this is best anyway). But if you want to try out what happens with that flag turned on, see that CL.On Fri, 31 Mar 2017 at 15:47 Matt Giuca <mgi...@chromium.org> wrote:Hi,I am setting up the InstalledApp feature as an origin trial like this in RuntimeEnabledFeatures.json5:{name: "InstalledApp",origin_trial_feature_name: "InstalledApp",// This makes our tests break on non-Android. DO NOT SUBMIT.origin_trial_os: ["android"],status: "experimental",},Having a few troubles with this on non-Android (Linux):
- In production, it seems to completely ignore origin_trial_os. Using the test trial token, I can still use the origin trial feature on Linux if I have a valid token. This works on both the static <meta> tag in the HTML file, as well as inserting a <meta> tag dynamically.
- In the layout test, it ignores the origin_trial_os but only when inserted dynamically. Running the test on Linux, the trial feature isn't available in the static <meta> tag test, but it does succeed when inserted dynamically. That's confusing.
Looking across all the code, I think this is due to the fact OS-filtering logic is only in the generated helper functions to check for enabled trials (in OriginTrials::*). The concept of OS-filtering isn't considered in the core origin trials code (i.e. OriginTrialContext.cpp). Thus, if there is code that doesn't use the generated helper functions, like the bindings logic (in ConditionalFeatures*), the OS-filtering is applied inconsistently or not at all.I've logged crbug.com/707232 to fix the implementation of origin_trial_os.
What's really confusing is that Web Share (the only other origin trial currently using origin_trial_os, also my feature) seems to be properly restricted to Android in production. (It does not currently have layout tests for origin trial.) Any explanation why Web Share is being restricted correctly while InstalledApp is ignoring origin_trial_os?From code inspection, I'm not sure why you'd see different behaviour for WebShare vs InstalledApp. Could you give us instructions for how you're testing WebShare?
Lastly, *how* can I do layout tests correctly when using origin_trial_os? Is there a way to write the layout test so that it expects a feature on Android but not on other platforms?I had started trying to write layout tests for Web Share (see https://codereview.chromium.org/2714733002/). I didn't get through testing all the scenarios, so I haven't tried to land them. As you pointed out, I didn't find a way to detect the os/platform in the layout test. As well, I'm hoping we'll need fewer such layout tests in the future, once Ian finishes changes to automatically generate the code to expose interfaces to JavaScript.
(Since my feature works properly on non-Android by simply returning an empty list, I think I might just go ahead and not use origin_trial_os, essentially rolling it out on all platforms but with an empty implementation on non-Android platforms, which is how it will be eventually anyway.)
--
You received this message because you are subscribed to the Google Groups "experimentation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation...@chromium.org.
To post to this group, send email to experimen...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation-dev+unsub...@chromium.org.
To post to this group, send email to experimentation-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/experimentation-dev/CAHqYdcbOXscN5FgO_Pvuch%2BNUu-jFZh5%3Dt5evKFAAphuncvRfw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "experimentation-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to experimentation-dev+unsub...@chromium.org.
To post to this group, send email to experimentation-dev@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/experimentation-dev/CAHqYdcZWQ-w_E2rbNqP8AckVmLSzAFMs0W8D4WkSzPi1WPF3rA%40mail.gmail.com.