2013-09-10 00:33:25 +04:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tests if notifications about WebGL programs being linked are sent
|
|
|
|
* after a target navigation.
|
|
|
|
*/
|
|
|
|
|
2018-03-11 13:05:00 +03:00
|
|
|
async function ifWebGLSupported() {
|
|
|
|
let { target, front } = await initBackend(SIMPLE_CANVAS_URL);
|
2013-09-10 00:33:25 +04:00
|
|
|
|
|
|
|
let navigated = once(target, "navigate");
|
|
|
|
let linked = once(front, "program-linked");
|
|
|
|
|
2018-03-11 13:05:00 +03:00
|
|
|
await front.setup({ reload: true });
|
2013-09-10 00:33:25 +04:00
|
|
|
ok(true, "The front was setup up successfully.");
|
|
|
|
|
2018-03-11 13:05:00 +03:00
|
|
|
await navigated;
|
2013-09-10 00:33:25 +04:00
|
|
|
ok(true, "Target automatically navigated when the front was set up.");
|
|
|
|
|
2018-03-11 13:05:00 +03:00
|
|
|
await linked;
|
2013-09-10 00:33:25 +04:00
|
|
|
ok(true, "A 'program-linked' notification was sent after reloading.");
|
|
|
|
|
2018-03-11 13:05:00 +03:00
|
|
|
await removeTab(target.tab);
|
2013-09-10 00:33:25 +04:00
|
|
|
finish();
|
|
|
|
}
|