forked from googleworkspace/browser-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (73 loc) · 3.16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!--
Copyright 2018 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<title>Google Slides API Quickstart</title>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.4.2/mocha.min.css">
<meta charset="utf-8" />
</head>
<body>
<h2>Google Slides API</h2>
<h3>Snippets - Javascript</h3>
<!--Add buttons to initiate auth sequence and sign out-->
<button id="authorize_button" style="display: none;">Authorize</button>
<button id="signout_button" style="display: none;">Sign Out</button>
<div id="mocha"></div>
<pre id="content"></pre>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/3.4.2/mocha.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.0.2/chai.min.js"></script>
<script src="snippets.js"></script>
<script src="base_test.js"></script>
<script src="test_snippets.js"></script>
<script type="text/javascript">
// Mocha/Chai (Global)
var assert = chai.assert;
mocha.setup('bdd');
/**
* Called when the signed in status changes, to update the UI
* appropriately. After a sign-in, the API is called.
*/
function updateSigninStatus(isSignedIn) {
if (isSignedIn) {
authorizeButton.style.display = 'none';
signoutButton.style.display = 'block';
describe('Google Slides API', function() {
this.timeout(10000);
it('should create a presentation', testCreatePresentation);
it('should copy a presentation', testCopyPresentation);
it('should create a slide', testCreateSlide);
it('should create a textbox with text', testCreateTextboxWithText);
it('should create an image', testCreateImage);
it('should merge text', testTextMerging);
it('should merge images', testImageMerging);
it('should text replace', testSimpleTextReplace);
it('should update text style', testTextStyleUpdate);
it('should create bulleted text', testCreateBulletedText);
it('should create sheets chart', testCreateSheetsChart);
it('should refresh sheets chart', testRefreshSheetsChart);
});
after(tearDown);
mocha.run();
} else {
authorizeButton.style.display = 'block';
signoutButton.style.display = 'none';
}
}
</script>
<script async defer src="https://apis.google.com/js/api.js"
onload="this.onload=function(){};handleClientLoad()"
onreadystatechange="if (this.readyState === 'complete') this.onload()">
</script>
</body>
</html>