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

Unified Diff: third_party/WebKit/LayoutTests/presentation/presentationrequest.html

Issue 2655073007: Revert of [Presentation API] Allow PresentationConnection state change to "Connecting" (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/LayoutTests/presentation/presentationrequest.html
diff --git a/third_party/WebKit/LayoutTests/presentation/presentationrequest.html b/third_party/WebKit/LayoutTests/presentation/presentationrequest.html
index d7338c5c09d948884a76238cf88c036ab7c18b2d..2deab2719a33da02fc44dceb8c887b17ce93a691 100644
--- a/third_party/WebKit/LayoutTests/presentation/presentationrequest.html
+++ b/third_party/WebKit/LayoutTests/presentation/presentationrequest.html
@@ -6,50 +6,42 @@
<script src="../resources/gc.js"></script>
<script>
-const presentationUrl = 'http://example.com';
-const presentationUrls = [presentationUrl, 'cast://google.com/app_id=deadbeef'];
+var presentationUrl = "http://example.com";
+var presentationUrls = [presentationUrl, "cast://google.com/app_id=deadbeef"];
-const expectedException = new DOMException(
- 'PresentationRequest::start() requires user gesture.',
- 'InvalidAccessError');
+var expectedException = new DOMException('PresentationRequest::start() requires user gesture.', 'InvalidAccessError');
promise_test(function(t) {
- const request = new PresentationRequest(presentationUrl);
+ var request = new PresentationRequest(presentationUrl);
return promise_rejects(t, expectedException, request.start());
-}, 'Test that the PresentationRequest.start() with one URL requires user gesture.')
+}, "Test that the PresentationRequest.start() with one URL requires user gesture.")
-promise_test(
- function(t) {
- const request = new PresentationRequest(presentationUrls);
- return promise_rejects(t, expectedException, request.start());
- },
- 'Test that the PresentationRequest.start() with multiple URLs requires user gesture.')
+promise_test(function(t) {
+ var request = new PresentationRequest(presentationUrls);
+ return promise_rejects(t, expectedException, request.start());
+}, "Test that the PresentationRequest.start() with multiple URLs requires user gesture.")
- const testGarbageCollection = function(requestArgument) {
- navigator.presentation.defaultRequest =
- new PresentationRequest(requestArgument);
- navigator.presentation.defaultRequest.onconnectionavailable = function() {
- };
- gc();
- assert_not_equals(
- navigator.presentation.defaultRequest.onconnectionavailable,
- undefined);
- };
+var testGarbageCollection = function(requestArgument) {
+ navigator.presentation.defaultRequest = new PresentationRequest(requestArgument);
+ navigator.presentation.defaultRequest.onconnectionavailable = function() { };
+ gc();
+ assert_not_equals(navigator.presentation.defaultRequest.onconnectionavailable, undefined);
+};
test(function() {
testGarbageCollection(presentationUrl);
-}, 'Test that navigator.presentation.defaultRequest.onconnectionavailable with one URL isn\'t reset after gc().');
+}, "Test that navigator.presentation.defaultRequest.onconnectionavailable with one URL isn't reset after gc().");
test(function() {
testGarbageCollection(presentationUrls);
-}, 'Test that navigator.presentation.defaultRequest.onconnectionavailable with multiple URLs isn\'t reset after gc().');
+}, "Test that navigator.presentation.defaultRequest.onconnectionavailable with multiple URLs isn't reset after gc().");
test(function() {
- const request = new PresentationRequest('http://example.com');
- const promise_1 = request.getAvailability();
- const promise_2 = request.getAvailability();
+ var request = new PresentationRequest("http://example.com");
+ var promise_1 = request.getAvailability();
+ var promise_2 = request.getAvailability();
assert_true(promise_1 === promise_2);
-}, 'Test that the PresentationRequest.getAvailability() returns same promise object.');
+}, "Test that the PresentationRequest.getAvailability() returns same promise object.");
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698