Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: LayoutTests/webmidi/loopback-receive.html

Issue 1339123002: Remove some usage of testRunner.setPermission. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@notifications-flakyness
Patch Set: review comments Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/webmidi/loopback-receive.html
diff --git a/LayoutTests/webmidi/loopback-receive.html b/LayoutTests/webmidi/loopback-receive.html
index 7cfc017e6135f3e0540445f4d3ab6b42fb99ac98..4a2b21c5289849deb19f11f4b4c9036ece4b5008 100644
--- a/LayoutTests/webmidi/loopback-receive.html
+++ b/LayoutTests/webmidi/loopback-receive.html
@@ -2,19 +2,17 @@
<html>
<head>
<script src="../resources/js-test.js"></script>
+<script src="../resources/permissions-helper.js"></script>
</head>
<body>
<script>
description("Test if midimessage event handler work.");
-shouldBeDefined("testRunner.setPermission");
shouldBeDefined("navigator.requestMIDIAccess");
window.jsTestIsAsync = true;
-testRunner.setPermission('midi-sysex', 'granted', location.origin, location.origin);
-
testData = [
// Complete messages.
[0x80, 0x00, 0x00],
@@ -73,7 +71,9 @@ function test(useAddEventListener) {
});
}
-test(false).then(test.bind(null, true)).then(finishJSTest, finishJSTest);
+PermissionsHelper.setPermission('midi-sysex', 'granted').then(function() {
+ test(false).then(test.bind(null, true)).then(finishJSTest, finishJSTest);
+});
</script>
</body>
« no previous file with comments | « LayoutTests/inspector/geolocation-emulation-tests-expected.txt ('k') | LayoutTests/webmidi/loopback-receive-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698