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

Side by Side Diff: LayoutTests/presentation/availablechange-event.html

Issue 906673002: Added layout test for |availablechange| event. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: The simplest async test? Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Tests the Presentation API's availablechange event's expected behavior. </title>
5 </head>
6 <body>
7 <script src="../resources/testharness.js"></script>
8 <script src="../resources/testharnessreport.js"></script>
9 <script>
10
11 var availableChangeTest = async_test(
12 "Test that availablechange event is fired when the screen availability becom es true.");
13
14 navigator.presentation.onavailablechange = function(e) {
15 availableChangeTest.step(function() {
16 assert_true(e.available);
17 availableChangeTest.done();
18 });
19 }
20
21 // Some screens are available, event must be fired with e.available set to true.
22 window.testRunner.setMockScreenAvailability(true);
23
24 </script>
25 </body>
26 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698