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

Unified Diff: third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp

Issue 2148643002: [Presentation API] Adds DOMString[] constructor to PresentationRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LayoutTests Created 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
index 84f6daa2ed0153122418febc0e3598a33d8f6015..f452cc625c42d70a73357e148aada06f269f7a21 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
@@ -12,6 +12,7 @@
#include "platform/testing/URLTestHelpers.h"
#include "platform/weborigin/KURL.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "wtf/Vector.h"
#include <v8.h>
namespace blink {
@@ -20,9 +21,12 @@ namespace {
TEST(PresentationAvailabilityTest, NoPageVisibilityChangeAfterDetach)
{
V8TestingScope scope;
- const KURL url = URLTestHelpers::toKURL("https://example.com");
+ WTF::Vector<KURL> urls;
+ urls.append(URLTestHelpers::toKURL("https://example.com"));
+ urls.append(URLTestHelpers::toKURL("https://another.com"));
+
Persistent<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scope.getScriptState());
- Persistent<PresentationAvailability> availability = PresentationAvailability::take(resolver, url, false);
+ Persistent<PresentationAvailability> availability = PresentationAvailability::take(resolver, urls, false);
// These two calls should not crash.
scope.frame().detach(FrameDetachType::Remove);

Powered by Google App Engine
This is Rietveld 408576698