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

Side by Side Diff: LayoutTests/presentation/presentation-api.html

Issue 408663002: Add the Presentation API module and a single event target (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Made navigator.presentation an event target for onavailablechange (no implementation yet). Created 6 years, 5 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/testharness.js"></script>
5 <script src="../resources/testharnessreport.js"></script>
6 <script>
7
8 test(function() {
9 assert_true('presentation' in navigator);
10 assert_true('displayAvailable' in navigator.presentation);
11 assert_true('onavailablechange' in navigator.presentation);
12 }, "Test that the Presentation API is present.")
13
14 test(function() {
15 assert_equals(typeof(navigator.presentation), "object");
16 assert_equals(typeof(navigator.presentation.displayAvailable), "boolean");
17 assert_equals(typeof(navigator.presentation.onavailablechange), "object");
18 }, "Test the Presentation API property types.");
19
20 test(function() {
21 assert_true(navigator.presentation.displayAvailable);
22 }, "Test the value of navigator.presentation.displayAvailable.");
23
24 test(function() {
25 assert_true('addEventListener' in navigator.presentation);
26 assert_true('removeEventListener' in navigator.presentation);
27 assert_true('dispatchEvent' in navigator.presentation);
Peter Beverloo 2014/07/25 18:01:17 nit [25-27]: no need to test EventTarget or the in
whywhat 2014/08/19 18:07:34 I'm testing that navigator.presentation is EventTa
28 assert_true(navigator.presentation instanceof EventTarget)
29 }, "Test that navigator.presentation is an EventTarget.");
30
31 </script>
32 </body>
33 </html>
34
OLDNEW
« no previous file with comments | « no previous file | Source/core/events/EventTypeNames.in » ('j') | Source/modules/presentation/NavigatorPresentation.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698