Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / sync / tools / testserver / synced_notifications.html
blob10cac3006803284feeba6db5e702b1af3bd4134f
1 <html>
2 <head>
3 <title>Synced notifications</title>
5 <script type="text/javascript">
6 // Creates link (appended to the bottom of the page body) to trigger a
7 // synced notifications. The link's title will be |title| and
8 // |serialized_notification| is the ASCII-serialized version of the
9 // CoalescedSyncedNotification to be triggered.
10 function appendNotificationLink(title, serialized_notification) {
11 var link = document.createElement('a');
12 link.innerHTML = title;
13 link.setAttribute('target', '_blank');
14 link.setAttribute('href', 'triggersyncednotification?' +
15 'serialized_notification=' +
16 encodeURIComponent(serialized_notification));
17 document.body.appendChild(link);
19 </script>
20 </head>
22 <body>
23 <h1>Synced notifications</h1>
25 <h2>Step 0: Sign in to the browser and set up Sync</h2>
27 <h2>Step 1: Click this link (only required once per server lifetime)</h2>
29 <a href="/customizeclientcommand?sessions_commit_delay_seconds=0">
30 Make notifications triggering instant</a>
32 <h2>Step 2: Ctrl-Click the links below to trigger synced notifications</h2>
34 <script type="text/javascript">
35 appendNotificationLink('Simple notification',
36 'key: \"foo\"\n' +
37 'priority: 2\n' +
38 'read_state: 1\n' +
39 'render_info {\n' +
40 ' collapsed_info {\n' +
41 ' creation_timestamp_usec: 42\n' +
42 ' simple_collapsed_layout {\n' +
43 ' annotation: \"Space Needle, 12:00 pm\"\n' +
44 ' description: \"Space Needle, 12:00 pm\"\n' +
45 ' heading: \"New appointment\"\n' +
46 ' }\n' +
47 ' }\n' +
48 '}');
49 </script>
50 <br/>
51 <script type="text/javascript">
52 appendNotificationLink('New Service notification',
53 'key: \"foo\"\n' +
54 'app_id: \"maps_street_view\"\n' +
55 'priority: 2\n' +
56 'read_state: 1\n' +
57 'render_info {\n' +
58 ' collapsed_info {\n' +
59 ' creation_timestamp_usec: 42\n' +
60 ' simple_collapsed_layout {\n' +
61 ' annotation: \"787 6th Street South\"\n' +
62 ' description: \"Building B\"\n' +
63 ' heading: \"Google Kirkland\"\n' +
64 ' }\n' +
65 ' }\n' +
66 '}');
67 </script>
68 </body>
69 </html>