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

Unified Diff: LayoutTests/http/tests/notifications/update-document.html

Issue 1312623003: Flakyness: fix notifications/ tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@webmidi-flakyness
Patch Set: rebase 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/http/tests/notifications/update-document.html
diff --git a/LayoutTests/http/tests/notifications/update-document.html b/LayoutTests/http/tests/notifications/update-document.html
index b16a470b2a473af27eda2c58154c158d12d8d12e..b75721c20b9e03417a2b7f164e2dbf8634158711 100644
--- a/LayoutTests/http/tests/notifications/update-document.html
+++ b/LayoutTests/http/tests/notifications/update-document.html
@@ -5,6 +5,7 @@
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="resources/test-helpers.js"></script>
+ <script src="../resources/permissions-helper.js"></script>
</head>
<body>
<script>
@@ -12,9 +13,11 @@
// property in the constructor's options. When the test is being ran
// manually, grant Notification permission first and verify that only a
// single notification will be shown at the end of the test.
- if (window.testRunner)
- testRunner.setPermission('notifications', 'granted', location.origin, location.origin);
+ PermissionsHelper.setPermission('notifications', 'granted').then(function() {
+ var script = document.createElement('script');
+ script.src = 'resources/update-event-test.js';
+ document.body.appendChild(script);
+ });
</script>
- <script src="resources/update-event-test.js"></script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698