async function test_url_bar_url(aDesc) {
await promiseURLBarFocus();
is(
gDOMWindowUtils.inputContextURI, null,
`When the search bar has focus, input context URI should be null because of in chrome document (${aDesc})`
);
}
async function test_input_in_http_or_https(aIsHTTPS) {
await promiseURLBarFocus();
const scheme = aIsHTTPS ? "https" : "http"; const url = `${scheme}://example.com/browser/toolkit/content/tests/browser/file_empty.html`;
await BrowserTestUtils.withNewTab(url, async browser => {
ok(browser.isRemoteBrowser, "This test passes only in e10s mode");
// Wait for a tick for flushing IMEContentObserver's pending notifications.
await new Promise(resolve =>
content.requestAnimationFrame(() =>
content.requestAnimationFrame(resolve)
)
);
});
await promiseIMEStateEnabledByRemote(); if (!gDOMWindowUtils.inputContextURI) {
ok( false,
`Input context should have valid URI when the scheme of focused tab's URL is ${scheme}`
); return;
}
is(
gDOMWindowUtils.inputContextURI.spec,
url,
`Input context should have the document URI when the scheme of focused tab's URL is ${scheme}`
);
});
}
add_task(async function test_input_in_data() {
await BrowserTestUtils.withNewTab("data:text/html,", async browser => {
ok(browser.isRemoteBrowser, "This test passes only in e10s mode");
// Wait for a tick for flushing IMEContentObserver's pending notifications.
await new Promise(resolve =>
content.requestAnimationFrame(() =>
content.requestAnimationFrame(resolve)
)
);
});
await promiseIMEStateEnabledByRemote();
is(
gDOMWindowUtils.inputContextURI, null, "Input context should not have data URI"
);
});
});
// Wait for a tick for flushing IMEContentObserver's pending notifications.
await new Promise(resolve =>
content.requestAnimationFrame(() =>
content.requestAnimationFrame(resolve)
)
);
});
await promiseIMEStateEnabledByRemote(); if (!gDOMWindowUtils.inputContextURI) {
ok( false,
`Input context should have valid URI even when the URL contains some private things`
); return;
}
is(
gDOMWindowUtils.inputContextURI.spec, "https://example.com/browser/toolkit/content/tests/browser/file_empty.html",
`Input context should have the document URI which omit some private things in the URL`
);
}
);
});
Messung V0.5
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.