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

Unified Diff: LayoutTests/webmidi/send-messages.html

Issue 1314763003: Flakyness: fix webmidi/send-messages.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/webmidi/send-messages.html
diff --git a/LayoutTests/webmidi/send-messages.html b/LayoutTests/webmidi/send-messages.html
index 075b7eb1f548eee09d2452acc945947680ac8dbd..7751b2234ade58136d9f7d5943349f45b51080e0 100644
--- a/LayoutTests/webmidi/send-messages.html
+++ b/LayoutTests/webmidi/send-messages.html
@@ -2,6 +2,7 @@
<html>
<head>
<script src="../resources/js-test.js"></script>
+<script src="../resources/permissions-helper.js"></script>
</head>
<body>
<script>
@@ -13,9 +14,9 @@ shouldBeDefined("navigator.requestMIDIAccess");
window.jsTestIsAsync = true;
-testRunner.setPermission('midi-sysex', 'granted', location.origin, location.origin);
-
-navigator.requestMIDIAccess({sysex: true}).then(function (a) {
+PermissionsHelper.setPermission('midi-sysex', 'granted').then(function() {
+ return navigator.requestMIDIAccess({sysex: true});
+}).then(function(a) {
output = a.outputs.values().next().value;
// Note on(off).
@@ -98,7 +99,7 @@ navigator.requestMIDIAccess({sysex: true}).then(function (a) {
shouldThrow('output.send(new Uint8Array(), Infinity)');
finishJSTest();
-}, function () {
+}).catch(function () {
testFailed("requestMIDIAccess() return an error.");
});
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698